diff --git a/dev/protos/firestore_admin_v1_proto_api.d.ts b/dev/protos/firestore_admin_v1_proto_api.d.ts index 2fd699aaf..fc57d9aec 100644 --- a/dev/protos/firestore_admin_v1_proto_api.d.ts +++ b/dev/protos/firestore_admin_v1_proto_api.d.ts @@ -18,4744 +18,5600 @@ import * as $protobuf from "protobufjs"; /** Namespace google. */ export namespace google { - /** Namespace firestore. */ - namespace firestore { + /** Namespace protobuf. */ + namespace protobuf { - /** Namespace admin. */ - namespace admin { + /** Properties of an Empty. */ + interface IEmpty { + } - /** Namespace v1. */ - namespace v1 { + /** Represents an Empty. */ + class Empty implements IEmpty { - /** Properties of a Database. */ - interface IDatabase { + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); - /** Database name */ - name?: (string|null); + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - /** Database locationId */ - locationId?: (string|null); + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Database type */ - type?: (google.firestore.admin.v1.Database.DatabaseType|null); + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Database concurrencyMode */ - concurrencyMode?: (google.firestore.admin.v1.Database.ConcurrencyMode|null); + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Database appEngineIntegrationMode */ - appEngineIntegrationMode?: (google.firestore.admin.v1.Database.AppEngineIntegrationMode|null); + /** Properties of a FieldMask. */ + interface IFieldMask { - /** Database keyPrefix */ - keyPrefix?: (string|null); + /** FieldMask paths */ + paths?: (string[]|null); + } - /** Database etag */ - etag?: (string|null); - } + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { - /** Represents a Database. */ - class Database implements IDatabase { + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); - /** - * Constructs a new Database. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IDatabase); + /** FieldMask paths. */ + public paths: string[]; - /** Database name. */ - public name: string; + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; - /** Database locationId. */ - public locationId: string; + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Database type. */ - public type: google.firestore.admin.v1.Database.DatabaseType; + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Database concurrencyMode. */ - public concurrencyMode: google.firestore.admin.v1.Database.ConcurrencyMode; + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Database appEngineIntegrationMode. */ - public appEngineIntegrationMode: google.firestore.admin.v1.Database.AppEngineIntegrationMode; + /** Properties of a Timestamp. */ + interface ITimestamp { - /** Database keyPrefix. */ - public keyPrefix: string; + /** Timestamp seconds */ + seconds?: (number|string|null); - /** Database etag. */ - public etag: string; + /** Timestamp nanos */ + nanos?: (number|null); + } - /** - * 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; + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { - /** - * 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 }; + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); - /** - * Converts this Database to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Timestamp seconds. */ + public seconds: (number|string); - namespace Database { + /** Timestamp nanos. */ + public nanos: number; - /** DatabaseType enum. */ - type DatabaseType = - "DATABASE_TYPE_UNSPECIFIED"| "FIRESTORE_NATIVE"| "DATASTORE_MODE"; + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - /** ConcurrencyMode enum. */ - type ConcurrencyMode = - "CONCURRENCY_MODE_UNSPECIFIED"| "OPTIMISTIC"| "PESSIMISTIC"| "OPTIMISTIC_WITH_ENTITY_GROUPS"; + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** AppEngineIntegrationMode enum. */ - type AppEngineIntegrationMode = - "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED"| "ENABLED"| "DISABLED"; - } + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a Field. */ - interface IField { + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Field name */ - name?: (string|null); + /** Properties of an Any. */ + interface IAny { - /** Field indexConfig */ - indexConfig?: (google.firestore.admin.v1.Field.IIndexConfig|null); + /** Any type_url */ + type_url?: (string|null); - /** Field ttlConfig */ - ttlConfig?: (google.firestore.admin.v1.Field.ITtlConfig|null); - } + /** Any value */ + value?: (Uint8Array|null); + } - /** Represents a Field. */ - class Field implements IField { + /** Represents an Any. */ + class Any implements IAny { - /** - * Constructs a new Field. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IField); + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); - /** Field name. */ - public name: string; + /** Any type_url. */ + public type_url: string; - /** Field indexConfig. */ - public indexConfig?: (google.firestore.admin.v1.Field.IIndexConfig|null); + /** Any value. */ + public value: Uint8Array; - /** Field ttlConfig. */ - public ttlConfig?: (google.firestore.admin.v1.Field.ITtlConfig|null); + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - /** - * 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 an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * 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 Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this Field to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - namespace Field { + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { - /** Properties of an IndexConfig. */ - interface IIndexConfig { + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } - /** IndexConfig indexes */ - indexes?: (google.firestore.admin.v1.IIndex[]|null); + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { - /** IndexConfig usesAncestorConfig */ - usesAncestorConfig?: (boolean|null); + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); - /** IndexConfig ancestorField */ - ancestorField?: (string|null); + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; - /** IndexConfig reverting */ - reverting?: (boolean|null); - } + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - /** Represents an IndexConfig. */ - class IndexConfig implements IIndexConfig { + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new IndexConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.Field.IIndexConfig); + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** IndexConfig indexes. */ - public indexes: google.firestore.admin.v1.IIndex[]; + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** IndexConfig usesAncestorConfig. */ - public usesAncestorConfig: boolean; + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { - /** IndexConfig ancestorField. */ - public ancestorField: string; + /** FileDescriptorProto name */ + name?: (string|null); - /** IndexConfig reverting. */ - public reverting: boolean; + /** FileDescriptorProto package */ + "package"?: (string|null); - /** - * 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; + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); - /** - * 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 }; + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); - /** - * Converts this IndexConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); - /** Properties of a TtlConfig. */ - interface ITtlConfig { + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); - /** TtlConfig state */ - state?: (google.firestore.admin.v1.Field.TtlConfig.State|null); - } + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** Represents a TtlConfig. */ - class TtlConfig implements ITtlConfig { + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); - /** - * Constructs a new TtlConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.Field.ITtlConfig); + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** TtlConfig state. */ - public state: google.firestore.admin.v1.Field.TtlConfig.State; + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); - /** - * 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; + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - /** - * 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 }; + /** FileDescriptorProto syntax */ + syntax?: (string|null); - /** - * Converts this TtlConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileDescriptorProto edition */ + edition?: (string|null); + } - namespace TtlConfig { + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { - /** State enum. */ - type State = - "STATE_UNSPECIFIED"| "CREATING"| "ACTIVE"| "NEEDS_REPAIR"; - } - } + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); - /** Represents a FirestoreAdmin */ - class FirestoreAdmin extends $protobuf.rpc.Service { + /** FileDescriptorProto name. */ + public name: string; - /** - * Constructs a new FirestoreAdmin service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + /** FileDescriptorProto package. */ + public package: string; - /** - * Calls CreateIndex. - * @param request CreateIndexRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createIndex(request: google.firestore.admin.v1.ICreateIndexRequest, callback: google.firestore.admin.v1.FirestoreAdmin.CreateIndexCallback): void; + /** FileDescriptorProto dependency. */ + public dependency: string[]; - /** - * Calls CreateIndex. - * @param request CreateIndexRequest message or plain object - * @returns Promise - */ - public createIndex(request: google.firestore.admin.v1.ICreateIndexRequest): Promise; + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; - /** - * Calls ListIndexes. - * @param request ListIndexesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListIndexesResponse - */ - public listIndexes(request: google.firestore.admin.v1.IListIndexesRequest, callback: google.firestore.admin.v1.FirestoreAdmin.ListIndexesCallback): void; + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; - /** - * Calls ListIndexes. - * @param request ListIndexesRequest message or plain object - * @returns Promise - */ - public listIndexes(request: google.firestore.admin.v1.IListIndexesRequest): Promise; + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; - /** - * Calls GetIndex. - * @param request GetIndexRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Index - */ - public getIndex(request: google.firestore.admin.v1.IGetIndexRequest, callback: google.firestore.admin.v1.FirestoreAdmin.GetIndexCallback): void; + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** - * Calls GetIndex. - * @param request GetIndexRequest message or plain object - * @returns Promise - */ - public getIndex(request: google.firestore.admin.v1.IGetIndexRequest): Promise; + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; - /** - * Calls DeleteIndex. - * @param request DeleteIndexRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteIndex(request: google.firestore.admin.v1.IDeleteIndexRequest, callback: google.firestore.admin.v1.FirestoreAdmin.DeleteIndexCallback): void; + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** - * Calls DeleteIndex. - * @param request DeleteIndexRequest message or plain object - * @returns Promise - */ - public deleteIndex(request: google.firestore.admin.v1.IDeleteIndexRequest): Promise; + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); - /** - * Calls GetField. - * @param request GetFieldRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Field - */ - public getField(request: google.firestore.admin.v1.IGetFieldRequest, callback: google.firestore.admin.v1.FirestoreAdmin.GetFieldCallback): void; + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - /** - * Calls GetField. - * @param request GetFieldRequest message or plain object - * @returns Promise - */ - public getField(request: google.firestore.admin.v1.IGetFieldRequest): Promise; + /** FileDescriptorProto syntax. */ + public syntax: string; - /** - * Calls UpdateField. - * @param request UpdateFieldRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateField(request: google.firestore.admin.v1.IUpdateFieldRequest, callback: google.firestore.admin.v1.FirestoreAdmin.UpdateFieldCallback): void; + /** FileDescriptorProto edition. */ + public edition: string; - /** - * Calls UpdateField. - * @param request UpdateFieldRequest message or plain object - * @returns Promise - */ - public updateField(request: google.firestore.admin.v1.IUpdateFieldRequest): Promise; + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - /** - * Calls ListFields. - * @param request ListFieldsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFieldsResponse - */ - public listFields(request: google.firestore.admin.v1.IListFieldsRequest, callback: google.firestore.admin.v1.FirestoreAdmin.ListFieldsCallback): void; + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Calls ListFields. - * @param request ListFieldsRequest message or plain object - * @returns Promise - */ - public listFields(request: google.firestore.admin.v1.IListFieldsRequest): Promise; + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Calls ExportDocuments. - * @param request ExportDocumentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public exportDocuments(request: google.firestore.admin.v1.IExportDocumentsRequest, callback: google.firestore.admin.v1.FirestoreAdmin.ExportDocumentsCallback): void; + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Calls ExportDocuments. - * @param request ExportDocumentsRequest message or plain object - * @returns Promise - */ - public exportDocuments(request: google.firestore.admin.v1.IExportDocumentsRequest): Promise; + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { - /** - * Calls ImportDocuments. - * @param request ImportDocumentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public importDocuments(request: google.firestore.admin.v1.IImportDocumentsRequest, callback: google.firestore.admin.v1.FirestoreAdmin.ImportDocumentsCallback): void; + /** DescriptorProto name */ + name?: (string|null); - /** - * Calls ImportDocuments. - * @param request ImportDocumentsRequest message or plain object - * @returns Promise - */ - public importDocuments(request: google.firestore.admin.v1.IImportDocumentsRequest): Promise; + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); - /** - * Calls GetDatabase. - * @param request GetDatabaseRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Database - */ - public getDatabase(request: google.firestore.admin.v1.IGetDatabaseRequest, callback: google.firestore.admin.v1.FirestoreAdmin.GetDatabaseCallback): void; + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** - * Calls GetDatabase. - * @param request GetDatabaseRequest message or plain object - * @returns Promise - */ - public getDatabase(request: google.firestore.admin.v1.IGetDatabaseRequest): Promise; + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); - /** - * Calls ListDatabases. - * @param request ListDatabasesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListDatabasesResponse - */ - public listDatabases(request: google.firestore.admin.v1.IListDatabasesRequest, callback: google.firestore.admin.v1.FirestoreAdmin.ListDatabasesCallback): void; + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** - * Calls ListDatabases. - * @param request ListDatabasesRequest message or plain object - * @returns Promise - */ - public listDatabases(request: google.firestore.admin.v1.IListDatabasesRequest): Promise; + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - /** - * Calls UpdateDatabase. - * @param request UpdateDatabaseRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateDatabase(request: google.firestore.admin.v1.IUpdateDatabaseRequest, callback: google.firestore.admin.v1.FirestoreAdmin.UpdateDatabaseCallback): void; + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - /** - * Calls UpdateDatabase. - * @param request UpdateDatabaseRequest message or plain object - * @returns Promise - */ - public updateDatabase(request: google.firestore.admin.v1.IUpdateDatabaseRequest): Promise; - } + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); - namespace FirestoreAdmin { + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#createIndex}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateIndexCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#listIndexes}. - * @param error Error, if any - * @param [response] ListIndexesResponse - */ - type ListIndexesCallback = (error: (Error|null), response?: google.firestore.admin.v1.ListIndexesResponse) => void; + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#getIndex}. - * @param error Error, if any - * @param [response] Index - */ - type GetIndexCallback = (error: (Error|null), response?: google.firestore.admin.v1.Index) => void; + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#deleteIndex}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteIndexCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** DescriptorProto name. */ + public name: string; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#getField}. - * @param error Error, if any - * @param [response] Field - */ - type GetFieldCallback = (error: (Error|null), response?: google.firestore.admin.v1.Field) => void; + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#updateField}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateFieldCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#listFields}. - * @param error Error, if any - * @param [response] ListFieldsResponse - */ - type ListFieldsCallback = (error: (Error|null), response?: google.firestore.admin.v1.ListFieldsResponse) => void; + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#exportDocuments}. - * @param error Error, if any - * @param [response] Operation - */ - type ExportDocumentsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#importDocuments}. - * @param error Error, if any - * @param [response] Operation - */ - type ImportDocumentsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#getDatabase}. - * @param error Error, if any - * @param [response] Database - */ - type GetDatabaseCallback = (error: (Error|null), response?: google.firestore.admin.v1.Database) => void; + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#listDatabases}. - * @param error Error, if any - * @param [response] ListDatabasesResponse - */ - type ListDatabasesCallback = (error: (Error|null), response?: google.firestore.admin.v1.ListDatabasesResponse) => void; + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#updateDatabase}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateDatabaseCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - } + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - /** Properties of a ListDatabasesRequest. */ - interface IListDatabasesRequest { + /** DescriptorProto reservedName. */ + public reservedName: string[]; - /** ListDatabasesRequest parent */ - parent?: (string|null); - } + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - /** Represents a ListDatabasesRequest. */ - class ListDatabasesRequest implements IListDatabasesRequest { + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new ListDatabasesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IListDatabasesRequest); + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ListDatabasesRequest parent. */ - public parent: string; + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a ListDatabasesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDatabasesRequest - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ListDatabasesRequest; + namespace DescriptorProto { - /** - * Creates a plain object from a ListDatabasesRequest message. Also converts values to other types if specified. - * @param message ListDatabasesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.ListDatabasesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of an ExtensionRange. */ + interface IExtensionRange { - /** - * Converts this ListDatabasesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ExtensionRange start */ + start?: (number|null); - /** Properties of a ListDatabasesResponse. */ - interface IListDatabasesResponse { + /** ExtensionRange end */ + end?: (number|null); - /** ListDatabasesResponse databases */ - databases?: (google.firestore.admin.v1.IDatabase[]|null); - } + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } - /** Represents a ListDatabasesResponse. */ - class ListDatabasesResponse implements IListDatabasesResponse { + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { - /** - * Constructs a new ListDatabasesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IListDatabasesResponse); + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - /** ListDatabasesResponse databases. */ - public databases: google.firestore.admin.v1.IDatabase[]; + /** ExtensionRange start. */ + public start: number; - /** - * Creates a ListDatabasesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListDatabasesResponse - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ListDatabasesResponse; + /** ExtensionRange end. */ + public end: number; - /** - * Creates a plain object from a ListDatabasesResponse message. Also converts values to other types if specified. - * @param message ListDatabasesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.ListDatabasesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); - /** - * Converts this ListDatabasesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - /** Properties of a GetDatabaseRequest. */ - interface IGetDatabaseRequest { + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** GetDatabaseRequest name */ - name?: (string|null); - } + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a GetDatabaseRequest. */ - class GetDatabaseRequest implements IGetDatabaseRequest { + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Constructs a new GetDatabaseRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IGetDatabaseRequest); + /** Properties of a ReservedRange. */ + interface IReservedRange { - /** GetDatabaseRequest name. */ - public name: string; + /** ReservedRange start */ + start?: (number|null); - /** - * Creates a GetDatabaseRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetDatabaseRequest - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.GetDatabaseRequest; + /** ReservedRange end */ + end?: (number|null); + } - /** - * Creates a plain object from a GetDatabaseRequest message. Also converts values to other types if specified. - * @param message GetDatabaseRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.GetDatabaseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { - /** - * Converts this GetDatabaseRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - /** Properties of an UpdateDatabaseRequest. */ - interface IUpdateDatabaseRequest { + /** ReservedRange start. */ + public start: number; - /** UpdateDatabaseRequest database */ - database?: (google.firestore.admin.v1.IDatabase|null); + /** ReservedRange end. */ + public end: number; - /** UpdateDatabaseRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - /** Represents an UpdateDatabaseRequest. */ - class UpdateDatabaseRequest implements IUpdateDatabaseRequest { + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new UpdateDatabaseRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IUpdateDatabaseRequest); + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** UpdateDatabaseRequest database. */ - public database?: (google.firestore.admin.v1.IDatabase|null); + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** UpdateDatabaseRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { - /** - * Creates an UpdateDatabaseRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateDatabaseRequest - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.UpdateDatabaseRequest; + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** - * Creates a plain object from an UpdateDatabaseRequest message. Also converts values to other types if specified. - * @param message UpdateDatabaseRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.UpdateDatabaseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { - /** - * Converts this UpdateDatabaseRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); - /** Properties of an UpdateDatabaseMetadata. */ - interface IUpdateDatabaseMetadata { - } + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** Represents an UpdateDatabaseMetadata. */ - class UpdateDatabaseMetadata implements IUpdateDatabaseMetadata { + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - /** - * Constructs a new UpdateDatabaseMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IUpdateDatabaseMetadata); + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates an UpdateDatabaseMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateDatabaseMetadata - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.UpdateDatabaseMetadata; + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from an UpdateDatabaseMetadata message. Also converts values to other types if specified. - * @param message UpdateDatabaseMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.UpdateDatabaseMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this UpdateDatabaseMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { - /** Properties of a CreateIndexRequest. */ - interface ICreateIndexRequest { + /** FieldDescriptorProto name */ + name?: (string|null); - /** CreateIndexRequest parent */ - parent?: (string|null); + /** FieldDescriptorProto number */ + number?: (number|null); - /** CreateIndexRequest index */ - index?: (google.firestore.admin.v1.IIndex|null); - } + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|null); - /** Represents a CreateIndexRequest. */ - class CreateIndexRequest implements ICreateIndexRequest { + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|null); - /** - * Constructs a new CreateIndexRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.ICreateIndexRequest); + /** FieldDescriptorProto typeName */ + typeName?: (string|null); - /** CreateIndexRequest parent. */ - public parent: string; + /** FieldDescriptorProto extendee */ + extendee?: (string|null); - /** CreateIndexRequest index. */ - public index?: (google.firestore.admin.v1.IIndex|null); + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); - /** - * Creates a CreateIndexRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateIndexRequest - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.CreateIndexRequest; + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); - /** - * Creates a plain object from a CreateIndexRequest message. Also converts values to other types if specified. - * @param message CreateIndexRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.CreateIndexRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); - /** - * Converts this CreateIndexRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); - /** Properties of a ListIndexesRequest. */ - interface IListIndexesRequest { + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } - /** ListIndexesRequest parent */ - parent?: (string|null); + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { - /** ListIndexesRequest filter */ - filter?: (string|null); + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); - /** ListIndexesRequest pageSize */ - pageSize?: (number|null); + /** FieldDescriptorProto name. */ + public name: string; - /** ListIndexesRequest pageToken */ - pageToken?: (string|null); - } + /** FieldDescriptorProto number. */ + public number: number; - /** Represents a ListIndexesRequest. */ - class ListIndexesRequest implements IListIndexesRequest { + /** FieldDescriptorProto label. */ + public label: google.protobuf.FieldDescriptorProto.Label; - /** - * Constructs a new ListIndexesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IListIndexesRequest); + /** FieldDescriptorProto type. */ + public type: google.protobuf.FieldDescriptorProto.Type; - /** ListIndexesRequest parent. */ - public parent: string; + /** FieldDescriptorProto typeName. */ + public typeName: string; - /** ListIndexesRequest filter. */ - public filter: string; + /** FieldDescriptorProto extendee. */ + public extendee: string; - /** ListIndexesRequest pageSize. */ - public pageSize: number; + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; - /** ListIndexesRequest pageToken. */ - public pageToken: string; + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; - /** - * Creates a ListIndexesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListIndexesRequest - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ListIndexesRequest; + /** FieldDescriptorProto jsonName. */ + public jsonName: string; - /** - * Creates a plain object from a ListIndexesRequest message. Also converts values to other types if specified. - * @param message ListIndexesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.ListIndexesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); - /** - * Converts this ListIndexesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; - /** Properties of a ListIndexesResponse. */ - interface IListIndexesResponse { + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - /** ListIndexesResponse indexes */ - indexes?: (google.firestore.admin.v1.IIndex[]|null); + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ListIndexesResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a ListIndexesResponse. */ - class ListIndexesResponse implements IListIndexesResponse { + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Constructs a new ListIndexesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IListIndexesResponse); + namespace FieldDescriptorProto { - /** ListIndexesResponse indexes. */ - public indexes: google.firestore.admin.v1.IIndex[]; + /** Type enum. */ + type Type = + "TYPE_DOUBLE"| "TYPE_FLOAT"| "TYPE_INT64"| "TYPE_UINT64"| "TYPE_INT32"| "TYPE_FIXED64"| "TYPE_FIXED32"| "TYPE_BOOL"| "TYPE_STRING"| "TYPE_GROUP"| "TYPE_MESSAGE"| "TYPE_BYTES"| "TYPE_UINT32"| "TYPE_ENUM"| "TYPE_SFIXED32"| "TYPE_SFIXED64"| "TYPE_SINT32"| "TYPE_SINT64"; - /** ListIndexesResponse nextPageToken. */ - public nextPageToken: string; + /** Label enum. */ + type Label = + "LABEL_OPTIONAL"| "LABEL_REQUIRED"| "LABEL_REPEATED"; + } - /** - * Creates a ListIndexesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListIndexesResponse - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ListIndexesResponse; + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { - /** - * Creates a plain object from a ListIndexesResponse message. Also converts values to other types if specified. - * @param message ListIndexesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.ListIndexesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** OneofDescriptorProto name */ + name?: (string|null); - /** - * Converts this ListIndexesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } - /** Properties of a GetIndexRequest. */ - interface IGetIndexRequest { + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { - /** GetIndexRequest name */ - name?: (string|null); - } + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); - /** Represents a GetIndexRequest. */ - class GetIndexRequest implements IGetIndexRequest { + /** OneofDescriptorProto name. */ + public name: string; - /** - * Constructs a new GetIndexRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IGetIndexRequest); + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); - /** GetIndexRequest name. */ - public name: string; + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - /** - * Creates a GetIndexRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetIndexRequest - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.GetIndexRequest; + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a GetIndexRequest message. Also converts values to other types if specified. - * @param message GetIndexRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.GetIndexRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this GetIndexRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of a DeleteIndexRequest. */ - interface IDeleteIndexRequest { + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { - /** DeleteIndexRequest name */ - name?: (string|null); - } + /** EnumDescriptorProto name */ + name?: (string|null); - /** Represents a DeleteIndexRequest. */ - class DeleteIndexRequest implements IDeleteIndexRequest { + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - /** - * Constructs a new DeleteIndexRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IDeleteIndexRequest); + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); - /** DeleteIndexRequest name. */ - public name: string; + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - /** - * Creates a DeleteIndexRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteIndexRequest - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.DeleteIndexRequest; + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } - /** - * Creates a plain object from a DeleteIndexRequest message. Also converts values to other types if specified. - * @param message DeleteIndexRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.DeleteIndexRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { - /** - * Converts this DeleteIndexRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); - /** Properties of an UpdateFieldRequest. */ - interface IUpdateFieldRequest { + /** EnumDescriptorProto name. */ + public name: string; - /** UpdateFieldRequest field */ - field?: (google.firestore.admin.v1.IField|null); + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; - /** UpdateFieldRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); - /** Represents an UpdateFieldRequest. */ - class UpdateFieldRequest implements IUpdateFieldRequest { + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - /** - * Constructs a new UpdateFieldRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IUpdateFieldRequest); + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; - /** UpdateFieldRequest field. */ - public field?: (google.firestore.admin.v1.IField|null); + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - /** UpdateFieldRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates an UpdateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateFieldRequest - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.UpdateFieldRequest; + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from an UpdateFieldRequest message. Also converts values to other types if specified. - * @param message UpdateFieldRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.UpdateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this UpdateFieldRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + namespace EnumDescriptorProto { - /** Properties of a GetFieldRequest. */ - interface IGetFieldRequest { + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { - /** GetFieldRequest name */ - name?: (string|null); - } + /** EnumReservedRange start */ + start?: (number|null); - /** Represents a GetFieldRequest. */ - class GetFieldRequest implements IGetFieldRequest { + /** EnumReservedRange end */ + end?: (number|null); + } - /** - * Constructs a new GetFieldRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IGetFieldRequest); + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { - /** GetFieldRequest name. */ - public name: string; + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - /** - * Creates a GetFieldRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetFieldRequest - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.GetFieldRequest; + /** EnumReservedRange start. */ + public start: number; - /** - * Creates a plain object from a GetFieldRequest message. Also converts values to other types if specified. - * @param message GetFieldRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.GetFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** EnumReservedRange end. */ + public end: number; - /** - * Converts this GetFieldRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - /** Properties of a ListFieldsRequest. */ - interface IListFieldsRequest { + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ListFieldsRequest parent */ - parent?: (string|null); + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ListFieldsRequest filter */ - filter?: (string|null); + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** ListFieldsRequest pageSize */ - pageSize?: (number|null); + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { - /** ListFieldsRequest pageToken */ - pageToken?: (string|null); - } + /** EnumValueDescriptorProto name */ + name?: (string|null); - /** Represents a ListFieldsRequest. */ - class ListFieldsRequest implements IListFieldsRequest { + /** EnumValueDescriptorProto number */ + number?: (number|null); - /** - * Constructs a new ListFieldsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IListFieldsRequest); + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } - /** ListFieldsRequest parent. */ - public parent: string; + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - /** ListFieldsRequest filter. */ - public filter: string; + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - /** ListFieldsRequest pageSize. */ - public pageSize: number; + /** EnumValueDescriptorProto name. */ + public name: string; - /** ListFieldsRequest pageToken. */ - public pageToken: string; + /** EnumValueDescriptorProto number. */ + public number: number; - /** - * Creates a ListFieldsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFieldsRequest - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ListFieldsRequest; + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); - /** - * Creates a plain object from a ListFieldsRequest message. Also converts values to other types if specified. - * @param message ListFieldsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.ListFieldsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - /** - * Converts this ListFieldsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a ListFieldsResponse. */ - interface IListFieldsResponse { + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ListFieldsResponse fields */ - fields?: (google.firestore.admin.v1.IField[]|null); + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ListFieldsResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { - /** Represents a ListFieldsResponse. */ - class ListFieldsResponse implements IListFieldsResponse { + /** ServiceDescriptorProto name */ + name?: (string|null); - /** - * Constructs a new ListFieldsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IListFieldsResponse); + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); - /** ListFieldsResponse fields. */ - public fields: google.firestore.admin.v1.IField[]; + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } - /** ListFieldsResponse nextPageToken. */ - public nextPageToken: string; + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { - /** - * Creates a ListFieldsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListFieldsResponse - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ListFieldsResponse; + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); - /** - * Creates a plain object from a ListFieldsResponse message. Also converts values to other types if specified. - * @param message ListFieldsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.ListFieldsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ServiceDescriptorProto name. */ + public name: string; - /** - * Converts this ListFieldsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; - /** Properties of an ExportDocumentsRequest. */ - interface IExportDocumentsRequest { + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); - /** ExportDocumentsRequest name */ - name?: (string|null); + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - /** ExportDocumentsRequest collectionIds */ - collectionIds?: (string[]|null); + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ExportDocumentsRequest outputUriPrefix */ - outputUriPrefix?: (string|null); - } + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents an ExportDocumentsRequest. */ - class ExportDocumentsRequest implements IExportDocumentsRequest { + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Constructs a new ExportDocumentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IExportDocumentsRequest); + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { - /** ExportDocumentsRequest name. */ - public name: string; + /** MethodDescriptorProto name */ + name?: (string|null); - /** ExportDocumentsRequest collectionIds. */ - public collectionIds: string[]; + /** MethodDescriptorProto inputType */ + inputType?: (string|null); - /** ExportDocumentsRequest outputUriPrefix. */ - public outputUriPrefix: string; + /** MethodDescriptorProto outputType */ + outputType?: (string|null); - /** - * Creates an ExportDocumentsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportDocumentsRequest - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ExportDocumentsRequest; + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); - /** - * Creates a plain object from an ExportDocumentsRequest message. Also converts values to other types if specified. - * @param message ExportDocumentsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.ExportDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); - /** - * Converts this ExportDocumentsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } - /** Properties of an ImportDocumentsRequest. */ - interface IImportDocumentsRequest { + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { - /** ImportDocumentsRequest name */ - name?: (string|null); + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); - /** ImportDocumentsRequest collectionIds */ - collectionIds?: (string[]|null); + /** MethodDescriptorProto name. */ + public name: string; - /** ImportDocumentsRequest inputUriPrefix */ - inputUriPrefix?: (string|null); - } + /** MethodDescriptorProto inputType. */ + public inputType: string; - /** Represents an ImportDocumentsRequest. */ - class ImportDocumentsRequest implements IImportDocumentsRequest { + /** MethodDescriptorProto outputType. */ + public outputType: string; - /** - * Constructs a new ImportDocumentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IImportDocumentsRequest); + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); - /** ImportDocumentsRequest name. */ - public name: string; + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; - /** ImportDocumentsRequest collectionIds. */ - public collectionIds: string[]; + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; - /** ImportDocumentsRequest inputUriPrefix. */ - public inputUriPrefix: string; + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - /** - * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportDocumentsRequest - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ImportDocumentsRequest; + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. - * @param message ImportDocumentsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.ImportDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this ImportDocumentsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of an Index. */ - interface IIndex { + /** Properties of a FileOptions. */ + interface IFileOptions { - /** Index name */ - name?: (string|null); + /** FileOptions javaPackage */ + javaPackage?: (string|null); - /** Index queryScope */ - queryScope?: (google.firestore.admin.v1.Index.QueryScope|null); + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); - /** Index fields */ - fields?: (google.firestore.admin.v1.Index.IIndexField[]|null); + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); - /** Index state */ - state?: (google.firestore.admin.v1.Index.State|null); - } + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); - /** Represents an Index. */ - class Index implements IIndex { + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); - /** - * Constructs a new Index. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IIndex); + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); - /** Index name. */ - public name: string; + /** FileOptions goPackage */ + goPackage?: (string|null); - /** Index queryScope. */ - public queryScope: google.firestore.admin.v1.Index.QueryScope; + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); - /** Index fields. */ - public fields: google.firestore.admin.v1.Index.IIndexField[]; + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); - /** Index state. */ - public state: google.firestore.admin.v1.Index.State; + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); - /** - * 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; + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); - /** - * 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 }; + /** FileOptions deprecated */ + deprecated?: (boolean|null); - /** - * Converts this Index to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); - namespace Index { + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); - /** QueryScope enum. */ - type QueryScope = - "QUERY_SCOPE_UNSPECIFIED"| "COLLECTION"| "COLLECTION_GROUP"; + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); - /** Properties of an IndexField. */ - interface IIndexField { + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); - /** IndexField fieldPath */ - fieldPath?: (string|null); + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); - /** IndexField order */ - order?: (google.firestore.admin.v1.Index.IndexField.Order|null); + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); - /** IndexField arrayConfig */ - arrayConfig?: (google.firestore.admin.v1.Index.IndexField.ArrayConfig|null); - } + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); - /** Represents an IndexField. */ - class IndexField implements IIndexField { + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); - /** - * Constructs a new IndexField. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.Index.IIndexField); + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** IndexField fieldPath. */ - public fieldPath: string; + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } - /** IndexField order. */ - public order?: (google.firestore.admin.v1.Index.IndexField.Order|null); + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { - /** IndexField arrayConfig. */ - public arrayConfig?: (google.firestore.admin.v1.Index.IndexField.ArrayConfig|null); + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); - /** IndexField valueMode. */ - public valueMode?: ("order"|"arrayConfig"); + /** FileOptions javaPackage. */ + public javaPackage: string; - /** - * 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; + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; - /** - * 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 }; + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; - /** - * Converts this IndexField to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; - namespace IndexField { + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; - /** Order enum. */ - type Order = - "ORDER_UNSPECIFIED"| "ASCENDING"| "DESCENDING"; + /** FileOptions optimizeFor. */ + public optimizeFor: google.protobuf.FileOptions.OptimizeMode; - /** ArrayConfig enum. */ - type ArrayConfig = - "ARRAY_CONFIG_UNSPECIFIED"| "CONTAINS"; - } + /** FileOptions goPackage. */ + public goPackage: string; - /** State enum. */ - type State = - "STATE_UNSPECIFIED"| "CREATING"| "READY"| "NEEDS_REPAIR"; - } + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; - /** Properties of a LocationMetadata. */ - interface ILocationMetadata { - } + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; - /** Represents a LocationMetadata. */ - class LocationMetadata implements ILocationMetadata { + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; - /** - * Constructs a new LocationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.ILocationMetadata); + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; - /** - * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.LocationMetadata; + /** FileOptions deprecated. */ + public deprecated: boolean; - /** - * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. - * @param message LocationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.LocationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; - /** - * Converts this LocationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; - /** Properties of an IndexOperationMetadata. */ - interface IIndexOperationMetadata { + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; - /** IndexOperationMetadata startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; - /** IndexOperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; - /** IndexOperationMetadata index */ - index?: (string|null); + /** FileOptions phpNamespace. */ + public phpNamespace: string; - /** IndexOperationMetadata state */ - state?: (google.firestore.admin.v1.OperationState|null); + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; - /** IndexOperationMetadata progressDocuments */ - progressDocuments?: (google.firestore.admin.v1.IProgress|null); + /** FileOptions rubyPackage. */ + public rubyPackage: string; - /** IndexOperationMetadata progressBytes */ - progressBytes?: (google.firestore.admin.v1.IProgress|null); - } + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** Represents an IndexOperationMetadata. */ - class IndexOperationMetadata implements IIndexOperationMetadata { + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - /** - * Constructs a new IndexOperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IIndexOperationMetadata); + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** IndexOperationMetadata startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** IndexOperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** IndexOperationMetadata index. */ - public index: string; + namespace FileOptions { - /** IndexOperationMetadata state. */ - public state: google.firestore.admin.v1.OperationState; + /** OptimizeMode enum. */ + type OptimizeMode = + "SPEED"| "CODE_SIZE"| "LITE_RUNTIME"; + } - /** IndexOperationMetadata progressDocuments. */ - public progressDocuments?: (google.firestore.admin.v1.IProgress|null); + /** Properties of a MessageOptions. */ + interface IMessageOptions { - /** IndexOperationMetadata progressBytes. */ - public progressBytes?: (google.firestore.admin.v1.IProgress|null); + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); - /** - * Creates an IndexOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IndexOperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.IndexOperationMetadata; + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); - /** - * Creates a plain object from an IndexOperationMetadata message. Also converts values to other types if specified. - * @param message IndexOperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.IndexOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MessageOptions deprecated */ + deprecated?: (boolean|null); - /** - * Converts this IndexOperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); - /** Properties of a FieldOperationMetadata. */ - interface IFieldOperationMetadata { + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** FieldOperationMetadata startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } - /** FieldOperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { - /** FieldOperationMetadata field */ - field?: (string|null); + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); - /** FieldOperationMetadata indexConfigDeltas */ - indexConfigDeltas?: (google.firestore.admin.v1.FieldOperationMetadata.IIndexConfigDelta[]|null); + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; - /** FieldOperationMetadata state */ - state?: (google.firestore.admin.v1.OperationState|null); + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; - /** FieldOperationMetadata progressDocuments */ - progressDocuments?: (google.firestore.admin.v1.IProgress|null); + /** MessageOptions deprecated. */ + public deprecated: boolean; - /** FieldOperationMetadata progressBytes */ - progressBytes?: (google.firestore.admin.v1.IProgress|null); + /** MessageOptions mapEntry. */ + public mapEntry: boolean; - /** FieldOperationMetadata ttlConfigDelta */ - ttlConfigDelta?: (google.firestore.admin.v1.FieldOperationMetadata.ITtlConfigDelta|null); - } + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** Represents a FieldOperationMetadata. */ - class FieldOperationMetadata implements IFieldOperationMetadata { + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - /** - * Constructs a new FieldOperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IFieldOperationMetadata); + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldOperationMetadata startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FieldOperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FieldOperationMetadata field. */ - public field: string; + /** Properties of a FieldOptions. */ + interface IFieldOptions { - /** FieldOperationMetadata indexConfigDeltas. */ - public indexConfigDeltas: google.firestore.admin.v1.FieldOperationMetadata.IIndexConfigDelta[]; + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|null); - /** FieldOperationMetadata state. */ - public state: google.firestore.admin.v1.OperationState; + /** FieldOptions packed */ + packed?: (boolean|null); - /** FieldOperationMetadata progressDocuments. */ - public progressDocuments?: (google.firestore.admin.v1.IProgress|null); + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|null); - /** FieldOperationMetadata progressBytes. */ - public progressBytes?: (google.firestore.admin.v1.IProgress|null); + /** FieldOptions lazy */ + lazy?: (boolean|null); - /** FieldOperationMetadata ttlConfigDelta. */ - public ttlConfigDelta?: (google.firestore.admin.v1.FieldOperationMetadata.ITtlConfigDelta|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); - /** - * Creates a FieldOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOperationMetadata - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.FieldOperationMetadata; + /** FieldOptions deprecated */ + deprecated?: (boolean|null); - /** - * Creates a plain object from a FieldOperationMetadata message. Also converts values to other types if specified. - * @param message FieldOperationMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.FieldOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FieldOptions weak */ + weak?: (boolean|null); - /** - * Converts this FieldOperationMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - namespace FieldOperationMetadata { + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - /** Properties of an IndexConfigDelta. */ - interface IIndexConfigDelta { + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } - /** IndexConfigDelta changeType */ - changeType?: (google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType|null); + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { - /** IndexConfigDelta index */ - index?: (google.firestore.admin.v1.IIndex|null); - } + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); - /** Represents an IndexConfigDelta. */ - class IndexConfigDelta implements IIndexConfigDelta { + /** FieldOptions ctype. */ + public ctype: google.protobuf.FieldOptions.CType; - /** - * Constructs a new IndexConfigDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.FieldOperationMetadata.IIndexConfigDelta); + /** FieldOptions packed. */ + public packed: boolean; - /** IndexConfigDelta changeType. */ - public changeType: google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType; + /** FieldOptions jstype. */ + public jstype: google.protobuf.FieldOptions.JSType; - /** IndexConfigDelta index. */ - public index?: (google.firestore.admin.v1.IIndex|null); + /** FieldOptions lazy. */ + public lazy: boolean; - /** - * Creates an IndexConfigDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IndexConfigDelta - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta; + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; - /** - * Creates a plain object from an IndexConfigDelta message. Also converts values to other types if specified. - * @param message IndexConfigDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FieldOptions deprecated. */ + public deprecated: boolean; - /** - * Converts this IndexConfigDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FieldOptions weak. */ + public weak: boolean; - namespace IndexConfigDelta { + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** ChangeType enum. */ - type ChangeType = - "CHANGE_TYPE_UNSPECIFIED"| "ADD"| "REMOVE"; - } + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - /** Properties of a TtlConfigDelta. */ - interface ITtlConfigDelta { + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** TtlConfigDelta changeType */ - changeType?: (google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType|null); - } + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a TtlConfigDelta. */ - class TtlConfigDelta implements ITtlConfigDelta { + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Constructs a new TtlConfigDelta. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.FieldOperationMetadata.ITtlConfigDelta); + namespace FieldOptions { - /** TtlConfigDelta changeType. */ - public changeType: google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType; + /** CType enum. */ + type CType = + "STRING"| "CORD"| "STRING_PIECE"; - /** - * Creates a TtlConfigDelta message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TtlConfigDelta - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta; + /** JSType enum. */ + type JSType = + "JS_NORMAL"| "JS_STRING"| "JS_NUMBER"; + } - /** - * Creates a plain object from a TtlConfigDelta message. Also converts values to other types if specified. - * @param message TtlConfigDelta - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TtlConfigDelta to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of an OneofOptions. */ + interface IOneofOptions { - namespace TtlConfigDelta { + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** ChangeType enum. */ - type ChangeType = - "CHANGE_TYPE_UNSPECIFIED"| "ADD"| "REMOVE"; - } - } + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { - /** Properties of an ExportDocumentsMetadata. */ - interface IExportDocumentsMetadata { + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); - /** ExportDocumentsMetadata startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** ExportDocumentsMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - /** ExportDocumentsMetadata operationState */ - operationState?: (google.firestore.admin.v1.OperationState|null); + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ExportDocumentsMetadata progressDocuments */ - progressDocuments?: (google.firestore.admin.v1.IProgress|null); + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ExportDocumentsMetadata progressBytes */ - progressBytes?: (google.firestore.admin.v1.IProgress|null); + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ExportDocumentsMetadata collectionIds */ - collectionIds?: (string[]|null); + /** Properties of an EnumOptions. */ + interface IEnumOptions { - /** ExportDocumentsMetadata outputUriPrefix */ - outputUriPrefix?: (string|null); - } + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); - /** Represents an ExportDocumentsMetadata. */ - class ExportDocumentsMetadata implements IExportDocumentsMetadata { + /** EnumOptions deprecated */ + deprecated?: (boolean|null); - /** - * Constructs a new ExportDocumentsMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IExportDocumentsMetadata); + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** ExportDocumentsMetadata startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { - /** ExportDocumentsMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); - /** ExportDocumentsMetadata operationState. */ - public operationState: google.firestore.admin.v1.OperationState; + /** EnumOptions allowAlias. */ + public allowAlias: boolean; - /** ExportDocumentsMetadata progressDocuments. */ - public progressDocuments?: (google.firestore.admin.v1.IProgress|null); + /** EnumOptions deprecated. */ + public deprecated: boolean; - /** ExportDocumentsMetadata progressBytes. */ - public progressBytes?: (google.firestore.admin.v1.IProgress|null); + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** ExportDocumentsMetadata collectionIds. */ - public collectionIds: string[]; + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - /** ExportDocumentsMetadata outputUriPrefix. */ - public outputUriPrefix: string; + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates an ExportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportDocumentsMetadata - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ExportDocumentsMetadata; + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from an ExportDocumentsMetadata message. Also converts values to other types if specified. - * @param message ExportDocumentsMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.ExportDocumentsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this ExportDocumentsMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { - /** Properties of an ImportDocumentsMetadata. */ - interface IImportDocumentsMetadata { + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); - /** ImportDocumentsMetadata startTime */ - startTime?: (google.protobuf.ITimestamp|null); + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } - /** ImportDocumentsMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { - /** ImportDocumentsMetadata operationState */ - operationState?: (google.firestore.admin.v1.OperationState|null); + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); - /** ImportDocumentsMetadata progressDocuments */ - progressDocuments?: (google.firestore.admin.v1.IProgress|null); + /** EnumValueOptions deprecated. */ + public deprecated: boolean; - /** ImportDocumentsMetadata progressBytes */ - progressBytes?: (google.firestore.admin.v1.IProgress|null); + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** ImportDocumentsMetadata collectionIds */ - collectionIds?: (string[]|null); + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - /** ImportDocumentsMetadata inputUriPrefix */ - inputUriPrefix?: (string|null); - } + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents an ImportDocumentsMetadata. */ - class ImportDocumentsMetadata implements IImportDocumentsMetadata { + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new ImportDocumentsMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IImportDocumentsMetadata); + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ImportDocumentsMetadata startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); + /** Properties of a ServiceOptions. */ + interface IServiceOptions { - /** ImportDocumentsMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); - /** ImportDocumentsMetadata operationState. */ - public operationState: google.firestore.admin.v1.OperationState; + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** ImportDocumentsMetadata progressDocuments. */ - public progressDocuments?: (google.firestore.admin.v1.IProgress|null); + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); - /** ImportDocumentsMetadata progressBytes. */ - public progressBytes?: (google.firestore.admin.v1.IProgress|null); + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } - /** ImportDocumentsMetadata collectionIds. */ - public collectionIds: string[]; + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { - /** ImportDocumentsMetadata inputUriPrefix. */ - public inputUriPrefix: string; + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); - /** - * Creates an ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImportDocumentsMetadata - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ImportDocumentsMetadata; + /** ServiceOptions deprecated. */ + public deprecated: boolean; - /** - * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified. - * @param message ImportDocumentsMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.ImportDocumentsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImportDocumentsMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** Properties of an ExportDocumentsResponse. */ - interface IExportDocumentsResponse { - - /** ExportDocumentsResponse outputUriPrefix */ - outputUriPrefix?: (string|null); - } - - /** Represents an ExportDocumentsResponse. */ - class ExportDocumentsResponse implements IExportDocumentsResponse { - - /** - * Constructs a new ExportDocumentsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IExportDocumentsResponse); - - /** ExportDocumentsResponse outputUriPrefix. */ - public outputUriPrefix: string; - - /** - * Creates an ExportDocumentsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExportDocumentsResponse - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ExportDocumentsResponse; - - /** - * Creates a plain object from an ExportDocumentsResponse message. Also converts values to other types if specified. - * @param message ExportDocumentsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.ExportDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExportDocumentsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - - /** OperationState enum. */ - type OperationState = - "OPERATION_STATE_UNSPECIFIED"| "INITIALIZING"| "PROCESSING"| "CANCELLING"| "FINALIZING"| "SUCCESSFUL"| "FAILED"| "CANCELLED"; - - /** Properties of a Progress. */ - interface IProgress { - - /** Progress estimatedWork */ - estimatedWork?: (number|string|null); + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - /** Progress completedWork */ - completedWork?: (number|string|null); - } + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - /** Represents a Progress. */ - class Progress implements IProgress { + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new Progress. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.admin.v1.IProgress); + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Progress estimatedWork. */ - public estimatedWork: (number|string); + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Progress completedWork. */ - public completedWork: (number|string); + /** Properties of a MethodOptions. */ + interface IMethodOptions { - /** - * Creates a Progress message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Progress - */ - public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Progress; + /** MethodOptions deprecated */ + deprecated?: (boolean|null); - /** - * Creates a plain object from a Progress message. Also converts values to other types if specified. - * @param message Progress - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.admin.v1.Progress, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); - /** - * Converts this Progress to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - } - } + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** Namespace api. */ - namespace api { + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); - /** Properties of a Http. */ - interface IHttp { + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); } - /** Represents a Http. */ - class Http implements IHttp { + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { /** - * Constructs a new Http. + * Constructs a new MethodOptions. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttp); + constructor(properties?: google.protobuf.IMethodOptions); - /** Http rules. */ - public rules: google.api.IHttpRule[]; + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Http + * @returns MethodOptions */ - public static fromObject(object: { [k: string]: any }): google.api.Http; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Http to JSON. + * Converts this MethodOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a HttpRule. */ - interface IHttpRule { + namespace MethodOptions { - /** HttpRule get */ - get?: (string|null); + /** IdempotencyLevel enum. */ + type IdempotencyLevel = + "IDEMPOTENCY_UNKNOWN"| "NO_SIDE_EFFECTS"| "IDEMPOTENT"; + } - /** HttpRule put */ - put?: (string|null); + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { - /** HttpRule post */ - post?: (string|null); + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - /** HttpRule delete */ - "delete"?: (string|null); + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); - /** HttpRule patch */ - patch?: (string|null); + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|string|null); - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|string|null); - /** HttpRule selector */ - selector?: (string|null); + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); - /** HttpRule body */ - body?: (string|null); + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|null); - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); } - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { /** - * Constructs a new HttpRule. + * Constructs a new UninterpretedOption. * @param [properties] Properties to set */ - constructor(properties?: google.api.IHttpRule); + constructor(properties?: google.protobuf.IUninterpretedOption); - /** HttpRule get. */ - public get?: (string|null); + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; - /** HttpRule put. */ - public put?: (string|null); + /** UninterpretedOption identifierValue. */ + public identifierValue: string; - /** HttpRule post. */ - public post?: (string|null); + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|string); - /** HttpRule delete. */ - public delete?: (string|null); + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|string); - /** HttpRule patch. */ - public patch?: (string|null); + /** UninterpretedOption doubleValue. */ + public doubleValue: number; - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); + /** UninterpretedOption stringValue. */ + public stringValue: Uint8Array; - /** HttpRule selector. */ - public selector: string; + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; - /** HttpRule body. */ - public body: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this HttpRule to JSON. + * Converts this UninterpretedOption to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { + namespace UninterpretedOption { - /** CustomHttpPattern kind */ - kind?: (string|null); + /** Properties of a NamePart. */ + interface INamePart { - /** CustomHttpPattern path */ - path?: (string|null); + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { /** - * Constructs a new CustomHttpPattern. + * Constructs a new SourceCodeInfo. * @param [properties] Properties to set */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; + constructor(properties?: google.protobuf.ISourceCodeInfo); - /** CustomHttpPattern path. */ - public path: string; + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CustomHttpPattern + * @returns SourceCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this SourceCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** FieldBehavior enum. */ - type FieldBehavior = - "FIELD_BEHAVIOR_UNSPECIFIED"| "OPTIONAL"| "REQUIRED"| "OUTPUT_ONLY"| "INPUT_ONLY"| "IMMUTABLE"| "UNORDERED_LIST"| "NON_EMPTY_DEFAULT"; + namespace SourceCodeInfo { - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { + /** Properties of a Location. */ + interface ILocation { - /** ResourceDescriptor type */ - type?: (string|null); + /** Location path */ + path?: (number[]|null); - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); + /** Location span */ + span?: (number[]|null); - /** ResourceDescriptor nameField */ - nameField?: (string|null); + /** Location leadingComments */ + leadingComments?: (string|null); - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|null); + /** Location trailingComments */ + trailingComments?: (string|null); - /** ResourceDescriptor plural */ - plural?: (string|null); + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } - /** ResourceDescriptor singular */ - singular?: (string|null); + /** Represents a Location. */ + class Location implements ILocation { - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** Location path. */ + public path: number[]; - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); + /** Location span. */ + public span: number[]; - /** ResourceDescriptor type. */ - public type: string; + /** Location leadingComments. */ + public leadingComments: string; - /** ResourceDescriptor pattern. */ - public pattern: string[]; + /** Location trailingComments. */ + public trailingComments: string; - /** ResourceDescriptor nameField. */ - public nameField: string; + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; - /** ResourceDescriptor history. */ - public history: google.api.ResourceDescriptor.History; + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - /** ResourceDescriptor plural. */ - public plural: string; + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ResourceDescriptor singular. */ - public singular: string; + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceDescriptor + * @returns GeneratedCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this GeneratedCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace ResourceDescriptor { + namespace GeneratedCodeInfo { - /** History enum. */ - type History = - "HISTORY_UNSPECIFIED"| "ORIGINALLY_SINGLE_PATTERN"| "FUTURE_MULTI_PATTERN"; + /** Properties of an Annotation. */ + interface IAnnotation { - /** Style enum. */ - type Style = - "STYLE_UNSPECIFIED"| "DECLARATIVE_FRIENDLY"; - } + /** Annotation path */ + path?: (number[]|null); - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** Annotation sourceFile */ + sourceFile?: (string|null); - /** ResourceReference type */ - type?: (string|null); + /** Annotation begin */ + begin?: (number|null); - /** ResourceReference childType */ - childType?: (string|null); - } + /** Annotation end */ + end?: (number|null); - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); + /** Represents an Annotation. */ + class Annotation implements IAnnotation { - /** ResourceReference type. */ - public type: string; + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - /** ResourceReference childType. */ - public childType: string; + /** Annotation path. */ + public path: number[]; - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + /** Annotation sourceFile. */ + public sourceFile: string; - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Annotation begin. */ + public begin: number; - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** Annotation end. */ + public end: number; - /** Namespace protobuf. */ - namespace protobuf { + /** Annotation semantic. */ + public semantic: google.protobuf.GeneratedCodeInfo.Annotation.Semantic; - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + type Semantic = + "NONE"| "SET"| "ALIAS"; + } } - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { + /** Properties of a Struct. */ + interface IStruct { + + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); + } + + /** Represents a Struct. */ + class Struct implements IStruct { /** - * Constructs a new FileDescriptorSet. + * Constructs a new Struct. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFileDescriptorSet); + constructor(properties?: google.protobuf.IStruct); - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorSet + * @returns Struct */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorSet to JSON. + * Converts this Struct to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); + /** + * Gets the default type url for Struct + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); + /** Properties of a Value. */ + interface IValue { - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|null); - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); + /** Value numberValue */ + numberValue?: (number|null); - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** Value stringValue */ + stringValue?: (string|null); - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); + /** Value boolValue */ + boolValue?: (boolean|null); - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); - /** FileDescriptorProto syntax */ - syntax?: (string|null); + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); } - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { + /** Represents a Value. */ + class Value implements IValue { /** - * Constructs a new FileDescriptorProto. + * Constructs a new Value. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; + constructor(properties?: google.protobuf.IValue); - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; + /** Value nullValue. */ + public nullValue?: (google.protobuf.NullValue|null); - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** Value numberValue. */ + public numberValue?: (number|null); - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; + /** Value stringValue. */ + public stringValue?: (string|null); - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** Value boolValue. */ + public boolValue?: (boolean|null); - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); - /** FileDescriptorProto syntax. */ - public syntax: string; + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorProto + * @returns Value */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorProto to JSON. + * Converts this Value to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { + /** NullValue enum. */ + type NullValue = + "NULL_VALUE"; - /** DescriptorProto name */ - name?: (string|null); + /** Properties of a ListValue. */ + interface IListValue { - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); + } - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** Represents a ListValue. */ + class ListValue implements IListValue { - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); + /** + * Constructs a new ListValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IListValue); - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** ListValue values. */ + public values: google.protobuf.IValue[]; - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + /** + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + /** + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); + /** + * Converts this ListValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + /** + * Gets the default type url for ListValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); + /** Properties of a DoubleValue. */ + interface IDoubleValue { + + /** DoubleValue value */ + value?: (number|null); } - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { /** - * Constructs a new DescriptorProto. + * Constructs a new DoubleValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDescriptorProto); + constructor(properties?: google.protobuf.IDoubleValue); - /** DescriptorProto name. */ - public name: string; + /** DoubleValue value. */ + public value: number; - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; + /** + * Converts this DoubleValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** + * Gets the default type url for DoubleValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + /** Properties of a FloatValue. */ + interface IFloatValue { - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + /** FloatValue value */ + value?: (number|null); + } - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + /** + * Constructs a new FloatValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFloatValue); - /** DescriptorProto reservedName. */ - public reservedName: string[]; + /** FloatValue value. */ + public value: number; /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DescriptorProto + * @returns FloatValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DescriptorProto to JSON. + * Converts this FloatValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - namespace DescriptorProto { + /** + * Gets the default type url for FloatValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of an ExtensionRange. */ - interface IExtensionRange { + /** Properties of an Int64Value. */ + interface IInt64Value { - /** ExtensionRange start */ - start?: (number|null); + /** Int64Value value */ + value?: (number|string|null); + } - /** ExtensionRange end */ - end?: (number|null); - } + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + /** Int64Value value. */ + public value: (number|string); - /** ExtensionRange start. */ - public start: number; + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; - /** ExtensionRange end. */ - public end: number; + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for Int64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of a UInt64Value. */ + interface IUInt64Value { - /** Properties of a ReservedRange. */ - interface IReservedRange { + /** UInt64Value value */ + value?: (number|string|null); + } - /** ReservedRange start */ - start?: (number|null); + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { - /** ReservedRange end */ - end?: (number|null); - } + /** + * Constructs a new UInt64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt64Value); - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { + /** UInt64Value value. */ + public value: (number|string); - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; - /** ReservedRange start. */ - public start: number; + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ReservedRange end. */ - public end: number; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Gets the default type url for UInt64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { + /** Properties of an Int32Value. */ + interface IInt32Value { - /** FieldDescriptorProto name */ - name?: (string|null); + /** Int32Value value */ + value?: (number|null); + } - /** FieldDescriptorProto number */ - number?: (number|null); + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|null); + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|null); + /** Int32Value value. */ + public value: number; - /** FieldDescriptorProto typeName */ - typeName?: (string|null); + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; - /** FieldDescriptorProto extendee */ - extendee?: (string|null); + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); + /** Properties of a UInt32Value. */ + interface IUInt32Value { - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); + /** UInt32Value value */ + value?: (number|null); } - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { /** - * Constructs a new FieldDescriptorProto. + * Constructs a new UInt32Value. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); + constructor(properties?: google.protobuf.IUInt32Value); - /** FieldDescriptorProto name. */ - public name: string; + /** UInt32Value value. */ + public value: number; - /** FieldDescriptorProto number. */ - public number: number; + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; - /** FieldDescriptorProto label. */ - public label: google.protobuf.FieldDescriptorProto.Label; + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldDescriptorProto type. */ - public type: google.protobuf.FieldDescriptorProto.Type; + /** + * Converts this UInt32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FieldDescriptorProto typeName. */ - public typeName: string; + /** + * Gets the default type url for UInt32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FieldDescriptorProto extendee. */ - public extendee: string; + /** Properties of a BoolValue. */ + interface IBoolValue { - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; + /** BoolValue value */ + value?: (boolean|null); + } - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { - /** FieldDescriptorProto jsonName. */ - public jsonName: string; + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); + /** BoolValue value. */ + public value: boolean; /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldDescriptorProto + * @returns BoolValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldDescriptorProto to JSON. + * Converts this BoolValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - type Type = - "TYPE_DOUBLE"| "TYPE_FLOAT"| "TYPE_INT64"| "TYPE_UINT64"| "TYPE_INT32"| "TYPE_FIXED64"| "TYPE_FIXED32"| "TYPE_BOOL"| "TYPE_STRING"| "TYPE_GROUP"| "TYPE_MESSAGE"| "TYPE_BYTES"| "TYPE_UINT32"| "TYPE_ENUM"| "TYPE_SFIXED32"| "TYPE_SFIXED64"| "TYPE_SINT32"| "TYPE_SINT64"; - /** Label enum. */ - type Label = - "LABEL_OPTIONAL"| "LABEL_REQUIRED"| "LABEL_REPEATED"; + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); + /** Properties of a StringValue. */ + interface IStringValue { - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); + /** StringValue value */ + value?: (string|null); } - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { + /** Represents a StringValue. */ + class StringValue implements IStringValue { /** - * Constructs a new OneofDescriptorProto. + * Constructs a new StringValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; + constructor(properties?: google.protobuf.IStringValue); - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); + /** StringValue value. */ + public value: string; /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneofDescriptorProto + * @returns StringValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneofDescriptorProto to JSON. + * Converts this StringValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - /** EnumDescriptorProto name */ - name?: (string|null); + /** + * Gets the default type url for StringValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + /** Properties of a BytesValue. */ + interface IBytesValue { - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); + /** BytesValue value */ + value?: (Uint8Array|null); } - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { /** - * Constructs a new EnumDescriptorProto. + * Constructs a new BytesValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; + constructor(properties?: google.protobuf.IBytesValue); - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); + /** BytesValue value. */ + public value: Uint8Array; /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumDescriptorProto + * @returns BytesValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BytesValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BytesValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace firestore. */ + namespace firestore { + + /** Namespace admin. */ + namespace admin { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a Database. */ + interface IDatabase { + + /** Database name */ + name?: (string|null); + + /** Database locationId */ + locationId?: (string|null); + + /** Database type */ + type?: (google.firestore.admin.v1.Database.DatabaseType|null); + + /** Database concurrencyMode */ + concurrencyMode?: (google.firestore.admin.v1.Database.ConcurrencyMode|null); + + /** Database appEngineIntegrationMode */ + appEngineIntegrationMode?: (google.firestore.admin.v1.Database.AppEngineIntegrationMode|null); + + /** Database keyPrefix */ + keyPrefix?: (string|null); + + /** Database etag */ + etag?: (string|null); + } + + /** Represents a Database. */ + class Database implements IDatabase { + + /** + * Constructs a new Database. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IDatabase); + + /** Database name. */ + public name: string; + + /** Database locationId. */ + public locationId: string; + + /** Database type. */ + public type: google.firestore.admin.v1.Database.DatabaseType; + + /** Database concurrencyMode. */ + public concurrencyMode: google.firestore.admin.v1.Database.ConcurrencyMode; + + /** Database appEngineIntegrationMode. */ + public appEngineIntegrationMode: google.firestore.admin.v1.Database.AppEngineIntegrationMode; + + /** Database keyPrefix. */ + public keyPrefix: string; + + /** 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"; + + /** AppEngineIntegrationMode enum. */ + type AppEngineIntegrationMode = + "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED"| "ENABLED"| "DISABLED"; + } + + /** 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"; + } + } + + /** Represents a FirestoreAdmin */ + class FirestoreAdmin extends $protobuf.rpc.Service { + + /** + * Constructs a new FirestoreAdmin service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Calls CreateIndex. + * @param request CreateIndexRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createIndex(request: google.firestore.admin.v1.ICreateIndexRequest, callback: google.firestore.admin.v1.FirestoreAdmin.CreateIndexCallback): void; + + /** + * Calls CreateIndex. + * @param request CreateIndexRequest message or plain object + * @returns Promise + */ + public createIndex(request: google.firestore.admin.v1.ICreateIndexRequest): Promise; + + /** + * Calls ListIndexes. + * @param request ListIndexesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListIndexesResponse + */ + public listIndexes(request: google.firestore.admin.v1.IListIndexesRequest, callback: google.firestore.admin.v1.FirestoreAdmin.ListIndexesCallback): void; + + /** + * Calls ListIndexes. + * @param request ListIndexesRequest message or plain object + * @returns Promise + */ + public listIndexes(request: google.firestore.admin.v1.IListIndexesRequest): Promise; + + /** + * Calls GetIndex. + * @param request GetIndexRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Index + */ + public getIndex(request: google.firestore.admin.v1.IGetIndexRequest, callback: google.firestore.admin.v1.FirestoreAdmin.GetIndexCallback): void; + + /** + * Calls GetIndex. + * @param request GetIndexRequest message or plain object + * @returns Promise + */ + public getIndex(request: google.firestore.admin.v1.IGetIndexRequest): Promise; + + /** + * Calls DeleteIndex. + * @param request DeleteIndexRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteIndex(request: google.firestore.admin.v1.IDeleteIndexRequest, callback: google.firestore.admin.v1.FirestoreAdmin.DeleteIndexCallback): void; + + /** + * Calls DeleteIndex. + * @param request DeleteIndexRequest message or plain object + * @returns Promise + */ + public deleteIndex(request: google.firestore.admin.v1.IDeleteIndexRequest): Promise; + + /** + * Calls GetField. + * @param request GetFieldRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Field + */ + public getField(request: google.firestore.admin.v1.IGetFieldRequest, callback: google.firestore.admin.v1.FirestoreAdmin.GetFieldCallback): void; + + /** + * Calls GetField. + * @param request GetFieldRequest message or plain object + * @returns Promise + */ + public getField(request: google.firestore.admin.v1.IGetFieldRequest): Promise; + + /** + * Calls UpdateField. + * @param request UpdateFieldRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateField(request: google.firestore.admin.v1.IUpdateFieldRequest, callback: google.firestore.admin.v1.FirestoreAdmin.UpdateFieldCallback): void; + + /** + * Calls UpdateField. + * @param request UpdateFieldRequest message or plain object + * @returns Promise + */ + public updateField(request: google.firestore.admin.v1.IUpdateFieldRequest): Promise; + + /** + * Calls ListFields. + * @param request ListFieldsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFieldsResponse + */ + public listFields(request: google.firestore.admin.v1.IListFieldsRequest, callback: google.firestore.admin.v1.FirestoreAdmin.ListFieldsCallback): void; + + /** + * Calls ListFields. + * @param request ListFieldsRequest message or plain object + * @returns Promise + */ + public listFields(request: google.firestore.admin.v1.IListFieldsRequest): Promise; + + /** + * Calls ExportDocuments. + * @param request ExportDocumentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public exportDocuments(request: google.firestore.admin.v1.IExportDocumentsRequest, callback: google.firestore.admin.v1.FirestoreAdmin.ExportDocumentsCallback): void; + + /** + * Calls ExportDocuments. + * @param request ExportDocumentsRequest message or plain object + * @returns Promise + */ + public exportDocuments(request: google.firestore.admin.v1.IExportDocumentsRequest): Promise; + + /** + * Calls ImportDocuments. + * @param request ImportDocumentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public importDocuments(request: google.firestore.admin.v1.IImportDocumentsRequest, callback: google.firestore.admin.v1.FirestoreAdmin.ImportDocumentsCallback): void; + + /** + * Calls ImportDocuments. + * @param request ImportDocumentsRequest message or plain object + * @returns Promise + */ + 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 + * @param callback Node-style callback called with the error, if any, and Database + */ + public getDatabase(request: google.firestore.admin.v1.IGetDatabaseRequest, callback: google.firestore.admin.v1.FirestoreAdmin.GetDatabaseCallback): void; + + /** + * Calls GetDatabase. + * @param request GetDatabaseRequest message or plain object + * @returns Promise + */ + public getDatabase(request: google.firestore.admin.v1.IGetDatabaseRequest): Promise; + + /** + * Calls ListDatabases. + * @param request ListDatabasesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDatabasesResponse + */ + public listDatabases(request: google.firestore.admin.v1.IListDatabasesRequest, callback: google.firestore.admin.v1.FirestoreAdmin.ListDatabasesCallback): void; + + /** + * Calls ListDatabases. + * @param request ListDatabasesRequest message or plain object + * @returns Promise + */ + public listDatabases(request: google.firestore.admin.v1.IListDatabasesRequest): Promise; + + /** + * Calls UpdateDatabase. + * @param request UpdateDatabaseRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateDatabase(request: google.firestore.admin.v1.IUpdateDatabaseRequest, callback: google.firestore.admin.v1.FirestoreAdmin.UpdateDatabaseCallback): void; + + /** + * Calls UpdateDatabase. + * @param request UpdateDatabaseRequest message or plain object + * @returns Promise + */ + public updateDatabase(request: google.firestore.admin.v1.IUpdateDatabaseRequest): Promise; + } + + namespace FirestoreAdmin { + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#createIndex}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateIndexCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#listIndexes}. + * @param error Error, if any + * @param [response] ListIndexesResponse + */ + type ListIndexesCallback = (error: (Error|null), response?: google.firestore.admin.v1.ListIndexesResponse) => void; + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#getIndex}. + * @param error Error, if any + * @param [response] Index + */ + type GetIndexCallback = (error: (Error|null), response?: google.firestore.admin.v1.Index) => void; + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#deleteIndex}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteIndexCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#getField}. + * @param error Error, if any + * @param [response] Field + */ + type GetFieldCallback = (error: (Error|null), response?: google.firestore.admin.v1.Field) => void; + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#updateField}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateFieldCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#listFields}. + * @param error Error, if any + * @param [response] ListFieldsResponse + */ + type ListFieldsCallback = (error: (Error|null), response?: google.firestore.admin.v1.ListFieldsResponse) => void; + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#exportDocuments}. + * @param error Error, if any + * @param [response] Operation + */ + type ExportDocumentsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#importDocuments}. + * @param error Error, if any + * @param [response] Operation + */ + 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 + * @param [response] Database + */ + type GetDatabaseCallback = (error: (Error|null), response?: google.firestore.admin.v1.Database) => void; + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#listDatabases}. + * @param error Error, if any + * @param [response] ListDatabasesResponse + */ + type ListDatabasesCallback = (error: (Error|null), response?: google.firestore.admin.v1.ListDatabasesResponse) => void; + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#updateDatabase}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateDatabaseCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** Properties of a ListDatabasesRequest. */ + interface IListDatabasesRequest { + + /** ListDatabasesRequest parent */ + parent?: (string|null); + } + + /** Represents a ListDatabasesRequest. */ + class ListDatabasesRequest implements IListDatabasesRequest { + + /** + * Constructs a new ListDatabasesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IListDatabasesRequest); + + /** ListDatabasesRequest parent. */ + public parent: string; + + /** + * Creates a ListDatabasesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDatabasesRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ListDatabasesRequest; + + /** + * Creates a plain object from a ListDatabasesRequest message. Also converts values to other types if specified. + * @param message ListDatabasesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.ListDatabasesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDatabasesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Gets the default type url for ListDatabasesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { + /** Properties of a CreateDatabaseRequest. */ + interface ICreateDatabaseRequest { - /** EnumValueDescriptorProto name */ - name?: (string|null); + /** CreateDatabaseRequest parent */ + parent?: (string|null); - /** EnumValueDescriptorProto number */ - number?: (number|null); + /** CreateDatabaseRequest database */ + database?: (google.firestore.admin.v1.IDatabase|null); - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } + /** CreateDatabaseRequest databaseId */ + databaseId?: (string|null); + } - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + /** Represents a CreateDatabaseRequest. */ + class CreateDatabaseRequest implements ICreateDatabaseRequest { - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + /** + * Constructs a new CreateDatabaseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.ICreateDatabaseRequest); - /** EnumValueDescriptorProto name. */ - public name: string; + /** CreateDatabaseRequest parent. */ + public parent: string; - /** EnumValueDescriptorProto number. */ - public number: number; + /** CreateDatabaseRequest database. */ + public database?: (google.firestore.admin.v1.IDatabase|null); - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); + /** CreateDatabaseRequest databaseId. */ + public databaseId: string; - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + /** + * 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 an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * 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 EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this CreateDatabaseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { + /** + * 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; + } - /** ServiceDescriptorProto name */ - name?: (string|null); + /** Properties of a ListDatabasesResponse. */ + interface IListDatabasesResponse { - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); + /** ListDatabasesResponse databases */ + databases?: (google.firestore.admin.v1.IDatabase[]|null); + } - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } + /** Represents a ListDatabasesResponse. */ + class ListDatabasesResponse implements IListDatabasesResponse { - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { + /** + * Constructs a new ListDatabasesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IListDatabasesResponse); - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); + /** ListDatabasesResponse databases. */ + public databases: google.firestore.admin.v1.IDatabase[]; - /** ServiceDescriptorProto name. */ - public name: string; + /** + * Creates a ListDatabasesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDatabasesResponse + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ListDatabasesResponse; - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; + /** + * Creates a plain object from a ListDatabasesResponse message. Also converts values to other types if specified. + * @param message ListDatabasesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.ListDatabasesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); + /** + * Converts this ListDatabasesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + /** + * Gets the default type url for ListDatabasesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a GetDatabaseRequest. */ + interface IGetDatabaseRequest { - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** GetDatabaseRequest name */ + name?: (string|null); + } - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { + /** Represents a GetDatabaseRequest. */ + class GetDatabaseRequest implements IGetDatabaseRequest { - /** MethodDescriptorProto name */ - name?: (string|null); + /** + * Constructs a new GetDatabaseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IGetDatabaseRequest); - /** MethodDescriptorProto inputType */ - inputType?: (string|null); + /** GetDatabaseRequest name. */ + public name: string; - /** MethodDescriptorProto outputType */ - outputType?: (string|null); + /** + * Creates a GetDatabaseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDatabaseRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.GetDatabaseRequest; - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); + /** + * Creates a plain object from a GetDatabaseRequest message. Also converts values to other types if specified. + * @param message GetDatabaseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.GetDatabaseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); + /** + * Converts this GetDatabaseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } + /** + * Gets the default type url for GetDatabaseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { + /** Properties of an UpdateDatabaseRequest. */ + interface IUpdateDatabaseRequest { - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); + /** UpdateDatabaseRequest database */ + database?: (google.firestore.admin.v1.IDatabase|null); - /** MethodDescriptorProto name. */ - public name: string; + /** UpdateDatabaseRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** MethodDescriptorProto inputType. */ - public inputType: string; + /** Represents an UpdateDatabaseRequest. */ + class UpdateDatabaseRequest implements IUpdateDatabaseRequest { - /** MethodDescriptorProto outputType. */ - public outputType: string; + /** + * Constructs a new UpdateDatabaseRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IUpdateDatabaseRequest); - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); + /** UpdateDatabaseRequest database. */ + public database?: (google.firestore.admin.v1.IDatabase|null); - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; + /** UpdateDatabaseRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; + /** + * Creates an UpdateDatabaseRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDatabaseRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.UpdateDatabaseRequest; - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + /** + * Creates a plain object from an UpdateDatabaseRequest message. Also converts values to other types if specified. + * @param message UpdateDatabaseRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.UpdateDatabaseRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this UpdateDatabaseRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Gets the default type url for UpdateDatabaseRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of a FileOptions. */ - interface IFileOptions { + /** Properties of an UpdateDatabaseMetadata. */ + interface IUpdateDatabaseMetadata { + } - /** FileOptions javaPackage */ - javaPackage?: (string|null); + /** Represents an UpdateDatabaseMetadata. */ + class UpdateDatabaseMetadata implements IUpdateDatabaseMetadata { - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); + /** + * Constructs a new UpdateDatabaseMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IUpdateDatabaseMetadata); - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); + /** + * Creates an UpdateDatabaseMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDatabaseMetadata + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.UpdateDatabaseMetadata; - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); + /** + * Creates a plain object from an UpdateDatabaseMetadata message. Also converts values to other types if specified. + * @param message UpdateDatabaseMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.UpdateDatabaseMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); + /** + * Converts this UpdateDatabaseMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); + /** + * Gets the default type url for UpdateDatabaseMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FileOptions goPackage */ - goPackage?: (string|null); + /** Properties of a CreateIndexRequest. */ + interface ICreateIndexRequest { - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); + /** CreateIndexRequest parent */ + parent?: (string|null); - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); + /** CreateIndexRequest index */ + index?: (google.firestore.admin.v1.IIndex|null); + } - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); + /** Represents a CreateIndexRequest. */ + class CreateIndexRequest implements ICreateIndexRequest { - /** FileOptions deprecated */ - deprecated?: (boolean|null); + /** + * Constructs a new CreateIndexRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.ICreateIndexRequest); - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); + /** CreateIndexRequest parent. */ + public parent: string; - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); + /** CreateIndexRequest index. */ + public index?: (google.firestore.admin.v1.IIndex|null); - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); + /** + * Creates a CreateIndexRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateIndexRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.CreateIndexRequest; - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Creates a plain object from a CreateIndexRequest message. Also converts values to other types if specified. + * @param message CreateIndexRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.CreateIndexRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } + /** + * Converts this CreateIndexRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { + /** + * Gets the default type url for CreateIndexRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); + /** Properties of a ListIndexesRequest. */ + interface IListIndexesRequest { - /** FileOptions javaPackage. */ - public javaPackage: string; + /** ListIndexesRequest parent */ + parent?: (string|null); - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; + /** ListIndexesRequest filter */ + filter?: (string|null); - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; + /** ListIndexesRequest pageSize */ + pageSize?: (number|null); - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; + /** ListIndexesRequest pageToken */ + pageToken?: (string|null); + } - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; + /** Represents a ListIndexesRequest. */ + class ListIndexesRequest implements IListIndexesRequest { - /** FileOptions optimizeFor. */ - public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + /** + * Constructs a new ListIndexesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IListIndexesRequest); - /** FileOptions goPackage. */ - public goPackage: string; + /** ListIndexesRequest parent. */ + public parent: string; - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; + /** ListIndexesRequest filter. */ + public filter: string; - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; + /** ListIndexesRequest pageSize. */ + public pageSize: number; - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; + /** ListIndexesRequest pageToken. */ + public pageToken: string; - /** FileOptions deprecated. */ - public deprecated: boolean; + /** + * Creates a ListIndexesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListIndexesRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ListIndexesRequest; - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; + /** + * Creates a plain object from a ListIndexesRequest message. Also converts values to other types if specified. + * @param message ListIndexesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.ListIndexesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; + /** + * Converts this ListIndexesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; + /** + * Gets the default type url for ListIndexesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Properties of a ListIndexesResponse. */ + interface IListIndexesResponse { - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + /** ListIndexesResponse indexes */ + indexes?: (google.firestore.admin.v1.IIndex[]|null); - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ListIndexesResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Represents a ListIndexesResponse. */ + class ListIndexesResponse implements IListIndexesResponse { - namespace FileOptions { + /** + * Constructs a new ListIndexesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IListIndexesResponse); - /** OptimizeMode enum. */ - type OptimizeMode = - "SPEED"| "CODE_SIZE"| "LITE_RUNTIME"; - } + /** ListIndexesResponse indexes. */ + public indexes: google.firestore.admin.v1.IIndex[]; - /** Properties of a MessageOptions. */ - interface IMessageOptions { + /** ListIndexesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a ListIndexesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListIndexesResponse + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ListIndexesResponse; - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); + /** + * Creates a plain object from a ListIndexesResponse message. Also converts values to other types if specified. + * @param message ListIndexesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.ListIndexesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); + /** + * Converts this ListIndexesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** MessageOptions deprecated */ - deprecated?: (boolean|null); + /** + * Gets the default type url for ListIndexesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); + /** Properties of a GetIndexRequest. */ + interface IGetIndexRequest { - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** GetIndexRequest name */ + name?: (string|null); + } - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } + /** Represents a GetIndexRequest. */ + class GetIndexRequest implements IGetIndexRequest { - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { + /** + * Constructs a new GetIndexRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IGetIndexRequest); - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); + /** GetIndexRequest name. */ + public name: string; - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; + /** + * Creates a GetIndexRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetIndexRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.GetIndexRequest; - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; + /** + * Creates a plain object from a GetIndexRequest message. Also converts values to other types if specified. + * @param message GetIndexRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.GetIndexRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MessageOptions deprecated. */ - public deprecated: boolean; + /** + * Converts this GetIndexRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** MessageOptions mapEntry. */ - public mapEntry: boolean; + /** + * Gets the default type url for GetIndexRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Properties of a DeleteIndexRequest. */ + interface IDeleteIndexRequest { - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + /** DeleteIndexRequest name */ + name?: (string|null); + } - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a DeleteIndexRequest. */ + class DeleteIndexRequest implements IDeleteIndexRequest { - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new DeleteIndexRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IDeleteIndexRequest); - /** Properties of a FieldOptions. */ - interface IFieldOptions { + /** DeleteIndexRequest name. */ + public name: string; - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|null); + /** + * Creates a DeleteIndexRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteIndexRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.DeleteIndexRequest; - /** FieldOptions packed */ - packed?: (boolean|null); + /** + * Creates a plain object from a DeleteIndexRequest message. Also converts values to other types if specified. + * @param message DeleteIndexRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.DeleteIndexRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|null); + /** + * Converts this DeleteIndexRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FieldOptions lazy */ - lazy?: (boolean|null); + /** + * Gets the default type url for DeleteIndexRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FieldOptions deprecated */ - deprecated?: (boolean|null); + /** Properties of an UpdateFieldRequest. */ + interface IUpdateFieldRequest { - /** FieldOptions weak */ - weak?: (boolean|null); + /** UpdateFieldRequest field */ + field?: (google.firestore.admin.v1.IField|null); - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** UpdateFieldRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + /** Represents an UpdateFieldRequest. */ + class UpdateFieldRequest implements IUpdateFieldRequest { - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } + /** + * Constructs a new UpdateFieldRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IUpdateFieldRequest); - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { + /** UpdateFieldRequest field. */ + public field?: (google.firestore.admin.v1.IField|null); - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); + /** UpdateFieldRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); - /** FieldOptions ctype. */ - public ctype: google.protobuf.FieldOptions.CType; + /** + * Creates an UpdateFieldRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateFieldRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.UpdateFieldRequest; - /** FieldOptions packed. */ - public packed: boolean; + /** + * Creates a plain object from an UpdateFieldRequest message. Also converts values to other types if specified. + * @param message UpdateFieldRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.UpdateFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldOptions jstype. */ - public jstype: google.protobuf.FieldOptions.JSType; + /** + * Converts this UpdateFieldRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FieldOptions lazy. */ - public lazy: boolean; + /** + * Gets the default type url for UpdateFieldRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FieldOptions deprecated. */ - public deprecated: boolean; + /** Properties of a GetFieldRequest. */ + interface IGetFieldRequest { - /** FieldOptions weak. */ - public weak: boolean; + /** GetFieldRequest name */ + name?: (string|null); + } - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Represents a GetFieldRequest. */ + class GetFieldRequest implements IGetFieldRequest { - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + /** + * Constructs a new GetFieldRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IGetFieldRequest); - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** GetFieldRequest name. */ + public name: string; - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a GetFieldRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFieldRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.GetFieldRequest; - namespace FieldOptions { + /** + * Creates a plain object from a GetFieldRequest message. Also converts values to other types if specified. + * @param message GetFieldRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.GetFieldRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** CType enum. */ - type CType = - "STRING"| "CORD"| "STRING_PIECE"; + /** + * Converts this GetFieldRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** JSType enum. */ - type JSType = - "JS_NORMAL"| "JS_STRING"| "JS_NUMBER"; - } + /** + * Gets the default type url for GetFieldRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of an OneofOptions. */ - interface IOneofOptions { + /** Properties of a ListFieldsRequest. */ + interface IListFieldsRequest { - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** ListFieldsRequest parent */ + parent?: (string|null); - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { + /** ListFieldsRequest filter */ + filter?: (string|null); - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); + /** ListFieldsRequest pageSize */ + pageSize?: (number|null); - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** ListFieldsRequest pageToken */ + pageToken?: (string|null); + } - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + /** Represents a ListFieldsRequest. */ + class ListFieldsRequest implements IListFieldsRequest { - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new ListFieldsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IListFieldsRequest); - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ListFieldsRequest parent. */ + public parent: string; - /** Properties of an EnumOptions. */ - interface IEnumOptions { + /** ListFieldsRequest filter. */ + public filter: string; - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); + /** ListFieldsRequest pageSize. */ + public pageSize: number; - /** EnumOptions deprecated */ - deprecated?: (boolean|null); + /** ListFieldsRequest pageToken. */ + public pageToken: string; - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** + * Creates a ListFieldsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFieldsRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ListFieldsRequest; - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { + /** + * Creates a plain object from a ListFieldsRequest message. Also converts values to other types if specified. + * @param message ListFieldsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.ListFieldsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); + /** + * Converts this ListFieldsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** EnumOptions allowAlias. */ - public allowAlias: boolean; + /** + * Gets the default type url for ListFieldsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** EnumOptions deprecated. */ - public deprecated: boolean; + /** Properties of a ListFieldsResponse. */ + interface IListFieldsResponse { - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** ListFieldsResponse fields */ + fields?: (google.firestore.admin.v1.IField[]|null); - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + /** ListFieldsResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a ListFieldsResponse. */ + class ListFieldsResponse implements IListFieldsResponse { - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new ListFieldsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IListFieldsResponse); - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { + /** ListFieldsResponse fields. */ + public fields: google.firestore.admin.v1.IField[]; - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); + /** ListFieldsResponse nextPageToken. */ + public nextPageToken: string; - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } + /** + * Creates a ListFieldsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFieldsResponse + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ListFieldsResponse; - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { + /** + * Creates a plain object from a ListFieldsResponse message. Also converts values to other types if specified. + * @param message ListFieldsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.ListFieldsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); + /** + * Converts this ListFieldsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** EnumValueOptions deprecated. */ - public deprecated: boolean; + /** + * Gets the default type url for ListFieldsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** Properties of an ExportDocumentsRequest. */ + interface IExportDocumentsRequest { - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + /** ExportDocumentsRequest name */ + name?: (string|null); - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ExportDocumentsRequest collectionIds */ + collectionIds?: (string[]|null); - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ExportDocumentsRequest outputUriPrefix */ + outputUriPrefix?: (string|null); + } - /** Properties of a ServiceOptions. */ - interface IServiceOptions { + /** Represents an ExportDocumentsRequest. */ + class ExportDocumentsRequest implements IExportDocumentsRequest { - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); + /** + * Constructs a new ExportDocumentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IExportDocumentsRequest); - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** ExportDocumentsRequest name. */ + public name: string; - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); + /** ExportDocumentsRequest collectionIds. */ + public collectionIds: string[]; - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - } + /** ExportDocumentsRequest outputUriPrefix. */ + public outputUriPrefix: string; - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { + /** + * Creates an ExportDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportDocumentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ExportDocumentsRequest; - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); + /** + * Creates a plain object from an ExportDocumentsRequest message. Also converts values to other types if specified. + * @param message ExportDocumentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.ExportDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ServiceOptions deprecated. */ - public deprecated: boolean; + /** + * Converts this ExportDocumentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Gets the default type url for ExportDocumentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + /** Properties of an ImportDocumentsRequest. */ + interface IImportDocumentsRequest { - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ImportDocumentsRequest name */ + name?: (string|null); - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ImportDocumentsRequest collectionIds */ + collectionIds?: (string[]|null); - /** Properties of a MethodOptions. */ - interface IMethodOptions { + /** ImportDocumentsRequest inputUriPrefix */ + inputUriPrefix?: (string|null); + } - /** MethodOptions deprecated */ - deprecated?: (boolean|null); + /** Represents an ImportDocumentsRequest. */ + class ImportDocumentsRequest implements IImportDocumentsRequest { - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** + * Constructs a new ImportDocumentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IImportDocumentsRequest); - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); + /** ImportDocumentsRequest name. */ + public name: string; - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); + /** ImportDocumentsRequest collectionIds. */ + public collectionIds: string[]; - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); - } + /** ImportDocumentsRequest inputUriPrefix. */ + public inputUriPrefix: string; - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { + /** + * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportDocumentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ImportDocumentsRequest; - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); + /** + * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. + * @param message ImportDocumentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.ImportDocumentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MethodOptions deprecated. */ - public deprecated: boolean; + /** + * Converts this ImportDocumentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** + * Gets the default type url for ImportDocumentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + /** Properties of an Index. */ + interface IIndex { - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Index name */ + name?: (string|null); - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Index queryScope */ + queryScope?: (google.firestore.admin.v1.Index.QueryScope|null); - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { + /** Index fields */ + fields?: (google.firestore.admin.v1.Index.IIndexField[]|null); - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + /** Index state */ + state?: (google.firestore.admin.v1.Index.State|null); + } - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); + /** Represents an Index. */ + class Index implements IIndex { - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|string|null); + /** + * Constructs a new Index. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IIndex); - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|string|null); + /** Index name. */ + public name: string; - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); + /** Index queryScope. */ + public queryScope: google.firestore.admin.v1.Index.QueryScope; - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|null); + /** Index fields. */ + public fields: google.firestore.admin.v1.Index.IIndexField[]; - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } + /** Index state. */ + public state: google.firestore.admin.v1.Index.State; - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { + /** + * 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; - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); + /** + * 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 }; - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; + /** + * Converts this Index to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** UninterpretedOption identifierValue. */ - public identifierValue: string; + /** + * 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; + } - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|string); + namespace Index { - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|string); + /** QueryScope enum. */ + type QueryScope = + "QUERY_SCOPE_UNSPECIFIED"| "COLLECTION"| "COLLECTION_GROUP"; - /** UninterpretedOption doubleValue. */ - public doubleValue: number; + /** Properties of an IndexField. */ + interface IIndexField { - /** UninterpretedOption stringValue. */ - public stringValue: Uint8Array; + /** IndexField fieldPath */ + fieldPath?: (string|null); - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; + /** IndexField order */ + order?: (google.firestore.admin.v1.Index.IndexField.Order|null); - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + /** IndexField arrayConfig */ + arrayConfig?: (google.firestore.admin.v1.Index.IndexField.ArrayConfig|null); + } - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents an IndexField. */ + class IndexField implements IIndexField { + + /** + * Constructs a new IndexField. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.Index.IIndexField); - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** IndexField fieldPath. */ + public fieldPath: string; - namespace UninterpretedOption { + /** IndexField order. */ + public order?: (google.firestore.admin.v1.Index.IndexField.Order|null); - /** Properties of a NamePart. */ - interface INamePart { + /** IndexField arrayConfig. */ + public arrayConfig?: (google.firestore.admin.v1.Index.IndexField.ArrayConfig|null); - /** NamePart namePart */ - namePart: string; + /** IndexField valueMode. */ + public valueMode?: ("order"|"arrayConfig"); - /** NamePart isExtension */ - isExtension: boolean; - } + /** + * 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; - /** Represents a NamePart. */ - class NamePart implements INamePart { + /** + * 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 }; - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + /** + * Converts this IndexField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** NamePart namePart. */ - public namePart: string; + /** + * 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; + } - /** NamePart isExtension. */ - public isExtension: boolean; + namespace IndexField { - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + /** Order enum. */ + type Order = + "ORDER_UNSPECIFIED"| "ASCENDING"| "DESCENDING"; - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ArrayConfig enum. */ + type ArrayConfig = + "ARRAY_CONFIG_UNSPECIFIED"| "CONTAINS"; + } - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** State enum. */ + type State = + "STATE_UNSPECIFIED"| "CREATING"| "READY"| "NEEDS_REPAIR"; + } - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { + /** Properties of a LocationMetadata. */ + interface ILocationMetadata { + } - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } + /** Represents a LocationMetadata. */ + class LocationMetadata implements ILocationMetadata { - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { + /** + * Constructs a new LocationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.ILocationMetadata); - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); + /** + * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.LocationMetadata; - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; + /** + * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. + * @param message LocationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.LocationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + /** + * Converts this LocationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Gets the default type url for LocationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of an IndexOperationMetadata. */ + interface IIndexOperationMetadata { - namespace SourceCodeInfo { + /** IndexOperationMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** Properties of a Location. */ - interface ILocation { + /** IndexOperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** Location path */ - path?: (number[]|null); + /** IndexOperationMetadata index */ + index?: (string|null); - /** Location span */ - span?: (number[]|null); + /** IndexOperationMetadata state */ + state?: (google.firestore.admin.v1.OperationState|null); - /** Location leadingComments */ - leadingComments?: (string|null); + /** IndexOperationMetadata progressDocuments */ + progressDocuments?: (google.firestore.admin.v1.IProgress|null); - /** Location trailingComments */ - trailingComments?: (string|null); + /** IndexOperationMetadata progressBytes */ + progressBytes?: (google.firestore.admin.v1.IProgress|null); + } - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } + /** Represents an IndexOperationMetadata. */ + class IndexOperationMetadata implements IIndexOperationMetadata { - /** Represents a Location. */ - class Location implements ILocation { + /** + * Constructs a new IndexOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IIndexOperationMetadata); - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + /** IndexOperationMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** Location path. */ - public path: number[]; + /** IndexOperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** Location span. */ - public span: number[]; + /** IndexOperationMetadata index. */ + public index: string; - /** Location leadingComments. */ - public leadingComments: string; + /** IndexOperationMetadata state. */ + public state: google.firestore.admin.v1.OperationState; - /** Location trailingComments. */ - public trailingComments: string; + /** IndexOperationMetadata progressDocuments. */ + public progressDocuments?: (google.firestore.admin.v1.IProgress|null); - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; + /** IndexOperationMetadata progressBytes. */ + public progressBytes?: (google.firestore.admin.v1.IProgress|null); - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + /** + * Creates an IndexOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IndexOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.IndexOperationMetadata; - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an IndexOperationMetadata message. Also converts values to other types if specified. + * @param message IndexOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.IndexOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Converts this IndexOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IndexOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { + /** Properties of a FieldOperationMetadata. */ + interface IFieldOperationMetadata { - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } + /** FieldOperationMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { + /** FieldOperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); + /** FieldOperationMetadata field */ + field?: (string|null); - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + /** FieldOperationMetadata indexConfigDeltas */ + indexConfigDeltas?: (google.firestore.admin.v1.FieldOperationMetadata.IIndexConfigDelta[]|null); - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + /** FieldOperationMetadata state */ + state?: (google.firestore.admin.v1.OperationState|null); - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FieldOperationMetadata progressDocuments */ + progressDocuments?: (google.firestore.admin.v1.IProgress|null); - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FieldOperationMetadata progressBytes */ + progressBytes?: (google.firestore.admin.v1.IProgress|null); - namespace GeneratedCodeInfo { + /** FieldOperationMetadata ttlConfigDelta */ + ttlConfigDelta?: (google.firestore.admin.v1.FieldOperationMetadata.ITtlConfigDelta|null); + } - /** Properties of an Annotation. */ - interface IAnnotation { + /** Represents a FieldOperationMetadata. */ + class FieldOperationMetadata implements IFieldOperationMetadata { - /** Annotation path */ - path?: (number[]|null); + /** + * Constructs a new FieldOperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IFieldOperationMetadata); - /** Annotation sourceFile */ - sourceFile?: (string|null); + /** FieldOperationMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** Annotation begin */ - begin?: (number|null); + /** FieldOperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** Annotation end */ - end?: (number|null); - } + /** FieldOperationMetadata field. */ + public field: string; - /** Represents an Annotation. */ - class Annotation implements IAnnotation { + /** FieldOperationMetadata indexConfigDeltas. */ + public indexConfigDeltas: google.firestore.admin.v1.FieldOperationMetadata.IIndexConfigDelta[]; - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + /** FieldOperationMetadata state. */ + public state: google.firestore.admin.v1.OperationState; - /** Annotation path. */ - public path: number[]; + /** FieldOperationMetadata progressDocuments. */ + public progressDocuments?: (google.firestore.admin.v1.IProgress|null); - /** Annotation sourceFile. */ - public sourceFile: string; + /** FieldOperationMetadata progressBytes. */ + public progressBytes?: (google.firestore.admin.v1.IProgress|null); - /** Annotation begin. */ - public begin: number; + /** FieldOperationMetadata ttlConfigDelta. */ + public ttlConfigDelta?: (google.firestore.admin.v1.FieldOperationMetadata.ITtlConfigDelta|null); - /** Annotation end. */ - public end: number; + /** + * Creates a FieldOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOperationMetadata + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.FieldOperationMetadata; - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + /** + * Creates a plain object from a FieldOperationMetadata message. Also converts values to other types if specified. + * @param message FieldOperationMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.FieldOperationMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this FieldOperationMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** + * Gets the default type url for FieldOperationMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of an Empty. */ - interface IEmpty { - } + namespace FieldOperationMetadata { - /** Represents an Empty. */ - class Empty implements IEmpty { + /** Properties of an IndexConfigDelta. */ + interface IIndexConfigDelta { - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); + /** IndexConfigDelta changeType */ + changeType?: (google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType|null); - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + /** IndexConfigDelta index */ + index?: (google.firestore.admin.v1.IIndex|null); + } - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents an IndexConfigDelta. */ + class IndexConfigDelta implements IIndexConfigDelta { - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new IndexConfigDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.FieldOperationMetadata.IIndexConfigDelta); - /** Properties of a FieldMask. */ - interface IFieldMask { + /** IndexConfigDelta changeType. */ + public changeType: google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType; - /** FieldMask paths */ - paths?: (string[]|null); - } + /** IndexConfigDelta index. */ + public index?: (google.firestore.admin.v1.IIndex|null); - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { + /** + * Creates an IndexConfigDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IndexConfigDelta + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta; - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); + /** + * Creates a plain object from an IndexConfigDelta message. Also converts values to other types if specified. + * @param message IndexConfigDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldMask paths. */ - public paths: string[]; + /** + * Converts this IndexConfigDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldMask - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + /** + * Gets the default type url for IndexConfigDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace IndexConfigDelta { - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ChangeType enum. */ + type ChangeType = + "CHANGE_TYPE_UNSPECIFIED"| "ADD"| "REMOVE"; + } + + /** Properties of a TtlConfigDelta. */ + interface ITtlConfigDelta { + + /** TtlConfigDelta changeType */ + changeType?: (google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType|null); + } - /** Properties of a Timestamp. */ - interface ITimestamp { + /** Represents a TtlConfigDelta. */ + class TtlConfigDelta implements ITtlConfigDelta { - /** Timestamp seconds */ - seconds?: (number|string|null); + /** + * Constructs a new TtlConfigDelta. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.FieldOperationMetadata.ITtlConfigDelta); - /** Timestamp nanos */ - nanos?: (number|null); - } + /** TtlConfigDelta changeType. */ + public changeType: google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType; - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** + * Creates a TtlConfigDelta message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TtlConfigDelta + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta; - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); + /** + * Creates a plain object from a TtlConfigDelta message. Also converts values to other types if specified. + * @param message TtlConfigDelta + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Timestamp seconds. */ - public seconds: (number|string); + /** + * Converts this TtlConfigDelta to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Timestamp nanos. */ - public nanos: number; + /** + * Gets the default type url for TtlConfigDelta + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + namespace TtlConfigDelta { - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ChangeType enum. */ + type ChangeType = + "CHANGE_TYPE_UNSPECIFIED"| "ADD"| "REMOVE"; + } + } - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Properties of an ExportDocumentsMetadata. */ + interface IExportDocumentsMetadata { - /** Properties of an Any. */ - interface IAny { + /** ExportDocumentsMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** Any type_url */ - type_url?: (string|null); + /** ExportDocumentsMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** Any value */ - value?: (Uint8Array|null); - } + /** ExportDocumentsMetadata operationState */ + operationState?: (google.firestore.admin.v1.OperationState|null); - /** Represents an Any. */ - class Any implements IAny { + /** ExportDocumentsMetadata progressDocuments */ + progressDocuments?: (google.firestore.admin.v1.IProgress|null); - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); + /** ExportDocumentsMetadata progressBytes */ + progressBytes?: (google.firestore.admin.v1.IProgress|null); - /** Any type_url. */ - public type_url: string; + /** ExportDocumentsMetadata collectionIds */ + collectionIds?: (string[]|null); - /** Any value. */ - public value: Uint8Array; + /** ExportDocumentsMetadata outputUriPrefix */ + outputUriPrefix?: (string|null); + } - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + /** Represents an ExportDocumentsMetadata. */ + class ExportDocumentsMetadata implements IExportDocumentsMetadata { - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new ExportDocumentsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IExportDocumentsMetadata); - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ExportDocumentsMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** Properties of a Struct. */ - interface IStruct { + /** ExportDocumentsMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** Struct fields */ - fields?: ({ [k: string]: google.protobuf.IValue }|null); - } + /** ExportDocumentsMetadata operationState. */ + public operationState: google.firestore.admin.v1.OperationState; - /** Represents a Struct. */ - class Struct implements IStruct { + /** ExportDocumentsMetadata progressDocuments. */ + public progressDocuments?: (google.firestore.admin.v1.IProgress|null); - /** - * Constructs a new Struct. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStruct); + /** ExportDocumentsMetadata progressBytes. */ + public progressBytes?: (google.firestore.admin.v1.IProgress|null); - /** Struct fields. */ - public fields: { [k: string]: google.protobuf.IValue }; + /** ExportDocumentsMetadata collectionIds. */ + public collectionIds: string[]; - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Struct - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + /** ExportDocumentsMetadata outputUriPrefix. */ + public outputUriPrefix: string; - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @param message Struct - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates an ExportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportDocumentsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ExportDocumentsMetadata; - /** - * Converts this Struct to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Creates a plain object from an ExportDocumentsMetadata message. Also converts values to other types if specified. + * @param message ExportDocumentsMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.ExportDocumentsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Properties of a Value. */ - interface IValue { + /** + * Converts this ExportDocumentsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|null); + /** + * Gets the default type url for ExportDocumentsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Value numberValue */ - numberValue?: (number|null); + /** Properties of an ImportDocumentsMetadata. */ + interface IImportDocumentsMetadata { - /** Value stringValue */ - stringValue?: (string|null); + /** ImportDocumentsMetadata startTime */ + startTime?: (google.protobuf.ITimestamp|null); - /** Value boolValue */ - boolValue?: (boolean|null); + /** ImportDocumentsMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** Value structValue */ - structValue?: (google.protobuf.IStruct|null); + /** ImportDocumentsMetadata operationState */ + operationState?: (google.firestore.admin.v1.OperationState|null); - /** Value listValue */ - listValue?: (google.protobuf.IListValue|null); - } + /** ImportDocumentsMetadata progressDocuments */ + progressDocuments?: (google.firestore.admin.v1.IProgress|null); - /** Represents a Value. */ - class Value implements IValue { + /** ImportDocumentsMetadata progressBytes */ + progressBytes?: (google.firestore.admin.v1.IProgress|null); - /** - * Constructs a new Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IValue); + /** ImportDocumentsMetadata collectionIds */ + collectionIds?: (string[]|null); - /** Value nullValue. */ - public nullValue?: (google.protobuf.NullValue|null); + /** ImportDocumentsMetadata inputUriPrefix */ + inputUriPrefix?: (string|null); + } - /** Value numberValue. */ - public numberValue?: (number|null); + /** Represents an ImportDocumentsMetadata. */ + class ImportDocumentsMetadata implements IImportDocumentsMetadata { - /** Value stringValue. */ - public stringValue?: (string|null); + /** + * Constructs a new ImportDocumentsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IImportDocumentsMetadata); - /** Value boolValue. */ - public boolValue?: (boolean|null); + /** ImportDocumentsMetadata startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); - /** Value structValue. */ - public structValue?: (google.protobuf.IStruct|null); + /** ImportDocumentsMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); - /** Value listValue. */ - public listValue?: (google.protobuf.IListValue|null); + /** ImportDocumentsMetadata operationState. */ + public operationState: google.firestore.admin.v1.OperationState; - /** Value kind. */ - public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + /** ImportDocumentsMetadata progressDocuments. */ + public progressDocuments?: (google.firestore.admin.v1.IProgress|null); - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + /** ImportDocumentsMetadata progressBytes. */ + public progressBytes?: (google.firestore.admin.v1.IProgress|null); - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ImportDocumentsMetadata collectionIds. */ + public collectionIds: string[]; - /** - * Converts this Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ImportDocumentsMetadata inputUriPrefix. */ + public inputUriPrefix: string; - /** NullValue enum. */ - type NullValue = - "NULL_VALUE"; + /** + * Creates an ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImportDocumentsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ImportDocumentsMetadata; - /** Properties of a ListValue. */ - interface IListValue { + /** + * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified. + * @param message ImportDocumentsMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.ImportDocumentsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** ListValue values */ - values?: (google.protobuf.IValue[]|null); - } + /** + * Converts this ImportDocumentsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Represents a ListValue. */ - class ListValue implements IListValue { + /** + * Gets the default type url for ImportDocumentsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Constructs a new ListValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IListValue); + /** Properties of an ExportDocumentsResponse. */ + interface IExportDocumentsResponse { - /** ListValue values. */ - public values: google.protobuf.IValue[]; + /** ExportDocumentsResponse outputUriPrefix */ + outputUriPrefix?: (string|null); + } - /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + /** Represents an ExportDocumentsResponse. */ + class ExportDocumentsResponse implements IExportDocumentsResponse { - /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @param message ListValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new ExportDocumentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IExportDocumentsResponse); - /** - * Converts this ListValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** ExportDocumentsResponse outputUriPrefix. */ + public outputUriPrefix: string; - /** Properties of a DoubleValue. */ - interface IDoubleValue { + /** + * Creates an ExportDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExportDocumentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.ExportDocumentsResponse; - /** DoubleValue value */ - value?: (number|null); - } + /** + * Creates a plain object from an ExportDocumentsResponse message. Also converts values to other types if specified. + * @param message ExportDocumentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.ExportDocumentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a DoubleValue. */ - class DoubleValue implements IDoubleValue { + /** + * Converts this ExportDocumentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new DoubleValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDoubleValue); + /** + * Gets the default type url for ExportDocumentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** DoubleValue value. */ - public value: number; + /** OperationState enum. */ + type OperationState = + "OPERATION_STATE_UNSPECIFIED"| "INITIALIZING"| "PROCESSING"| "CANCELLING"| "FINALIZING"| "SUCCESSFUL"| "FAILED"| "CANCELLED"; - /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DoubleValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + /** Properties of a Progress. */ + interface IProgress { - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @param message DoubleValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Progress estimatedWork */ + estimatedWork?: (number|string|null); - /** - * Converts this DoubleValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Progress completedWork */ + completedWork?: (number|string|null); + } - /** Properties of a FloatValue. */ - interface IFloatValue { + /** Represents a Progress. */ + class Progress implements IProgress { - /** FloatValue value */ - value?: (number|null); - } + /** + * Constructs a new Progress. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.admin.v1.IProgress); - /** Represents a FloatValue. */ - class FloatValue implements IFloatValue { + /** Progress estimatedWork. */ + public estimatedWork: (number|string); - /** - * Constructs a new FloatValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFloatValue); + /** Progress completedWork. */ + public completedWork: (number|string); - /** FloatValue value. */ - public value: number; + /** + * Creates a Progress message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Progress + */ + public static fromObject(object: { [k: string]: any }): google.firestore.admin.v1.Progress; - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FloatValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + /** + * Creates a plain object from a Progress message. Also converts values to other types if specified. + * @param message Progress + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.admin.v1.Progress, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @param message FloatValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this Progress to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this FloatValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Gets the default type url for Progress + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } } + } - /** Properties of an Int64Value. */ - interface IInt64Value { + /** Namespace type. */ + namespace type { - /** Int64Value value */ - value?: (number|string|null); + /** Properties of a LatLng. */ + interface ILatLng { + + /** LatLng latitude */ + latitude?: (number|null); + + /** LatLng longitude */ + longitude?: (number|null); } - /** Represents an Int64Value. */ - class Int64Value implements IInt64Value { + /** Represents a LatLng. */ + class LatLng implements ILatLng { /** - * Constructs a new Int64Value. + * Constructs a new LatLng. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IInt64Value); + constructor(properties?: google.type.ILatLng); - /** Int64Value value. */ - public value: (number|string); + /** LatLng latitude. */ + public latitude: number; + + /** LatLng longitude. */ + public longitude: number; /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * Creates a LatLng message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Int64Value + * @returns LatLng */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + public static fromObject(object: { [k: string]: any }): google.type.LatLng; /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @param message Int64Value + * Creates a plain object from a LatLng message. Also converts values to other types if specified. + * @param message LatLng * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.type.LatLng, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Int64Value to JSON. + * Converts this LatLng to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of a UInt64Value. */ - interface IUInt64Value { - - /** UInt64Value value */ - value?: (number|string|null); - } - - /** Represents a UInt64Value. */ - class UInt64Value implements IUInt64Value { /** - * Constructs a new UInt64Value. - * @param [properties] Properties to set + * Gets the default type url for LatLng + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - constructor(properties?: google.protobuf.IUInt64Value); - - /** UInt64Value value. */ - public value: (number|string); + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + /** Namespace rpc. */ + namespace rpc { - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @param message UInt64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a Status. */ + interface IStatus { - /** - * Converts this UInt64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Status code */ + code?: (number|null); - /** Properties of an Int32Value. */ - interface IInt32Value { + /** Status message */ + message?: (string|null); - /** Int32Value value */ - value?: (number|null); + /** Status details */ + details?: (google.protobuf.IAny[]|null); } - /** Represents an Int32Value. */ - class Int32Value implements IInt32Value { + /** Represents a Status. */ + class Status implements IStatus { /** - * Constructs a new Int32Value. + * Constructs a new Status. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IInt32Value); + constructor(properties?: google.rpc.IStatus); - /** Int32Value value. */ - public value: number; + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Int32Value + * @returns Status */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + public static fromObject(object: { [k: string]: any }): google.rpc.Status; /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @param message Int32Value + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Int32Value to JSON. + * Converts this Status to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } + } - /** Properties of a UInt32Value. */ - interface IUInt32Value { + /** Namespace api. */ + namespace api { - /** UInt32Value value */ - value?: (number|null); + /** FieldBehavior enum. */ + type FieldBehavior = + "FIELD_BEHAVIOR_UNSPECIFIED"| "OPTIONAL"| "REQUIRED"| "OUTPUT_ONLY"| "INPUT_ONLY"| "IMMUTABLE"| "UNORDERED_LIST"| "NON_EMPTY_DEFAULT"; + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); } - /** Represents a UInt32Value. */ - class UInt32Value implements IUInt32Value { + /** Represents a Http. */ + class Http implements IHttp { /** - * Constructs a new UInt32Value. + * Constructs a new Http. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IUInt32Value); + constructor(properties?: google.api.IHttp); - /** UInt32Value value. */ - public value: number; + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UInt32Value + * @returns Http */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + public static fromObject(object: { [k: string]: any }): google.api.Http; /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @param message UInt32Value + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UInt32Value to JSON. + * Converts this Http to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BoolValue. */ - interface IBoolValue { + /** Properties of a HttpRule. */ + interface IHttpRule { - /** BoolValue value */ - value?: (boolean|null); - } + /** HttpRule selector */ + selector?: (string|null); - /** Represents a BoolValue. */ - class BoolValue implements IBoolValue { + /** HttpRule get */ + get?: (string|null); - /** - * Constructs a new BoolValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBoolValue); + /** HttpRule put */ + put?: (string|null); - /** BoolValue value. */ - public value: boolean; + /** HttpRule post */ + post?: (string|null); - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BoolValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + /** HttpRule delete */ + "delete"?: (string|null); - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @param message BoolValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** HttpRule patch */ + patch?: (string|null); - /** - * Converts this BoolValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); - /** Properties of a StringValue. */ - interface IStringValue { + /** HttpRule body */ + body?: (string|null); - /** StringValue value */ - value?: (string|null); + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); } - /** Represents a StringValue. */ - class StringValue implements IStringValue { + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { /** - * Constructs a new StringValue. + * Constructs a new HttpRule. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IStringValue); + constructor(properties?: google.api.IHttpRule); - /** StringValue value. */ - public value: string; + /** HttpRule selector. */ + public selector: string; - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + /** HttpRule get. */ + public get?: (string|null); - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @param message StringValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); - /** - * Converts this StringValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** HttpRule patch. */ + public patch?: (string|null); - /** Properties of a BytesValue. */ - interface IBytesValue { + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); - /** BytesValue value */ - value?: (Uint8Array|null); - } + /** HttpRule body. */ + public body: string; - /** Represents a BytesValue. */ - class BytesValue implements IBytesValue { + /** HttpRule responseBody. */ + public responseBody: string; - /** - * Constructs a new BytesValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBytesValue); + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; - /** BytesValue value. */ - public value: Uint8Array; + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BytesValue + * @returns HttpRule */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @param message BytesValue + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BytesValue to JSON. + * Converts this HttpRule to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Duration. */ - interface IDuration { + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { - /** Duration seconds */ - seconds?: (number|string|null); + /** CustomHttpPattern kind */ + kind?: (string|null); - /** Duration nanos */ - nanos?: (number|null); + /** CustomHttpPattern path */ + path?: (string|null); } - /** Represents a Duration. */ - class Duration implements IDuration { + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { /** - * Constructs a new Duration. + * Constructs a new CustomHttpPattern. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDuration); + constructor(properties?: google.api.ICustomHttpPattern); - /** Duration seconds. */ - public seconds: (number|string); + /** CustomHttpPattern kind. */ + public kind: string; - /** Duration nanos. */ - public nanos: number; + /** CustomHttpPattern path. */ + public path: string; /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Duration + * @returns CustomHttpPattern */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Duration to JSON. + * Converts this CustomHttpPattern to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - } - /** Namespace type. */ - namespace type { + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { - /** Properties of a LatLng. */ - interface ILatLng { + /** ResourceDescriptor type */ + type?: (string|null); - /** LatLng latitude */ - latitude?: (number|null); + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); - /** LatLng longitude */ - longitude?: (number|null); + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } - /** Represents a LatLng. */ - class LatLng implements ILatLng { + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { /** - * Constructs a new LatLng. + * Constructs a new ResourceDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.type.ILatLng); + constructor(properties?: google.api.IResourceDescriptor); - /** LatLng latitude. */ - public latitude: number; + /** ResourceDescriptor type. */ + public type: string; - /** LatLng longitude. */ - public longitude: number; + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: google.api.ResourceDescriptor.History; + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; /** - * Creates a LatLng message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LatLng + * @returns ResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.type.LatLng; + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; /** - * Creates a plain object from a LatLng message. Also converts values to other types if specified. - * @param message LatLng + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.type.LatLng, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LatLng to JSON. + * Converts this ResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - } - /** Namespace rpc. */ - namespace rpc { + namespace ResourceDescriptor { - /** Properties of a Status. */ - interface IStatus { + /** History enum. */ + type History = + "HISTORY_UNSPECIFIED"| "ORIGINALLY_SINGLE_PATTERN"| "FUTURE_MULTI_PATTERN"; - /** Status code */ - code?: (number|null); + /** Style enum. */ + type Style = + "STYLE_UNSPECIFIED"| "DECLARATIVE_FRIENDLY"; + } - /** Status message */ - message?: (string|null); + /** Properties of a ResourceReference. */ + interface IResourceReference { - /** Status details */ - details?: (google.protobuf.IAny[]|null); + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); } - /** Represents a Status. */ - class Status implements IStatus { + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { /** - * Constructs a new Status. + * Constructs a new ResourceReference. * @param [properties] Properties to set */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; + constructor(properties?: google.api.IResourceReference); - /** Status message. */ - public message: string; + /** ResourceReference type. */ + public type: string; - /** Status details. */ - public details: google.protobuf.IAny[]; + /** ResourceReference childType. */ + public childType: string; /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Status + * @returns ResourceReference */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Status to JSON. + * Converts this ResourceReference to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -4948,6 +5804,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetOperationRequest. */ @@ -4989,6 +5852,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsRequest. */ @@ -5048,6 +5918,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsResponse. */ @@ -5095,6 +5972,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CancelOperationRequest. */ @@ -5136,6 +6020,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteOperationRequest. */ @@ -5177,6 +6068,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WaitOperationRequest. */ @@ -5224,6 +6122,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationInfo. */ @@ -5271,6 +6176,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } diff --git a/dev/protos/firestore_admin_v1_proto_api.js b/dev/protos/firestore_admin_v1_proto_api.js index 9eb4309d6..322934ad6 100644 --- a/dev/protos/firestore_admin_v1_proto_api.js +++ b/dev/protos/firestore_admin_v1_proto_api.js @@ -41,4624 +41,4974 @@ */ var google = {}; - google.firestore = (function() { + google.protobuf = (function() { /** - * Namespace firestore. + * Namespace protobuf. * @memberof google * @namespace */ - var firestore = {}; + var protobuf = {}; - firestore.admin = (function() { + protobuf.Empty = (function() { /** - * Namespace admin. - * @memberof google.firestore - * @namespace + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty */ - var admin = {}; - admin.v1 = (function() { + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(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]]; + } - /** - * Namespace v1. - * @memberof google.firestore.admin - * @namespace - */ - var v1 = {}; + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; - v1.Database = (function() { + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; - /** - * Properties of a Database. - * @memberof google.firestore.admin.v1 - * @interface IDatabase - * @property {string|null} [name] Database name - * @property {string|null} [locationId] Database locationId - * @property {google.firestore.admin.v1.Database.DatabaseType|null} [type] Database type - * @property {google.firestore.admin.v1.Database.ConcurrencyMode|null} [concurrencyMode] Database concurrencyMode - * @property {google.firestore.admin.v1.Database.AppEngineIntegrationMode|null} [appEngineIntegrationMode] Database appEngineIntegrationMode - * @property {string|null} [keyPrefix] Database keyPrefix - * @property {string|null} [etag] Database etag - */ + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new Database. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a Database. - * @implements IDatabase - * @constructor - * @param {google.firestore.admin.v1.IDatabase=} [properties] Properties to set - */ - function Database(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]]; - } + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; - /** - * Database name. - * @member {string} name - * @memberof google.firestore.admin.v1.Database - * @instance - */ - Database.prototype.name = ""; + return Empty; + })(); - /** - * Database locationId. - * @member {string} locationId - * @memberof google.firestore.admin.v1.Database - * @instance - */ - Database.prototype.locationId = ""; + protobuf.FieldMask = (function() { - /** - * Database type. - * @member {google.firestore.admin.v1.Database.DatabaseType} type - * @memberof google.firestore.admin.v1.Database - * @instance - */ - Database.prototype.type = 0; + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ - /** - * Database concurrencyMode. - * @member {google.firestore.admin.v1.Database.ConcurrencyMode} concurrencyMode - * @memberof google.firestore.admin.v1.Database - * @instance - */ - Database.prototype.concurrencyMode = 0; + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + 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]]; + } - /** - * Database appEngineIntegrationMode. - * @member {google.firestore.admin.v1.Database.AppEngineIntegrationMode} appEngineIntegrationMode - * @memberof google.firestore.admin.v1.Database - * @instance - */ - Database.prototype.appEngineIntegrationMode = 0; + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; - /** - * Database keyPrefix. - * @member {string} keyPrefix - * @memberof google.firestore.admin.v1.Database - * @instance - */ - Database.prototype.keyPrefix = ""; + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; - /** - * Database etag. - * @member {string} etag - * @memberof google.firestore.admin.v1.Database - * @instance - */ - Database.prototype.etag = ""; + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; - /** - * Creates a Database message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.Database - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.Database} Database - */ - Database.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.Database) - return object; - var message = new $root.google.firestore.admin.v1.Database(); - if (object.name != null) - message.name = String(object.name); - if (object.locationId != null) - message.locationId = String(object.locationId); - switch (object.type) { - case "DATABASE_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "FIRESTORE_NATIVE": - case 1: - message.type = 1; - break; - case "DATASTORE_MODE": - case 2: - message.type = 2; - break; - } - switch (object.concurrencyMode) { - case "CONCURRENCY_MODE_UNSPECIFIED": - case 0: - message.concurrencyMode = 0; - break; - case "OPTIMISTIC": - case 1: - message.concurrencyMode = 1; - break; - case "PESSIMISTIC": - case 2: - message.concurrencyMode = 2; - break; - case "OPTIMISTIC_WITH_ENTITY_GROUPS": - case 3: - message.concurrencyMode = 3; - break; - } - switch (object.appEngineIntegrationMode) { - case "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED": - case 0: - message.appEngineIntegrationMode = 0; - break; - case "ENABLED": - case 1: - message.appEngineIntegrationMode = 1; - break; - case "DISABLED": - case 2: - message.appEngineIntegrationMode = 2; - break; - } - if (object.keyPrefix != null) - message.keyPrefix = String(object.keyPrefix); - if (object.etag != null) - message.etag = String(object.etag); - return message; - }; - - /** - * Creates a plain object from a Database message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.Database - * @static - * @param {google.firestore.admin.v1.Database} message Database - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Database.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.locationId = ""; - object.type = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; - object.concurrencyMode = options.enums === String ? "CONCURRENCY_MODE_UNSPECIFIED" : 0; - object.appEngineIntegrationMode = options.enums === String ? "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED" : 0; - object.keyPrefix = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.locationId != null && message.hasOwnProperty("locationId")) - object.locationId = message.locationId; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.firestore.admin.v1.Database.DatabaseType[message.type] : message.type; - if (message.concurrencyMode != null && message.hasOwnProperty("concurrencyMode")) - object.concurrencyMode = options.enums === String ? $root.google.firestore.admin.v1.Database.ConcurrencyMode[message.concurrencyMode] : message.concurrencyMode; - if (message.appEngineIntegrationMode != null && message.hasOwnProperty("appEngineIntegrationMode")) - object.appEngineIntegrationMode = options.enums === String ? $root.google.firestore.admin.v1.Database.AppEngineIntegrationMode[message.appEngineIntegrationMode] : message.appEngineIntegrationMode; - if (message.keyPrefix != null && message.hasOwnProperty("keyPrefix")) - object.keyPrefix = message.keyPrefix; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; - return object; - }; - - /** - * Converts this Database to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.Database - * @instance - * @returns {Object.} JSON object - */ - Database.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * DatabaseType enum. - * @name google.firestore.admin.v1.Database.DatabaseType - * @enum {string} - * @property {string} DATABASE_TYPE_UNSPECIFIED=DATABASE_TYPE_UNSPECIFIED DATABASE_TYPE_UNSPECIFIED value - * @property {string} FIRESTORE_NATIVE=FIRESTORE_NATIVE FIRESTORE_NATIVE value - * @property {string} DATASTORE_MODE=DATASTORE_MODE DATASTORE_MODE value - */ - Database.DatabaseType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATABASE_TYPE_UNSPECIFIED"] = "DATABASE_TYPE_UNSPECIFIED"; - values[valuesById[1] = "FIRESTORE_NATIVE"] = "FIRESTORE_NATIVE"; - values[valuesById[2] = "DATASTORE_MODE"] = "DATASTORE_MODE"; - return values; - })(); + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ConcurrencyMode enum. - * @name google.firestore.admin.v1.Database.ConcurrencyMode - * @enum {string} - * @property {string} CONCURRENCY_MODE_UNSPECIFIED=CONCURRENCY_MODE_UNSPECIFIED CONCURRENCY_MODE_UNSPECIFIED value - * @property {string} OPTIMISTIC=OPTIMISTIC OPTIMISTIC value - * @property {string} PESSIMISTIC=PESSIMISTIC PESSIMISTIC value - * @property {string} OPTIMISTIC_WITH_ENTITY_GROUPS=OPTIMISTIC_WITH_ENTITY_GROUPS OPTIMISTIC_WITH_ENTITY_GROUPS value - */ - Database.ConcurrencyMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONCURRENCY_MODE_UNSPECIFIED"] = "CONCURRENCY_MODE_UNSPECIFIED"; - values[valuesById[1] = "OPTIMISTIC"] = "OPTIMISTIC"; - values[valuesById[2] = "PESSIMISTIC"] = "PESSIMISTIC"; - values[valuesById[3] = "OPTIMISTIC_WITH_ENTITY_GROUPS"] = "OPTIMISTIC_WITH_ENTITY_GROUPS"; - return values; - })(); + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; - /** - * AppEngineIntegrationMode enum. - * @name google.firestore.admin.v1.Database.AppEngineIntegrationMode - * @enum {string} - * @property {string} APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED=APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED value - * @property {string} ENABLED=ENABLED ENABLED value - * @property {string} DISABLED=DISABLED DISABLED value - */ - Database.AppEngineIntegrationMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED"] = "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED"; - values[valuesById[1] = "ENABLED"] = "ENABLED"; - values[valuesById[2] = "DISABLED"] = "DISABLED"; - return values; - })(); + return FieldMask; + })(); - return Database; - })(); + protobuf.Timestamp = (function() { - v1.Field = (function() { + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|string|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ - /** - * Properties of a Field. - * @memberof google.firestore.admin.v1 - * @interface IField - * @property {string|null} [name] Field name - * @property {google.firestore.admin.v1.Field.IIndexConfig|null} [indexConfig] Field indexConfig - * @property {google.firestore.admin.v1.Field.ITtlConfig|null} [ttlConfig] Field ttlConfig - */ + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(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]]; + } - /** - * Constructs a new Field. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a Field. - * @implements IField - * @constructor - * @param {google.firestore.admin.v1.IField=} [properties] Properties to set - */ - function Field(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]]; - } + /** + * Timestamp seconds. + * @member {number|string} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Field name. - * @member {string} name - * @memberof google.firestore.admin.v1.Field - * @instance - */ - Field.prototype.name = ""; + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; - /** - * Field indexConfig. - * @member {google.firestore.admin.v1.Field.IIndexConfig|null|undefined} indexConfig - * @memberof google.firestore.admin.v1.Field - * @instance - */ - Field.prototype.indexConfig = null; + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; - /** - * Field ttlConfig. - * @member {google.firestore.admin.v1.Field.ITtlConfig|null|undefined} ttlConfig - * @memberof google.firestore.admin.v1.Field - * @instance - */ - Field.prototype.ttlConfig = null; + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; - /** - * Creates a Field message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.Field - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.Field} Field - */ - Field.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.Field) - return object; - var message = new $root.google.firestore.admin.v1.Field(); - if (object.name != null) - message.name = String(object.name); - if (object.indexConfig != null) { - if (typeof object.indexConfig !== "object") - throw TypeError(".google.firestore.admin.v1.Field.indexConfig: object expected"); - message.indexConfig = $root.google.firestore.admin.v1.Field.IndexConfig.fromObject(object.indexConfig); - } - if (object.ttlConfig != null) { - if (typeof object.ttlConfig !== "object") - throw TypeError(".google.firestore.admin.v1.Field.ttlConfig: object expected"); - message.ttlConfig = $root.google.firestore.admin.v1.Field.TtlConfig.fromObject(object.ttlConfig); - } - return message; - }; + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a Field message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.Field - * @static - * @param {google.firestore.admin.v1.Field} message Field - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Field.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.indexConfig = null; - object.ttlConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.indexConfig != null && message.hasOwnProperty("indexConfig")) - object.indexConfig = $root.google.firestore.admin.v1.Field.IndexConfig.toObject(message.indexConfig, options); - if (message.ttlConfig != null && message.hasOwnProperty("ttlConfig")) - object.ttlConfig = $root.google.firestore.admin.v1.Field.TtlConfig.toObject(message.ttlConfig, options); - return object; - }; + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; - /** - * Converts this Field to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.Field - * @instance - * @returns {Object.} JSON object - */ - Field.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Timestamp; + })(); - Field.IndexConfig = (function() { + protobuf.Any = (function() { - /** - * Properties of an IndexConfig. - * @memberof google.firestore.admin.v1.Field - * @interface IIndexConfig - * @property {Array.|null} [indexes] IndexConfig indexes - * @property {boolean|null} [usesAncestorConfig] IndexConfig usesAncestorConfig - * @property {string|null} [ancestorField] IndexConfig ancestorField - * @property {boolean|null} [reverting] IndexConfig reverting - */ + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ - /** - * Constructs a new IndexConfig. - * @memberof google.firestore.admin.v1.Field - * @classdesc Represents an IndexConfig. - * @implements IIndexConfig - * @constructor - * @param {google.firestore.admin.v1.Field.IIndexConfig=} [properties] Properties to set - */ - function IndexConfig(properties) { - this.indexes = []; - 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]]; - } + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(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]]; + } - /** - * IndexConfig indexes. - * @member {Array.} indexes - * @memberof google.firestore.admin.v1.Field.IndexConfig - * @instance - */ - IndexConfig.prototype.indexes = $util.emptyArray; + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; - /** - * IndexConfig usesAncestorConfig. - * @member {boolean} usesAncestorConfig - * @memberof google.firestore.admin.v1.Field.IndexConfig - * @instance - */ - IndexConfig.prototype.usesAncestorConfig = false; + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); - /** - * IndexConfig ancestorField. - * @member {string} ancestorField - * @memberof google.firestore.admin.v1.Field.IndexConfig - * @instance - */ - IndexConfig.prototype.ancestorField = ""; + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; - /** - * IndexConfig reverting. - * @member {boolean} reverting - * @memberof google.firestore.admin.v1.Field.IndexConfig - * @instance - */ - IndexConfig.prototype.reverting = false; + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; - /** - * Creates an IndexConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.Field.IndexConfig - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.Field.IndexConfig} IndexConfig - */ - IndexConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.Field.IndexConfig) - return object; - var message = new $root.google.firestore.admin.v1.Field.IndexConfig(); - if (object.indexes) { - if (!Array.isArray(object.indexes)) - throw TypeError(".google.firestore.admin.v1.Field.IndexConfig.indexes: array expected"); - message.indexes = []; - for (var i = 0; i < object.indexes.length; ++i) { - if (typeof object.indexes[i] !== "object") - throw TypeError(".google.firestore.admin.v1.Field.IndexConfig.indexes: object expected"); - message.indexes[i] = $root.google.firestore.admin.v1.Index.fromObject(object.indexes[i]); - } - } - if (object.usesAncestorConfig != null) - message.usesAncestorConfig = Boolean(object.usesAncestorConfig); - if (object.ancestorField != null) - message.ancestorField = String(object.ancestorField); - if (object.reverting != null) - message.reverting = Boolean(object.reverting); - return message; - }; + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from an IndexConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.Field.IndexConfig - * @static - * @param {google.firestore.admin.v1.Field.IndexConfig} message IndexConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IndexConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.indexes = []; - if (options.defaults) { - object.usesAncestorConfig = false; - object.ancestorField = ""; - object.reverting = false; - } - if (message.indexes && message.indexes.length) { - object.indexes = []; - for (var j = 0; j < message.indexes.length; ++j) - object.indexes[j] = $root.google.firestore.admin.v1.Index.toObject(message.indexes[j], options); - } - if (message.usesAncestorConfig != null && message.hasOwnProperty("usesAncestorConfig")) - object.usesAncestorConfig = message.usesAncestorConfig; - if (message.ancestorField != null && message.hasOwnProperty("ancestorField")) - object.ancestorField = message.ancestorField; - if (message.reverting != null && message.hasOwnProperty("reverting")) - object.reverting = message.reverting; - return object; - }; + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; - /** - * Converts this IndexConfig to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.Field.IndexConfig - * @instance - * @returns {Object.} JSON object - */ - IndexConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return Any; + })(); - return IndexConfig; - })(); + protobuf.FileDescriptorSet = (function() { - Field.TtlConfig = (function() { + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ - /** - * Properties of a TtlConfig. - * @memberof google.firestore.admin.v1.Field - * @interface ITtlConfig - * @property {google.firestore.admin.v1.Field.TtlConfig.State|null} [state] TtlConfig state - */ + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + 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]]; + } - /** - * Constructs a new TtlConfig. - * @memberof google.firestore.admin.v1.Field - * @classdesc Represents a TtlConfig. - * @implements ITtlConfig - * @constructor - * @param {google.firestore.admin.v1.Field.ITtlConfig=} [properties] Properties to set - */ - function TtlConfig(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]]; - } + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; - /** - * TtlConfig state. - * @member {google.firestore.admin.v1.Field.TtlConfig.State} state - * @memberof google.firestore.admin.v1.Field.TtlConfig - * @instance - */ - TtlConfig.prototype.state = 0; + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; - /** - * Creates a TtlConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.Field.TtlConfig - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.Field.TtlConfig} TtlConfig - */ - TtlConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.Field.TtlConfig) - return object; - var message = new $root.google.firestore.admin.v1.Field.TtlConfig(); - switch (object.state) { - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "ACTIVE": - case 2: - message.state = 2; - break; - case "NEEDS_REPAIR": - case 3: - message.state = 3; - break; - } - return message; - }; + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; - /** - * Creates a plain object from a TtlConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.Field.TtlConfig - * @static - * @param {google.firestore.admin.v1.Field.TtlConfig} message TtlConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TtlConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.firestore.admin.v1.Field.TtlConfig.State[message.state] : message.state; - return object; - }; + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this TtlConfig to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.Field.TtlConfig - * @instance - * @returns {Object.} JSON object - */ - TtlConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; - /** - * State enum. - * @name google.firestore.admin.v1.Field.TtlConfig.State - * @enum {string} - * @property {string} STATE_UNSPECIFIED=STATE_UNSPECIFIED STATE_UNSPECIFIED value - * @property {string} CREATING=CREATING CREATING value - * @property {string} ACTIVE=ACTIVE ACTIVE value - * @property {string} NEEDS_REPAIR=NEEDS_REPAIR NEEDS_REPAIR value - */ - TtlConfig.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED"; - values[valuesById[1] = "CREATING"] = "CREATING"; - values[valuesById[2] = "ACTIVE"] = "ACTIVE"; - values[valuesById[3] = "NEEDS_REPAIR"] = "NEEDS_REPAIR"; - return values; - })(); + return FileDescriptorSet; + })(); - return TtlConfig; - })(); + protobuf.FileDescriptorProto = (function() { - return Field; - })(); + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition + */ - v1.FirestoreAdmin = (function() { + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + 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]]; + } - /** - * Constructs a new FirestoreAdmin service. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a FirestoreAdmin - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function FirestoreAdmin(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; - (FirestoreAdmin.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = FirestoreAdmin; + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#createIndex}. - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @typedef CreateIndexCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; - /** - * Calls CreateIndex. - * @function createIndex - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.ICreateIndexRequest} request CreateIndexRequest message or plain object - * @param {google.firestore.admin.v1.FirestoreAdmin.CreateIndexCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(FirestoreAdmin.prototype.createIndex = function createIndex(request, callback) { - return this.rpcCall(createIndex, $root.google.firestore.admin.v1.CreateIndexRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateIndex" }); + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - /** - * Calls CreateIndex. - * @function createIndex - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.ICreateIndexRequest} request CreateIndexRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#listIndexes}. - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @typedef ListIndexesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.firestore.admin.v1.ListIndexesResponse} [response] ListIndexesResponse - */ + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; - /** - * Calls ListIndexes. - * @function listIndexes - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IListIndexesRequest} request ListIndexesRequest message or plain object - * @param {google.firestore.admin.v1.FirestoreAdmin.ListIndexesCallback} callback Node-style callback called with the error, if any, and ListIndexesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(FirestoreAdmin.prototype.listIndexes = function listIndexes(request, callback) { - return this.rpcCall(listIndexes, $root.google.firestore.admin.v1.ListIndexesRequest, $root.google.firestore.admin.v1.ListIndexesResponse, request, callback); - }, "name", { value: "ListIndexes" }); + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; - /** - * Calls ListIndexes. - * @function listIndexes - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IListIndexesRequest} request ListIndexesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#getIndex}. - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @typedef GetIndexCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.firestore.admin.v1.Index} [response] Index - */ + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; - /** - * Calls GetIndex. - * @function getIndex - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IGetIndexRequest} request GetIndexRequest message or plain object - * @param {google.firestore.admin.v1.FirestoreAdmin.GetIndexCallback} callback Node-style callback called with the error, if any, and Index - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(FirestoreAdmin.prototype.getIndex = function getIndex(request, callback) { - return this.rpcCall(getIndex, $root.google.firestore.admin.v1.GetIndexRequest, $root.google.firestore.admin.v1.Index, request, callback); - }, "name", { value: "GetIndex" }); + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; - /** - * Calls GetIndex. - * @function getIndex - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IGetIndexRequest} request GetIndexRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#deleteIndex}. - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @typedef DeleteIndexCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; - /** - * Calls DeleteIndex. - * @function deleteIndex - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IDeleteIndexRequest} request DeleteIndexRequest message or plain object - * @param {google.firestore.admin.v1.FirestoreAdmin.DeleteIndexCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(FirestoreAdmin.prototype.deleteIndex = function deleteIndex(request, callback) { - return this.rpcCall(deleteIndex, $root.google.firestore.admin.v1.DeleteIndexRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteIndex" }); + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; - /** - * Calls DeleteIndex. - * @function deleteIndex - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IDeleteIndexRequest} request DeleteIndexRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); + return message; + }; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#getField}. - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @typedef GetFieldCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.firestore.admin.v1.Field} [response] Field - */ + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; + return object; + }; - /** - * Calls GetField. - * @function getField - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IGetFieldRequest} request GetFieldRequest message or plain object - * @param {google.firestore.admin.v1.FirestoreAdmin.GetFieldCallback} callback Node-style callback called with the error, if any, and Field - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(FirestoreAdmin.prototype.getField = function getField(request, callback) { - return this.rpcCall(getField, $root.google.firestore.admin.v1.GetFieldRequest, $root.google.firestore.admin.v1.Field, request, callback); - }, "name", { value: "GetField" }); + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls GetField. - * @function getField - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IGetFieldRequest} request GetFieldRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#updateField}. - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @typedef UpdateFieldCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + return FileDescriptorProto; + })(); - /** - * Calls UpdateField. - * @function updateField - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IUpdateFieldRequest} request UpdateFieldRequest message or plain object - * @param {google.firestore.admin.v1.FirestoreAdmin.UpdateFieldCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(FirestoreAdmin.prototype.updateField = function updateField(request, callback) { - return this.rpcCall(updateField, $root.google.firestore.admin.v1.UpdateFieldRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateField" }); + protobuf.DescriptorProto = (function() { - /** - * Calls UpdateField. - * @function updateField - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IUpdateFieldRequest} request UpdateFieldRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + */ - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#listFields}. - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @typedef ListFieldsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.firestore.admin.v1.ListFieldsResponse} [response] ListFieldsResponse - */ + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } - /** - * Calls ListFields. - * @function listFields - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IListFieldsRequest} request ListFieldsRequest message or plain object - * @param {google.firestore.admin.v1.FirestoreAdmin.ListFieldsCallback} callback Node-style callback called with the error, if any, and ListFieldsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(FirestoreAdmin.prototype.listFields = function listFields(request, callback) { - return this.rpcCall(listFields, $root.google.firestore.admin.v1.ListFieldsRequest, $root.google.firestore.admin.v1.ListFieldsResponse, request, callback); - }, "name", { value: "ListFields" }); + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; - /** - * Calls ListFields. - * @function listFields - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IListFieldsRequest} request ListFieldsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#exportDocuments}. - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @typedef ExportDocumentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; - /** - * Calls ExportDocuments. - * @function exportDocuments - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IExportDocumentsRequest} request ExportDocumentsRequest message or plain object - * @param {google.firestore.admin.v1.FirestoreAdmin.ExportDocumentsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(FirestoreAdmin.prototype.exportDocuments = function exportDocuments(request, callback) { - return this.rpcCall(exportDocuments, $root.google.firestore.admin.v1.ExportDocumentsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ExportDocuments" }); + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; - /** - * Calls ExportDocuments. - * @function exportDocuments - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IExportDocumentsRequest} request ExportDocumentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#importDocuments}. - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @typedef ImportDocumentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; - /** - * Calls ImportDocuments. - * @function importDocuments - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IImportDocumentsRequest} request ImportDocumentsRequest message or plain object - * @param {google.firestore.admin.v1.FirestoreAdmin.ImportDocumentsCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(FirestoreAdmin.prototype.importDocuments = function importDocuments(request, callback) { - return this.rpcCall(importDocuments, $root.google.firestore.admin.v1.ImportDocumentsRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "ImportDocuments" }); + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; - /** - * Calls ImportDocuments. - * @function importDocuments - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IImportDocumentsRequest} request ImportDocumentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#getDatabase}. - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @typedef GetDatabaseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.firestore.admin.v1.Database} [response] Database - */ + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; - /** - * Calls GetDatabase. - * @function getDatabase - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IGetDatabaseRequest} request GetDatabaseRequest message or plain object - * @param {google.firestore.admin.v1.FirestoreAdmin.GetDatabaseCallback} callback Node-style callback called with the error, if any, and Database - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(FirestoreAdmin.prototype.getDatabase = function getDatabase(request, callback) { - return this.rpcCall(getDatabase, $root.google.firestore.admin.v1.GetDatabaseRequest, $root.google.firestore.admin.v1.Database, request, callback); - }, "name", { value: "GetDatabase" }); + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; - /** - * Calls GetDatabase. - * @function getDatabase - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IGetDatabaseRequest} request GetDatabaseRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#listDatabases}. - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @typedef ListDatabasesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.firestore.admin.v1.ListDatabasesResponse} [response] ListDatabasesResponse - */ + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; - /** - * Calls ListDatabases. - * @function listDatabases - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IListDatabasesRequest} request ListDatabasesRequest message or plain object - * @param {google.firestore.admin.v1.FirestoreAdmin.ListDatabasesCallback} callback Node-style callback called with the error, if any, and ListDatabasesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(FirestoreAdmin.prototype.listDatabases = function listDatabases(request, callback) { - return this.rpcCall(listDatabases, $root.google.firestore.admin.v1.ListDatabasesRequest, $root.google.firestore.admin.v1.ListDatabasesResponse, request, callback); - }, "name", { value: "ListDatabases" }); + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Calls ListDatabases. - * @function listDatabases - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IListDatabasesRequest} request ListDatabasesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; - /** - * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#updateDatabase}. - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @typedef UpdateDatabaseCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + DescriptorProto.ExtensionRange = (function() { - /** - * Calls UpdateDatabase. - * @function updateDatabase - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IUpdateDatabaseRequest} request UpdateDatabaseRequest message or plain object - * @param {google.firestore.admin.v1.FirestoreAdmin.UpdateDatabaseCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(FirestoreAdmin.prototype.updateDatabase = function updateDatabase(request, callback) { - return this.rpcCall(updateDatabase, $root.google.firestore.admin.v1.UpdateDatabaseRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateDatabase" }); + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ - /** - * Calls UpdateDatabase. - * @function updateDatabase - * @memberof google.firestore.admin.v1.FirestoreAdmin - * @instance - * @param {google.firestore.admin.v1.IUpdateDatabaseRequest} request UpdateDatabaseRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(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]]; + } - return FirestoreAdmin; - })(); + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; - v1.ListDatabasesRequest = (function() { + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; - /** - * Properties of a ListDatabasesRequest. - * @memberof google.firestore.admin.v1 - * @interface IListDatabasesRequest - * @property {string|null} [parent] ListDatabasesRequest parent - */ + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; - /** - * Constructs a new ListDatabasesRequest. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a ListDatabasesRequest. - * @implements IListDatabasesRequest - * @constructor - * @param {google.firestore.admin.v1.IListDatabasesRequest=} [properties] Properties to set - */ - function ListDatabasesRequest(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 an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); } + return message; + }; - /** - * ListDatabasesRequest parent. - * @member {string} parent - * @memberof google.firestore.admin.v1.ListDatabasesRequest - * @instance - */ - ListDatabasesRequest.prototype.parent = ""; + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; - /** - * Creates a ListDatabasesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.ListDatabasesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.ListDatabasesRequest} ListDatabasesRequest - */ - ListDatabasesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.ListDatabasesRequest) - return object; - var message = new $root.google.firestore.admin.v1.ListDatabasesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - return message; - }; + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a ListDatabasesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.ListDatabasesRequest - * @static - * @param {google.firestore.admin.v1.ListDatabasesRequest} message ListDatabasesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDatabasesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; - }; + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; - /** - * Converts this ListDatabasesRequest to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.ListDatabasesRequest - * @instance - * @returns {Object.} JSON object - */ - ListDatabasesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ExtensionRange; + })(); - return ListDatabasesRequest; - })(); + DescriptorProto.ReservedRange = (function() { - v1.ListDatabasesResponse = (function() { + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ - /** - * Properties of a ListDatabasesResponse. - * @memberof google.firestore.admin.v1 - * @interface IListDatabasesResponse - * @property {Array.|null} [databases] ListDatabasesResponse databases - */ + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(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]]; + } - /** - * Constructs a new ListDatabasesResponse. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a ListDatabasesResponse. - * @implements IListDatabasesResponse - * @constructor - * @param {google.firestore.admin.v1.IListDatabasesResponse=} [properties] Properties to set - */ - function ListDatabasesResponse(properties) { - this.databases = []; - 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]]; - } + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; - /** - * ListDatabasesResponse databases. - * @member {Array.} databases - * @memberof google.firestore.admin.v1.ListDatabasesResponse - * @instance - */ - ListDatabasesResponse.prototype.databases = $util.emptyArray; + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; - /** - * Creates a ListDatabasesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.ListDatabasesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.ListDatabasesResponse} ListDatabasesResponse - */ - ListDatabasesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.ListDatabasesResponse) - return object; - var message = new $root.google.firestore.admin.v1.ListDatabasesResponse(); - if (object.databases) { - if (!Array.isArray(object.databases)) - throw TypeError(".google.firestore.admin.v1.ListDatabasesResponse.databases: array expected"); - message.databases = []; - for (var i = 0; i < object.databases.length; ++i) { - if (typeof object.databases[i] !== "object") - throw TypeError(".google.firestore.admin.v1.ListDatabasesResponse.databases: object expected"); - message.databases[i] = $root.google.firestore.admin.v1.Database.fromObject(object.databases[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a ListDatabasesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.ListDatabasesResponse - * @static - * @param {google.firestore.admin.v1.ListDatabasesResponse} message ListDatabasesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListDatabasesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.databases = []; - if (message.databases && message.databases.length) { - object.databases = []; - for (var j = 0; j < message.databases.length; ++j) - object.databases[j] = $root.google.firestore.admin.v1.Database.toObject(message.databases[j], options); - } + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) return object; - }; - - /** - * Converts this ListDatabasesResponse to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.ListDatabasesResponse - * @instance - * @returns {Object.} JSON object - */ - ListDatabasesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ListDatabasesResponse; - })(); + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; - v1.GetDatabaseRequest = (function() { + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; - /** - * Properties of a GetDatabaseRequest. - * @memberof google.firestore.admin.v1 - * @interface IGetDatabaseRequest - * @property {string|null} [name] GetDatabaseRequest name - */ + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new GetDatabaseRequest. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a GetDatabaseRequest. - * @implements IGetDatabaseRequest - * @constructor - * @param {google.firestore.admin.v1.IGetDatabaseRequest=} [properties] Properties to set - */ - function GetDatabaseRequest(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]]; + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; - /** - * GetDatabaseRequest name. - * @member {string} name - * @memberof google.firestore.admin.v1.GetDatabaseRequest - * @instance - */ - GetDatabaseRequest.prototype.name = ""; - - /** - * Creates a GetDatabaseRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.GetDatabaseRequest - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.GetDatabaseRequest} GetDatabaseRequest - */ - GetDatabaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.GetDatabaseRequest) - return object; - var message = new $root.google.firestore.admin.v1.GetDatabaseRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + return ReservedRange; + })(); - /** - * Creates a plain object from a GetDatabaseRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.GetDatabaseRequest - * @static - * @param {google.firestore.admin.v1.GetDatabaseRequest} message GetDatabaseRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetDatabaseRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + return DescriptorProto; + })(); - /** - * Converts this GetDatabaseRequest to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.GetDatabaseRequest - * @instance - * @returns {Object.} JSON object - */ - GetDatabaseRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + protobuf.ExtensionRangeOptions = (function() { - return GetDatabaseRequest; - })(); + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + */ - v1.UpdateDatabaseRequest = (function() { + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } - /** - * Properties of an UpdateDatabaseRequest. - * @memberof google.firestore.admin.v1 - * @interface IUpdateDatabaseRequest - * @property {google.firestore.admin.v1.IDatabase|null} [database] UpdateDatabaseRequest database - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDatabaseRequest updateMask - */ + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Constructs a new UpdateDatabaseRequest. - * @memberof google.firestore.admin.v1 - * @classdesc Represents an UpdateDatabaseRequest. - * @implements IUpdateDatabaseRequest - * @constructor - * @param {google.firestore.admin.v1.IUpdateDatabaseRequest=} [properties] Properties to set - */ - function UpdateDatabaseRequest(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 an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } + } + return message; + }; - /** - * UpdateDatabaseRequest database. - * @member {google.firestore.admin.v1.IDatabase|null|undefined} database - * @memberof google.firestore.admin.v1.UpdateDatabaseRequest - * @instance - */ - UpdateDatabaseRequest.prototype.database = null; - - /** - * UpdateDatabaseRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.firestore.admin.v1.UpdateDatabaseRequest - * @instance - */ - UpdateDatabaseRequest.prototype.updateMask = null; + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; - /** - * Creates an UpdateDatabaseRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.UpdateDatabaseRequest - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.UpdateDatabaseRequest} UpdateDatabaseRequest - */ - UpdateDatabaseRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.UpdateDatabaseRequest) - return object; - var message = new $root.google.firestore.admin.v1.UpdateDatabaseRequest(); - if (object.database != null) { - if (typeof object.database !== "object") - throw TypeError(".google.firestore.admin.v1.UpdateDatabaseRequest.database: object expected"); - message.database = $root.google.firestore.admin.v1.Database.fromObject(object.database); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.firestore.admin.v1.UpdateDatabaseRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from an UpdateDatabaseRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.UpdateDatabaseRequest - * @static - * @param {google.firestore.admin.v1.UpdateDatabaseRequest} message UpdateDatabaseRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateDatabaseRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.database = null; - object.updateMask = null; - } - if (message.database != null && message.hasOwnProperty("database")) - object.database = $root.google.firestore.admin.v1.Database.toObject(message.database, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; - /** - * Converts this UpdateDatabaseRequest to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.UpdateDatabaseRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateDatabaseRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ExtensionRangeOptions; + })(); - return UpdateDatabaseRequest; - })(); + protobuf.FieldDescriptorProto = (function() { - v1.UpdateDatabaseMetadata = (function() { + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ - /** - * Properties of an UpdateDatabaseMetadata. - * @memberof google.firestore.admin.v1 - * @interface IUpdateDatabaseMetadata - */ + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(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]]; + } - /** - * Constructs a new UpdateDatabaseMetadata. - * @memberof google.firestore.admin.v1 - * @classdesc Represents an UpdateDatabaseMetadata. - * @implements IUpdateDatabaseMetadata - * @constructor - * @param {google.firestore.admin.v1.IUpdateDatabaseMetadata=} [properties] Properties to set - */ - function UpdateDatabaseMetadata(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]]; - } + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; - /** - * Creates an UpdateDatabaseMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.UpdateDatabaseMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.UpdateDatabaseMetadata} UpdateDatabaseMetadata - */ - UpdateDatabaseMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.UpdateDatabaseMetadata) - return object; - return new $root.google.firestore.admin.v1.UpdateDatabaseMetadata(); - }; + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; - /** - * Creates a plain object from an UpdateDatabaseMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.UpdateDatabaseMetadata - * @static - * @param {google.firestore.admin.v1.UpdateDatabaseMetadata} message UpdateDatabaseMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateDatabaseMetadata.toObject = function toObject() { - return {}; - }; + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; - /** - * Converts this UpdateDatabaseMetadata to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.UpdateDatabaseMetadata - * @instance - * @returns {Object.} JSON object - */ - UpdateDatabaseMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; - return UpdateDatabaseMetadata; - })(); + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; - v1.CreateIndexRequest = (function() { + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; - /** - * Properties of a CreateIndexRequest. - * @memberof google.firestore.admin.v1 - * @interface ICreateIndexRequest - * @property {string|null} [parent] CreateIndexRequest parent - * @property {google.firestore.admin.v1.IIndex|null} [index] CreateIndexRequest index - */ + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; - /** - * Constructs a new CreateIndexRequest. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a CreateIndexRequest. - * @implements ICreateIndexRequest - * @constructor - * @param {google.firestore.admin.v1.ICreateIndexRequest=} [properties] Properties to set - */ - function CreateIndexRequest(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]]; - } + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; - /** - * CreateIndexRequest parent. - * @member {string} parent - * @memberof google.firestore.admin.v1.CreateIndexRequest - * @instance - */ - CreateIndexRequest.prototype.parent = ""; + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; - /** - * CreateIndexRequest index. - * @member {google.firestore.admin.v1.IIndex|null|undefined} index - * @memberof google.firestore.admin.v1.CreateIndexRequest - * @instance - */ - CreateIndexRequest.prototype.index = null; + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; - /** - * Creates a CreateIndexRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.CreateIndexRequest - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.CreateIndexRequest} CreateIndexRequest - */ - CreateIndexRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.CreateIndexRequest) - return object; - var message = new $root.google.firestore.admin.v1.CreateIndexRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.index != null) { - if (typeof object.index !== "object") - throw TypeError(".google.firestore.admin.v1.CreateIndexRequest.index: object expected"); - message.index = $root.google.firestore.admin.v1.Index.fromObject(object.index); - } - return message; - }; + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; - /** - * Creates a plain object from a CreateIndexRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.CreateIndexRequest - * @static - * @param {google.firestore.admin.v1.CreateIndexRequest} message CreateIndexRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateIndexRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.index = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.index != null && message.hasOwnProperty("index")) - object.index = $root.google.firestore.admin.v1.Index.toObject(message.index, options); - return object; - }; + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; - /** - * Converts this CreateIndexRequest to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.CreateIndexRequest - * @instance - * @returns {Object.} JSON object - */ - CreateIndexRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; - return CreateIndexRequest; - })(); + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v1.ListIndexesRequest = (function() { + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; - /** - * Properties of a ListIndexesRequest. - * @memberof google.firestore.admin.v1 - * @interface IListIndexesRequest - * @property {string|null} [parent] ListIndexesRequest parent - * @property {string|null} [filter] ListIndexesRequest filter - * @property {number|null} [pageSize] ListIndexesRequest pageSize - * @property {string|null} [pageToken] ListIndexesRequest pageToken - */ + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {string} + * @property {string} TYPE_DOUBLE=TYPE_DOUBLE TYPE_DOUBLE value + * @property {string} TYPE_FLOAT=TYPE_FLOAT TYPE_FLOAT value + * @property {string} TYPE_INT64=TYPE_INT64 TYPE_INT64 value + * @property {string} TYPE_UINT64=TYPE_UINT64 TYPE_UINT64 value + * @property {string} TYPE_INT32=TYPE_INT32 TYPE_INT32 value + * @property {string} TYPE_FIXED64=TYPE_FIXED64 TYPE_FIXED64 value + * @property {string} TYPE_FIXED32=TYPE_FIXED32 TYPE_FIXED32 value + * @property {string} TYPE_BOOL=TYPE_BOOL TYPE_BOOL value + * @property {string} TYPE_STRING=TYPE_STRING TYPE_STRING value + * @property {string} TYPE_GROUP=TYPE_GROUP TYPE_GROUP value + * @property {string} TYPE_MESSAGE=TYPE_MESSAGE TYPE_MESSAGE value + * @property {string} TYPE_BYTES=TYPE_BYTES TYPE_BYTES value + * @property {string} TYPE_UINT32=TYPE_UINT32 TYPE_UINT32 value + * @property {string} TYPE_ENUM=TYPE_ENUM TYPE_ENUM value + * @property {string} TYPE_SFIXED32=TYPE_SFIXED32 TYPE_SFIXED32 value + * @property {string} TYPE_SFIXED64=TYPE_SFIXED64 TYPE_SFIXED64 value + * @property {string} TYPE_SINT32=TYPE_SINT32 TYPE_SINT32 value + * @property {string} TYPE_SINT64=TYPE_SINT64 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = "TYPE_DOUBLE"; + values[valuesById[2] = "TYPE_FLOAT"] = "TYPE_FLOAT"; + values[valuesById[3] = "TYPE_INT64"] = "TYPE_INT64"; + values[valuesById[4] = "TYPE_UINT64"] = "TYPE_UINT64"; + values[valuesById[5] = "TYPE_INT32"] = "TYPE_INT32"; + values[valuesById[6] = "TYPE_FIXED64"] = "TYPE_FIXED64"; + values[valuesById[7] = "TYPE_FIXED32"] = "TYPE_FIXED32"; + values[valuesById[8] = "TYPE_BOOL"] = "TYPE_BOOL"; + values[valuesById[9] = "TYPE_STRING"] = "TYPE_STRING"; + values[valuesById[10] = "TYPE_GROUP"] = "TYPE_GROUP"; + values[valuesById[11] = "TYPE_MESSAGE"] = "TYPE_MESSAGE"; + values[valuesById[12] = "TYPE_BYTES"] = "TYPE_BYTES"; + values[valuesById[13] = "TYPE_UINT32"] = "TYPE_UINT32"; + values[valuesById[14] = "TYPE_ENUM"] = "TYPE_ENUM"; + values[valuesById[15] = "TYPE_SFIXED32"] = "TYPE_SFIXED32"; + values[valuesById[16] = "TYPE_SFIXED64"] = "TYPE_SFIXED64"; + values[valuesById[17] = "TYPE_SINT32"] = "TYPE_SINT32"; + values[valuesById[18] = "TYPE_SINT64"] = "TYPE_SINT64"; + return values; + })(); - /** - * Constructs a new ListIndexesRequest. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a ListIndexesRequest. - * @implements IListIndexesRequest - * @constructor - * @param {google.firestore.admin.v1.IListIndexesRequest=} [properties] Properties to set - */ - function ListIndexesRequest(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]]; - } + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {string} + * @property {string} LABEL_OPTIONAL=LABEL_OPTIONAL LABEL_OPTIONAL value + * @property {string} LABEL_REQUIRED=LABEL_REQUIRED LABEL_REQUIRED value + * @property {string} LABEL_REPEATED=LABEL_REPEATED LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = "LABEL_OPTIONAL"; + values[valuesById[2] = "LABEL_REQUIRED"] = "LABEL_REQUIRED"; + values[valuesById[3] = "LABEL_REPEATED"] = "LABEL_REPEATED"; + return values; + })(); - /** - * ListIndexesRequest parent. - * @member {string} parent - * @memberof google.firestore.admin.v1.ListIndexesRequest - * @instance - */ - ListIndexesRequest.prototype.parent = ""; + return FieldDescriptorProto; + })(); - /** - * ListIndexesRequest filter. - * @member {string} filter - * @memberof google.firestore.admin.v1.ListIndexesRequest - * @instance - */ - ListIndexesRequest.prototype.filter = ""; + protobuf.OneofDescriptorProto = (function() { - /** - * ListIndexesRequest pageSize. - * @member {number} pageSize - * @memberof google.firestore.admin.v1.ListIndexesRequest - * @instance - */ - ListIndexesRequest.prototype.pageSize = 0; + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ - /** - * ListIndexesRequest pageToken. - * @member {string} pageToken - * @memberof google.firestore.admin.v1.ListIndexesRequest - * @instance - */ - ListIndexesRequest.prototype.pageToken = ""; + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(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 ListIndexesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.ListIndexesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.ListIndexesRequest} ListIndexesRequest - */ - ListIndexesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.ListIndexesRequest) - return object; - var message = new $root.google.firestore.admin.v1.ListIndexesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; - /** - * Creates a plain object from a ListIndexesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.ListIndexesRequest - * @static - * @param {google.firestore.admin.v1.ListIndexesRequest} message ListIndexesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListIndexesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; - /** - * Converts this ListIndexesRequest to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.ListIndexesRequest - * @instance - * @returns {Object.} JSON object - */ - ListIndexesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; - return ListIndexesRequest; - })(); + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; - v1.ListIndexesResponse = (function() { + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a ListIndexesResponse. - * @memberof google.firestore.admin.v1 - * @interface IListIndexesResponse - * @property {Array.|null} [indexes] ListIndexesResponse indexes - * @property {string|null} [nextPageToken] ListIndexesResponse nextPageToken - */ + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; - /** - * Constructs a new ListIndexesResponse. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a ListIndexesResponse. - * @implements IListIndexesResponse - * @constructor - * @param {google.firestore.admin.v1.IListIndexesResponse=} [properties] Properties to set - */ - function ListIndexesResponse(properties) { - this.indexes = []; - 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]]; - } + return OneofDescriptorProto; + })(); - /** - * ListIndexesResponse indexes. - * @member {Array.} indexes - * @memberof google.firestore.admin.v1.ListIndexesResponse - * @instance - */ - ListIndexesResponse.prototype.indexes = $util.emptyArray; + protobuf.EnumDescriptorProto = (function() { - /** - * ListIndexesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.firestore.admin.v1.ListIndexesResponse - * @instance - */ - ListIndexesResponse.prototype.nextPageToken = ""; + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ - /** - * Creates a ListIndexesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.ListIndexesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.ListIndexesResponse} ListIndexesResponse - */ - ListIndexesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.ListIndexesResponse) - return object; - var message = new $root.google.firestore.admin.v1.ListIndexesResponse(); - if (object.indexes) { - if (!Array.isArray(object.indexes)) - throw TypeError(".google.firestore.admin.v1.ListIndexesResponse.indexes: array expected"); - message.indexes = []; - for (var i = 0; i < object.indexes.length; ++i) { - if (typeof object.indexes[i] !== "object") - throw TypeError(".google.firestore.admin.v1.ListIndexesResponse.indexes: object expected"); - message.indexes[i] = $root.google.firestore.admin.v1.Index.fromObject(object.indexes[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + 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 plain object from a ListIndexesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.ListIndexesResponse - * @static - * @param {google.firestore.admin.v1.ListIndexesResponse} message ListIndexesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListIndexesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.indexes = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.indexes && message.indexes.length) { - object.indexes = []; - for (var j = 0; j < message.indexes.length; ++j) - object.indexes[j] = $root.google.firestore.admin.v1.Index.toObject(message.indexes[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; - /** - * Converts this ListIndexesResponse to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.ListIndexesResponse - * @instance - * @returns {Object.} JSON object - */ - ListIndexesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; - return ListIndexesResponse; - })(); + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; - v1.GetIndexRequest = (function() { + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - /** - * Properties of a GetIndexRequest. - * @memberof google.firestore.admin.v1 - * @interface IGetIndexRequest - * @property {string|null} [name] GetIndexRequest name - */ + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - /** - * Constructs a new GetIndexRequest. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a GetIndexRequest. - * @implements IGetIndexRequest - * @constructor - * @param {google.firestore.admin.v1.IGetIndexRequest=} [properties] Properties to set - */ - function GetIndexRequest(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 an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; - /** - * GetIndexRequest name. - * @member {string} name - * @memberof google.firestore.admin.v1.GetIndexRequest - * @instance - */ - GetIndexRequest.prototype.name = ""; - - /** - * Creates a GetIndexRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.GetIndexRequest - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.GetIndexRequest} GetIndexRequest - */ - GetIndexRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.GetIndexRequest) - return object; - var message = new $root.google.firestore.admin.v1.GetIndexRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetIndexRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.GetIndexRequest - * @static - * @param {google.firestore.admin.v1.GetIndexRequest} message GetIndexRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetIndexRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; - /** - * Converts this GetIndexRequest to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.GetIndexRequest - * @instance - * @returns {Object.} JSON object - */ - GetIndexRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return GetIndexRequest; - })(); + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; - v1.DeleteIndexRequest = (function() { + EnumDescriptorProto.EnumReservedRange = (function() { - /** - * Properties of a DeleteIndexRequest. - * @memberof google.firestore.admin.v1 - * @interface IDeleteIndexRequest - * @property {string|null} [name] DeleteIndexRequest name - */ + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ - /** - * Constructs a new DeleteIndexRequest. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a DeleteIndexRequest. - * @implements IDeleteIndexRequest - * @constructor - * @param {google.firestore.admin.v1.IDeleteIndexRequest=} [properties] Properties to set - */ - function DeleteIndexRequest(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]]; - } + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(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]]; + } - /** - * DeleteIndexRequest name. - * @member {string} name - * @memberof google.firestore.admin.v1.DeleteIndexRequest - * @instance - */ - DeleteIndexRequest.prototype.name = ""; + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; - /** - * Creates a DeleteIndexRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.DeleteIndexRequest - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.DeleteIndexRequest} DeleteIndexRequest - */ - DeleteIndexRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.DeleteIndexRequest) - return object; - var message = new $root.google.firestore.admin.v1.DeleteIndexRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; - /** - * Creates a plain object from a DeleteIndexRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.DeleteIndexRequest - * @static - * @param {google.firestore.admin.v1.DeleteIndexRequest} message DeleteIndexRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteIndexRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) return object; - }; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; - /** - * Converts this DeleteIndexRequest to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.DeleteIndexRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteIndexRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; - return DeleteIndexRequest; - })(); + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - v1.UpdateFieldRequest = (function() { + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; - /** - * Properties of an UpdateFieldRequest. - * @memberof google.firestore.admin.v1 - * @interface IUpdateFieldRequest - * @property {google.firestore.admin.v1.IField|null} [field] UpdateFieldRequest field - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFieldRequest updateMask - */ + return EnumReservedRange; + })(); - /** - * Constructs a new UpdateFieldRequest. - * @memberof google.firestore.admin.v1 - * @classdesc Represents an UpdateFieldRequest. - * @implements IUpdateFieldRequest - * @constructor - * @param {google.firestore.admin.v1.IUpdateFieldRequest=} [properties] Properties to set - */ - function UpdateFieldRequest(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]]; - } + return EnumDescriptorProto; + })(); - /** - * UpdateFieldRequest field. - * @member {google.firestore.admin.v1.IField|null|undefined} field - * @memberof google.firestore.admin.v1.UpdateFieldRequest - * @instance - */ - UpdateFieldRequest.prototype.field = null; + protobuf.EnumValueDescriptorProto = (function() { - /** - * UpdateFieldRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.firestore.admin.v1.UpdateFieldRequest - * @instance - */ - UpdateFieldRequest.prototype.updateMask = null; + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ - /** - * Creates an UpdateFieldRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.UpdateFieldRequest - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.UpdateFieldRequest} UpdateFieldRequest - */ - UpdateFieldRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.UpdateFieldRequest) - return object; - var message = new $root.google.firestore.admin.v1.UpdateFieldRequest(); - if (object.field != null) { - if (typeof object.field !== "object") - throw TypeError(".google.firestore.admin.v1.UpdateFieldRequest.field: object expected"); - message.field = $root.google.firestore.admin.v1.Field.fromObject(object.field); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.firestore.admin.v1.UpdateFieldRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(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 plain object from an UpdateFieldRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.UpdateFieldRequest - * @static - * @param {google.firestore.admin.v1.UpdateFieldRequest} message UpdateFieldRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateFieldRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.field = null; - object.updateMask = null; - } - if (message.field != null && message.hasOwnProperty("field")) - object.field = $root.google.firestore.admin.v1.Field.toObject(message.field, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; - /** - * Converts this UpdateFieldRequest to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.UpdateFieldRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateFieldRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; - return UpdateFieldRequest; - })(); + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; - v1.GetFieldRequest = (function() { + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; - /** - * Properties of a GetFieldRequest. - * @memberof google.firestore.admin.v1 - * @interface IGetFieldRequest - * @property {string|null} [name] GetFieldRequest name - */ + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; - /** - * Constructs a new GetFieldRequest. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a GetFieldRequest. - * @implements IGetFieldRequest - * @constructor - * @param {google.firestore.admin.v1.IGetFieldRequest=} [properties] Properties to set - */ - function GetFieldRequest(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]]; - } + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * GetFieldRequest name. - * @member {string} name - * @memberof google.firestore.admin.v1.GetFieldRequest - * @instance - */ - GetFieldRequest.prototype.name = ""; + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; - /** - * Creates a GetFieldRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.GetFieldRequest - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.GetFieldRequest} GetFieldRequest - */ - GetFieldRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.GetFieldRequest) - return object; - var message = new $root.google.firestore.admin.v1.GetFieldRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + return EnumValueDescriptorProto; + })(); - /** - * Creates a plain object from a GetFieldRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.GetFieldRequest - * @static - * @param {google.firestore.admin.v1.GetFieldRequest} message GetFieldRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetFieldRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; + protobuf.ServiceDescriptorProto = (function() { - /** - * Converts this GetFieldRequest to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.GetFieldRequest - * @instance - * @returns {Object.} JSON object - */ - GetFieldRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return GetFieldRequest; - })(); - - v1.ListFieldsRequest = (function() { + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ - /** - * Properties of a ListFieldsRequest. - * @memberof google.firestore.admin.v1 - * @interface IListFieldsRequest - * @property {string|null} [parent] ListFieldsRequest parent - * @property {string|null} [filter] ListFieldsRequest filter - * @property {number|null} [pageSize] ListFieldsRequest pageSize - * @property {string|null} [pageToken] ListFieldsRequest pageToken - */ + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + 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]]; + } - /** - * Constructs a new ListFieldsRequest. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a ListFieldsRequest. - * @implements IListFieldsRequest - * @constructor - * @param {google.firestore.admin.v1.IListFieldsRequest=} [properties] Properties to set - */ - function ListFieldsRequest(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]]; - } + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; - /** - * ListFieldsRequest parent. - * @member {string} parent - * @memberof google.firestore.admin.v1.ListFieldsRequest - * @instance - */ - ListFieldsRequest.prototype.parent = ""; + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; - /** - * ListFieldsRequest filter. - * @member {string} filter - * @memberof google.firestore.admin.v1.ListFieldsRequest - * @instance - */ - ListFieldsRequest.prototype.filter = ""; + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; - /** - * ListFieldsRequest pageSize. - * @member {number} pageSize - * @memberof google.firestore.admin.v1.ListFieldsRequest - * @instance - */ - ListFieldsRequest.prototype.pageSize = 0; + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; - /** - * ListFieldsRequest pageToken. - * @member {string} pageToken - * @memberof google.firestore.admin.v1.ListFieldsRequest - * @instance - */ - ListFieldsRequest.prototype.pageToken = ""; + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; - /** - * Creates a ListFieldsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.ListFieldsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.ListFieldsRequest} ListFieldsRequest - */ - ListFieldsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.ListFieldsRequest) - return object; - var message = new $root.google.firestore.admin.v1.ListFieldsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.filter != null) - message.filter = String(object.filter); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a ListFieldsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.ListFieldsRequest - * @static - * @param {google.firestore.admin.v1.ListFieldsRequest} message ListFieldsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFieldsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.filter = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; - /** - * Converts this ListFieldsRequest to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.ListFieldsRequest - * @instance - * @returns {Object.} JSON object - */ - ListFieldsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ServiceDescriptorProto; + })(); - return ListFieldsRequest; - })(); + protobuf.MethodDescriptorProto = (function() { - v1.ListFieldsResponse = (function() { + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ - /** - * Properties of a ListFieldsResponse. - * @memberof google.firestore.admin.v1 - * @interface IListFieldsResponse - * @property {Array.|null} [fields] ListFieldsResponse fields - * @property {string|null} [nextPageToken] ListFieldsResponse nextPageToken - */ - - /** - * Constructs a new ListFieldsResponse. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a ListFieldsResponse. - * @implements IListFieldsResponse - * @constructor - * @param {google.firestore.admin.v1.IListFieldsResponse=} [properties] Properties to set - */ - function ListFieldsResponse(properties) { - this.fields = []; - 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]]; - } + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(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]]; + } - /** - * ListFieldsResponse fields. - * @member {Array.} fields - * @memberof google.firestore.admin.v1.ListFieldsResponse - * @instance - */ - ListFieldsResponse.prototype.fields = $util.emptyArray; + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; - /** - * ListFieldsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.firestore.admin.v1.ListFieldsResponse - * @instance - */ - ListFieldsResponse.prototype.nextPageToken = ""; + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; - /** - * Creates a ListFieldsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.ListFieldsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.ListFieldsResponse} ListFieldsResponse - */ - ListFieldsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.ListFieldsResponse) - return object; - var message = new $root.google.firestore.admin.v1.ListFieldsResponse(); - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".google.firestore.admin.v1.ListFieldsResponse.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".google.firestore.admin.v1.ListFieldsResponse.fields: object expected"); - message.fields[i] = $root.google.firestore.admin.v1.Field.fromObject(object.fields[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; - /** - * Creates a plain object from a ListFieldsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.ListFieldsResponse - * @static - * @param {google.firestore.admin.v1.ListFieldsResponse} message ListFieldsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListFieldsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fields = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.google.firestore.admin.v1.Field.toObject(message.fields[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; - /** - * Converts this ListFieldsResponse to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.ListFieldsResponse - * @instance - * @returns {Object.} JSON object - */ - ListFieldsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; - return ListFieldsResponse; - })(); + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; - v1.ExportDocumentsRequest = (function() { + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; - /** - * Properties of an ExportDocumentsRequest. - * @memberof google.firestore.admin.v1 - * @interface IExportDocumentsRequest - * @property {string|null} [name] ExportDocumentsRequest name - * @property {Array.|null} [collectionIds] ExportDocumentsRequest collectionIds - * @property {string|null} [outputUriPrefix] ExportDocumentsRequest outputUriPrefix - */ + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; - /** - * Constructs a new ExportDocumentsRequest. - * @memberof google.firestore.admin.v1 - * @classdesc Represents an ExportDocumentsRequest. - * @implements IExportDocumentsRequest - * @constructor - * @param {google.firestore.admin.v1.IExportDocumentsRequest=} [properties] Properties to set - */ - function ExportDocumentsRequest(properties) { - this.collectionIds = []; - 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]]; - } + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ExportDocumentsRequest name. - * @member {string} name - * @memberof google.firestore.admin.v1.ExportDocumentsRequest - * @instance - */ - ExportDocumentsRequest.prototype.name = ""; + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; - /** - * ExportDocumentsRequest collectionIds. - * @member {Array.} collectionIds - * @memberof google.firestore.admin.v1.ExportDocumentsRequest - * @instance - */ - ExportDocumentsRequest.prototype.collectionIds = $util.emptyArray; + return MethodDescriptorProto; + })(); - /** - * ExportDocumentsRequest outputUriPrefix. - * @member {string} outputUriPrefix - * @memberof google.firestore.admin.v1.ExportDocumentsRequest - * @instance - */ - ExportDocumentsRequest.prototype.outputUriPrefix = ""; + protobuf.FileOptions = (function() { - /** - * Creates an ExportDocumentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.ExportDocumentsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.ExportDocumentsRequest} ExportDocumentsRequest - */ - ExportDocumentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.ExportDocumentsRequest) - return object; - var message = new $root.google.firestore.admin.v1.ExportDocumentsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.collectionIds) { - if (!Array.isArray(object.collectionIds)) - throw TypeError(".google.firestore.admin.v1.ExportDocumentsRequest.collectionIds: array expected"); - message.collectionIds = []; - for (var i = 0; i < object.collectionIds.length; ++i) - message.collectionIds[i] = String(object.collectionIds[i]); - } - if (object.outputUriPrefix != null) - message.outputUriPrefix = String(object.outputUriPrefix); - return message; - }; + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ - /** - * Creates a plain object from an ExportDocumentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.ExportDocumentsRequest - * @static - * @param {google.firestore.admin.v1.ExportDocumentsRequest} message ExportDocumentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportDocumentsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.collectionIds = []; - if (options.defaults) { - object.name = ""; - object.outputUriPrefix = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.collectionIds && message.collectionIds.length) { - object.collectionIds = []; - for (var j = 0; j < message.collectionIds.length; ++j) - object.collectionIds[j] = message.collectionIds[j]; - } - if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) - object.outputUriPrefix = message.outputUriPrefix; - return object; - }; + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + 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]]; + } - /** - * Converts this ExportDocumentsRequest to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.ExportDocumentsRequest - * @instance - * @returns {Object.} JSON object - */ - ExportDocumentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; - return ExportDocumentsRequest; - })(); + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; - v1.ImportDocumentsRequest = (function() { + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; - /** - * Properties of an ImportDocumentsRequest. - * @memberof google.firestore.admin.v1 - * @interface IImportDocumentsRequest - * @property {string|null} [name] ImportDocumentsRequest name - * @property {Array.|null} [collectionIds] ImportDocumentsRequest collectionIds - * @property {string|null} [inputUriPrefix] ImportDocumentsRequest inputUriPrefix - */ + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; - /** - * Constructs a new ImportDocumentsRequest. - * @memberof google.firestore.admin.v1 - * @classdesc Represents an ImportDocumentsRequest. - * @implements IImportDocumentsRequest - * @constructor - * @param {google.firestore.admin.v1.IImportDocumentsRequest=} [properties] Properties to set - */ - function ImportDocumentsRequest(properties) { - this.collectionIds = []; - 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]]; - } + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; - /** - * ImportDocumentsRequest name. - * @member {string} name - * @memberof google.firestore.admin.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.name = ""; + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; - /** - * ImportDocumentsRequest collectionIds. - * @member {Array.} collectionIds - * @memberof google.firestore.admin.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.collectionIds = $util.emptyArray; + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; - /** - * ImportDocumentsRequest inputUriPrefix. - * @member {string} inputUriPrefix - * @memberof google.firestore.admin.v1.ImportDocumentsRequest - * @instance - */ - ImportDocumentsRequest.prototype.inputUriPrefix = ""; + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; - /** - * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.ImportDocumentsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.ImportDocumentsRequest} ImportDocumentsRequest - */ - ImportDocumentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.ImportDocumentsRequest) - return object; - var message = new $root.google.firestore.admin.v1.ImportDocumentsRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.collectionIds) { - if (!Array.isArray(object.collectionIds)) - throw TypeError(".google.firestore.admin.v1.ImportDocumentsRequest.collectionIds: array expected"); - message.collectionIds = []; - for (var i = 0; i < object.collectionIds.length; ++i) - message.collectionIds[i] = String(object.collectionIds[i]); - } - if (object.inputUriPrefix != null) - message.inputUriPrefix = String(object.inputUriPrefix); - return message; - }; - - /** - * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.ImportDocumentsRequest - * @static - * @param {google.firestore.admin.v1.ImportDocumentsRequest} message ImportDocumentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportDocumentsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.collectionIds = []; - if (options.defaults) { - object.name = ""; - object.inputUriPrefix = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.collectionIds && message.collectionIds.length) { - object.collectionIds = []; - for (var j = 0; j < message.collectionIds.length; ++j) - object.collectionIds[j] = message.collectionIds[j]; - } - if (message.inputUriPrefix != null && message.hasOwnProperty("inputUriPrefix")) - object.inputUriPrefix = message.inputUriPrefix; - return object; - }; + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; - /** - * Converts this ImportDocumentsRequest to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.ImportDocumentsRequest - * @instance - * @returns {Object.} JSON object - */ - ImportDocumentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; - return ImportDocumentsRequest; - })(); + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; - v1.Index = (function() { + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; - /** - * Properties of an Index. - * @memberof google.firestore.admin.v1 - * @interface IIndex - * @property {string|null} [name] Index name - * @property {google.firestore.admin.v1.Index.QueryScope|null} [queryScope] Index queryScope - * @property {Array.|null} [fields] Index fields - * @property {google.firestore.admin.v1.Index.State|null} [state] Index state - */ + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; - /** - * Constructs a new Index. - * @memberof google.firestore.admin.v1 - * @classdesc Represents an Index. - * @implements IIndex - * @constructor - * @param {google.firestore.admin.v1.IIndex=} [properties] Properties to set - */ - function Index(properties) { - this.fields = []; - 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]]; - } + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; - /** - * Index name. - * @member {string} name - * @memberof google.firestore.admin.v1.Index - * @instance - */ - Index.prototype.name = ""; + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; - /** - * Index queryScope. - * @member {google.firestore.admin.v1.Index.QueryScope} queryScope - * @memberof google.firestore.admin.v1.Index - * @instance - */ - Index.prototype.queryScope = 0; + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; - /** - * Index fields. - * @member {Array.} fields - * @memberof google.firestore.admin.v1.Index - * @instance - */ - Index.prototype.fields = $util.emptyArray; + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; - /** - * Index state. - * @member {google.firestore.admin.v1.Index.State} state - * @memberof google.firestore.admin.v1.Index - * @instance - */ - Index.prototype.state = 0; + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; - /** - * Creates an Index message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.Index - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.Index} Index - */ - Index.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.Index) - return object; - var message = new $root.google.firestore.admin.v1.Index(); - if (object.name != null) - message.name = String(object.name); - switch (object.queryScope) { - case "QUERY_SCOPE_UNSPECIFIED": - case 0: - message.queryScope = 0; - break; - case "COLLECTION": - case 1: - message.queryScope = 1; - break; - case "COLLECTION_GROUP": - case 2: - message.queryScope = 2; - break; - } - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".google.firestore.admin.v1.Index.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".google.firestore.admin.v1.Index.fields: object expected"); - message.fields[i] = $root.google.firestore.admin.v1.Index.IndexField.fromObject(object.fields[i]); - } - } - switch (object.state) { - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "CREATING": - case 1: - message.state = 1; - break; - case "READY": - case 2: - message.state = 2; - break; - case "NEEDS_REPAIR": - case 3: - message.state = 3; - break; - } - return message; - }; + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; - /** - * Creates a plain object from an Index message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.Index - * @static - * @param {google.firestore.admin.v1.Index} message Index - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Index.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fields = []; - if (options.defaults) { - object.name = ""; - object.queryScope = options.enums === String ? "QUERY_SCOPE_UNSPECIFIED" : 0; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.queryScope != null && message.hasOwnProperty("queryScope")) - object.queryScope = options.enums === String ? $root.google.firestore.admin.v1.Index.QueryScope[message.queryScope] : message.queryScope; - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.google.firestore.admin.v1.Index.IndexField.toObject(message.fields[j], options); - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.firestore.admin.v1.Index.State[message.state] : message.state; - return object; - }; + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; - /** - * Converts this Index to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.Index - * @instance - * @returns {Object.} JSON object - */ - Index.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * QueryScope enum. - * @name google.firestore.admin.v1.Index.QueryScope - * @enum {string} - * @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 - */ - 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"; - return values; - })(); + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - Index.IndexField = (function() { + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; - /** - * Properties of an IndexField. - * @memberof google.firestore.admin.v1.Index - * @interface IIndexField - * @property {string|null} [fieldPath] IndexField fieldPath - * @property {google.firestore.admin.v1.Index.IndexField.Order|null} [order] IndexField order - * @property {google.firestore.admin.v1.Index.IndexField.ArrayConfig|null} [arrayConfig] IndexField arrayConfig - */ + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; - /** - * Constructs a new IndexField. - * @memberof google.firestore.admin.v1.Index - * @classdesc Represents an IndexField. - * @implements IIndexField - * @constructor - * @param {google.firestore.admin.v1.Index.IIndexField=} [properties] Properties to set - */ - function IndexField(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]]; - } + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * IndexField fieldPath. - * @member {string} fieldPath - * @memberof google.firestore.admin.v1.Index.IndexField - * @instance - */ - IndexField.prototype.fieldPath = ""; + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; - /** - * IndexField order. - * @member {google.firestore.admin.v1.Index.IndexField.Order|null|undefined} order - * @memberof google.firestore.admin.v1.Index.IndexField - * @instance - */ - IndexField.prototype.order = null; + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {string} + * @property {string} SPEED=SPEED SPEED value + * @property {string} CODE_SIZE=CODE_SIZE CODE_SIZE value + * @property {string} LITE_RUNTIME=LITE_RUNTIME LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = "SPEED"; + values[valuesById[2] = "CODE_SIZE"] = "CODE_SIZE"; + values[valuesById[3] = "LITE_RUNTIME"] = "LITE_RUNTIME"; + return values; + })(); - /** - * IndexField arrayConfig. - * @member {google.firestore.admin.v1.Index.IndexField.ArrayConfig|null|undefined} arrayConfig - * @memberof google.firestore.admin.v1.Index.IndexField - * @instance - */ - IndexField.prototype.arrayConfig = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * IndexField valueMode. - * @member {"order"|"arrayConfig"|undefined} valueMode - * @memberof google.firestore.admin.v1.Index.IndexField - * @instance - */ - Object.defineProperty(IndexField.prototype, "valueMode", { - get: $util.oneOfGetter($oneOfFields = ["order", "arrayConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); + return FileOptions; + })(); - /** - * Creates an IndexField message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.Index.IndexField - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.Index.IndexField} IndexField - */ - IndexField.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.Index.IndexField) - return object; - var message = new $root.google.firestore.admin.v1.Index.IndexField(); - if (object.fieldPath != null) - message.fieldPath = String(object.fieldPath); - switch (object.order) { - case "ORDER_UNSPECIFIED": - case 0: - message.order = 0; - break; - case "ASCENDING": - case 1: - message.order = 1; - break; - case "DESCENDING": - case 2: - message.order = 2; - break; - } - switch (object.arrayConfig) { - case "ARRAY_CONFIG_UNSPECIFIED": - case 0: - message.arrayConfig = 0; - break; - case "CONTAINS": - case 1: - message.arrayConfig = 1; - break; - } - return message; - }; + protobuf.MessageOptions = (function() { - /** - * Creates a plain object from an IndexField message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.Index.IndexField - * @static - * @param {google.firestore.admin.v1.Index.IndexField} message IndexField - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IndexField.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.fieldPath = ""; - if (message.fieldPath != null && message.hasOwnProperty("fieldPath")) - object.fieldPath = message.fieldPath; - if (message.order != null && message.hasOwnProperty("order")) { - object.order = options.enums === String ? $root.google.firestore.admin.v1.Index.IndexField.Order[message.order] : message.order; - if (options.oneofs) - object.valueMode = "order"; - } - if (message.arrayConfig != null && message.hasOwnProperty("arrayConfig")) { - object.arrayConfig = options.enums === String ? $root.google.firestore.admin.v1.Index.IndexField.ArrayConfig[message.arrayConfig] : message.arrayConfig; - if (options.oneofs) - object.valueMode = "arrayConfig"; - } - return object; - }; + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ - /** - * Converts this IndexField to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.Index.IndexField - * @instance - * @returns {Object.} JSON object - */ - IndexField.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } - /** - * Order enum. - * @name google.firestore.admin.v1.Index.IndexField.Order - * @enum {string} - * @property {string} ORDER_UNSPECIFIED=ORDER_UNSPECIFIED ORDER_UNSPECIFIED value - * @property {string} ASCENDING=ASCENDING ASCENDING value - * @property {string} DESCENDING=DESCENDING DESCENDING value - */ - IndexField.Order = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ORDER_UNSPECIFIED"] = "ORDER_UNSPECIFIED"; - values[valuesById[1] = "ASCENDING"] = "ASCENDING"; - values[valuesById[2] = "DESCENDING"] = "DESCENDING"; - return values; - })(); + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; - /** - * ArrayConfig enum. - * @name google.firestore.admin.v1.Index.IndexField.ArrayConfig - * @enum {string} - * @property {string} ARRAY_CONFIG_UNSPECIFIED=ARRAY_CONFIG_UNSPECIFIED ARRAY_CONFIG_UNSPECIFIED value - * @property {string} CONTAINS=CONTAINS CONTAINS value - */ - IndexField.ArrayConfig = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ARRAY_CONFIG_UNSPECIFIED"] = "ARRAY_CONFIG_UNSPECIFIED"; - values[valuesById[1] = "CONTAINS"] = "CONTAINS"; - return values; - })(); + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; - return IndexField; - })(); + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; - /** - * State enum. - * @name google.firestore.admin.v1.Index.State - * @enum {string} - * @property {string} STATE_UNSPECIFIED=STATE_UNSPECIFIED STATE_UNSPECIFIED value - * @property {string} CREATING=CREATING CREATING value - * @property {string} READY=READY READY value - * @property {string} NEEDS_REPAIR=NEEDS_REPAIR NEEDS_REPAIR value - */ - Index.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED"; - values[valuesById[1] = "CREATING"] = "CREATING"; - values[valuesById[2] = "READY"] = "READY"; - values[valuesById[3] = "NEEDS_REPAIR"] = "NEEDS_REPAIR"; - return values; - })(); + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; - return Index; - })(); + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - v1.LocationMetadata = (function() { + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; - /** - * Properties of a LocationMetadata. - * @memberof google.firestore.admin.v1 - * @interface ILocationMetadata - */ + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; - /** - * Constructs a new LocationMetadata. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a LocationMetadata. - * @implements ILocationMetadata - * @constructor - * @param {google.firestore.admin.v1.ILocationMetadata=} [properties] Properties to set - */ - function LocationMetadata(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 plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; - /** - * Creates a LocationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.LocationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.LocationMetadata} LocationMetadata - */ - LocationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.LocationMetadata) - return object; - return new $root.google.firestore.admin.v1.LocationMetadata(); - }; + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.LocationMetadata - * @static - * @param {google.firestore.admin.v1.LocationMetadata} message LocationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocationMetadata.toObject = function toObject() { - return {}; - }; + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; - /** - * Converts this LocationMetadata to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.LocationMetadata - * @instance - * @returns {Object.} JSON object - */ - LocationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return MessageOptions; + })(); - return LocationMetadata; - })(); + protobuf.FieldOptions = (function() { - v1.IndexOperationMetadata = (function() { + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ - /** - * Properties of an IndexOperationMetadata. - * @memberof google.firestore.admin.v1 - * @interface IIndexOperationMetadata - * @property {google.protobuf.ITimestamp|null} [startTime] IndexOperationMetadata startTime - * @property {google.protobuf.ITimestamp|null} [endTime] IndexOperationMetadata endTime - * @property {string|null} [index] IndexOperationMetadata index - * @property {google.firestore.admin.v1.OperationState|null} [state] IndexOperationMetadata state - * @property {google.firestore.admin.v1.IProgress|null} [progressDocuments] IndexOperationMetadata progressDocuments - * @property {google.firestore.admin.v1.IProgress|null} [progressBytes] IndexOperationMetadata progressBytes - */ + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + 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]]; + } - /** - * Constructs a new IndexOperationMetadata. - * @memberof google.firestore.admin.v1 - * @classdesc Represents an IndexOperationMetadata. - * @implements IIndexOperationMetadata - * @constructor - * @param {google.firestore.admin.v1.IIndexOperationMetadata=} [properties] Properties to set - */ - function IndexOperationMetadata(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]]; - } + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; - /** - * IndexOperationMetadata startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.firestore.admin.v1.IndexOperationMetadata - * @instance - */ - IndexOperationMetadata.prototype.startTime = null; + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; - /** - * IndexOperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.firestore.admin.v1.IndexOperationMetadata - * @instance - */ - IndexOperationMetadata.prototype.endTime = null; + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; - /** - * IndexOperationMetadata index. - * @member {string} index - * @memberof google.firestore.admin.v1.IndexOperationMetadata - * @instance - */ - IndexOperationMetadata.prototype.index = ""; + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; - /** - * IndexOperationMetadata state. - * @member {google.firestore.admin.v1.OperationState} state - * @memberof google.firestore.admin.v1.IndexOperationMetadata - * @instance - */ - IndexOperationMetadata.prototype.state = 0; + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; - /** - * IndexOperationMetadata progressDocuments. - * @member {google.firestore.admin.v1.IProgress|null|undefined} progressDocuments - * @memberof google.firestore.admin.v1.IndexOperationMetadata - * @instance - */ - IndexOperationMetadata.prototype.progressDocuments = null; + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; - /** - * IndexOperationMetadata progressBytes. - * @member {google.firestore.admin.v1.IProgress|null|undefined} progressBytes - * @memberof google.firestore.admin.v1.IndexOperationMetadata - * @instance - */ - IndexOperationMetadata.prototype.progressBytes = null; + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; - /** - * Creates an IndexOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.IndexOperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.IndexOperationMetadata} IndexOperationMetadata - */ - IndexOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.IndexOperationMetadata) - return object; - var message = new $root.google.firestore.admin.v1.IndexOperationMetadata(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.firestore.admin.v1.IndexOperationMetadata.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.firestore.admin.v1.IndexOperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.index != null) - message.index = String(object.index); - switch (object.state) { - case "OPERATION_STATE_UNSPECIFIED": + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": case 0: - message.state = 0; + message[".google.api.fieldBehavior"][i] = 0; break; - case "INITIALIZING": + case "OPTIONAL": case 1: - message.state = 1; + message[".google.api.fieldBehavior"][i] = 1; break; - case "PROCESSING": + case "REQUIRED": case 2: - message.state = 2; + message[".google.api.fieldBehavior"][i] = 2; break; - case "CANCELLING": + case "OUTPUT_ONLY": case 3: - message.state = 3; + message[".google.api.fieldBehavior"][i] = 3; break; - case "FINALIZING": + case "INPUT_ONLY": case 4: - message.state = 4; + message[".google.api.fieldBehavior"][i] = 4; break; - case "SUCCESSFUL": + case "IMMUTABLE": case 5: - message.state = 5; + message[".google.api.fieldBehavior"][i] = 5; break; - case "FAILED": + case "UNORDERED_LIST": case 6: - message.state = 6; + message[".google.api.fieldBehavior"][i] = 6; break; - case "CANCELLED": + case "NON_EMPTY_DEFAULT": case 7: - message.state = 7; + message[".google.api.fieldBehavior"][i] = 7; break; } - if (object.progressDocuments != null) { - if (typeof object.progressDocuments !== "object") - throw TypeError(".google.firestore.admin.v1.IndexOperationMetadata.progressDocuments: object expected"); - message.progressDocuments = $root.google.firestore.admin.v1.Progress.fromObject(object.progressDocuments); - } - if (object.progressBytes != null) { - if (typeof object.progressBytes !== "object") - throw TypeError(".google.firestore.admin.v1.IndexOperationMetadata.progressBytes: object expected"); - message.progressBytes = $root.google.firestore.admin.v1.Progress.fromObject(object.progressBytes); - } - return message; - }; + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; - /** - * Creates a plain object from an IndexOperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.IndexOperationMetadata - * @static - * @param {google.firestore.admin.v1.IndexOperationMetadata} message IndexOperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IndexOperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startTime = null; - object.endTime = null; - object.index = ""; - object.state = options.enums === String ? "OPERATION_STATE_UNSPECIFIED" : 0; - object.progressDocuments = null; - object.progressBytes = null; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.index != null && message.hasOwnProperty("index")) - object.index = message.index; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.firestore.admin.v1.OperationState[message.state] : message.state; - if (message.progressDocuments != null && message.hasOwnProperty("progressDocuments")) - object.progressDocuments = $root.google.firestore.admin.v1.Progress.toObject(message.progressDocuments, options); - if (message.progressBytes != null && message.hasOwnProperty("progressBytes")) - object.progressBytes = $root.google.firestore.admin.v1.Progress.toObject(message.progressBytes, options); - return object; - }; + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; - /** - * Converts this IndexOperationMetadata to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.IndexOperationMetadata - * @instance - * @returns {Object.} JSON object - */ - IndexOperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return IndexOperationMetadata; - })(); + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; - v1.FieldOperationMetadata = (function() { + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {string} + * @property {string} STRING=STRING STRING value + * @property {string} CORD=CORD CORD value + * @property {string} STRING_PIECE=STRING_PIECE STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = "STRING"; + values[valuesById[1] = "CORD"] = "CORD"; + values[valuesById[2] = "STRING_PIECE"] = "STRING_PIECE"; + return values; + })(); - /** - * Properties of a FieldOperationMetadata. - * @memberof google.firestore.admin.v1 - * @interface IFieldOperationMetadata - * @property {google.protobuf.ITimestamp|null} [startTime] FieldOperationMetadata startTime - * @property {google.protobuf.ITimestamp|null} [endTime] FieldOperationMetadata endTime - * @property {string|null} [field] FieldOperationMetadata field - * @property {Array.|null} [indexConfigDeltas] FieldOperationMetadata indexConfigDeltas - * @property {google.firestore.admin.v1.OperationState|null} [state] FieldOperationMetadata state - * @property {google.firestore.admin.v1.IProgress|null} [progressDocuments] FieldOperationMetadata progressDocuments - * @property {google.firestore.admin.v1.IProgress|null} [progressBytes] FieldOperationMetadata progressBytes - * @property {google.firestore.admin.v1.FieldOperationMetadata.ITtlConfigDelta|null} [ttlConfigDelta] FieldOperationMetadata ttlConfigDelta - */ + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {string} + * @property {string} JS_NORMAL=JS_NORMAL JS_NORMAL value + * @property {string} JS_STRING=JS_STRING JS_STRING value + * @property {string} JS_NUMBER=JS_NUMBER JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = "JS_NORMAL"; + values[valuesById[1] = "JS_STRING"] = "JS_STRING"; + values[valuesById[2] = "JS_NUMBER"] = "JS_NUMBER"; + return values; + })(); - /** - * Constructs a new FieldOperationMetadata. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a FieldOperationMetadata. - * @implements IFieldOperationMetadata - * @constructor - * @param {google.firestore.admin.v1.IFieldOperationMetadata=} [properties] Properties to set - */ - function FieldOperationMetadata(properties) { - this.indexConfigDeltas = []; - 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]]; - } + return FieldOptions; + })(); - /** - * FieldOperationMetadata startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.firestore.admin.v1.FieldOperationMetadata - * @instance - */ - FieldOperationMetadata.prototype.startTime = null; + protobuf.OneofOptions = (function() { - /** - * FieldOperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.firestore.admin.v1.FieldOperationMetadata - * @instance - */ - FieldOperationMetadata.prototype.endTime = null; + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ - /** - * FieldOperationMetadata field. - * @member {string} field - * @memberof google.firestore.admin.v1.FieldOperationMetadata - * @instance - */ - FieldOperationMetadata.prototype.field = ""; + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } - /** - * FieldOperationMetadata indexConfigDeltas. - * @member {Array.} indexConfigDeltas - * @memberof google.firestore.admin.v1.FieldOperationMetadata - * @instance - */ - FieldOperationMetadata.prototype.indexConfigDeltas = $util.emptyArray; + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * FieldOperationMetadata state. - * @member {google.firestore.admin.v1.OperationState} state - * @memberof google.firestore.admin.v1.FieldOperationMetadata - * @instance - */ - FieldOperationMetadata.prototype.state = 0; + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; - /** - * FieldOperationMetadata progressDocuments. - * @member {google.firestore.admin.v1.IProgress|null|undefined} progressDocuments - * @memberof google.firestore.admin.v1.FieldOperationMetadata - * @instance - */ - FieldOperationMetadata.prototype.progressDocuments = null; + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; - /** - * FieldOperationMetadata progressBytes. - * @member {google.firestore.admin.v1.IProgress|null|undefined} progressBytes - * @memberof google.firestore.admin.v1.FieldOperationMetadata - * @instance - */ - FieldOperationMetadata.prototype.progressBytes = null; + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FieldOperationMetadata ttlConfigDelta. - * @member {google.firestore.admin.v1.FieldOperationMetadata.ITtlConfigDelta|null|undefined} ttlConfigDelta - * @memberof google.firestore.admin.v1.FieldOperationMetadata - * @instance - */ - FieldOperationMetadata.prototype.ttlConfigDelta = null; + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; - /** - * Creates a FieldOperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.FieldOperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.FieldOperationMetadata} FieldOperationMetadata - */ - FieldOperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.FieldOperationMetadata) - return object; - var message = new $root.google.firestore.admin.v1.FieldOperationMetadata(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.field != null) - message.field = String(object.field); - if (object.indexConfigDeltas) { - if (!Array.isArray(object.indexConfigDeltas)) - throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.indexConfigDeltas: array expected"); - message.indexConfigDeltas = []; - for (var i = 0; i < object.indexConfigDeltas.length; ++i) { - if (typeof object.indexConfigDeltas[i] !== "object") - throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.indexConfigDeltas: object expected"); - message.indexConfigDeltas[i] = $root.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.fromObject(object.indexConfigDeltas[i]); - } - } - switch (object.state) { - case "OPERATION_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "INITIALIZING": - case 1: - message.state = 1; - break; - case "PROCESSING": - case 2: - message.state = 2; - break; - case "CANCELLING": - case 3: - message.state = 3; - break; - case "FINALIZING": - case 4: - message.state = 4; - break; - case "SUCCESSFUL": - case 5: - message.state = 5; - break; - case "FAILED": - case 6: - message.state = 6; - break; - case "CANCELLED": - case 7: - message.state = 7; - break; - } - if (object.progressDocuments != null) { - if (typeof object.progressDocuments !== "object") - throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.progressDocuments: object expected"); - message.progressDocuments = $root.google.firestore.admin.v1.Progress.fromObject(object.progressDocuments); - } - if (object.progressBytes != null) { - if (typeof object.progressBytes !== "object") - throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.progressBytes: object expected"); - message.progressBytes = $root.google.firestore.admin.v1.Progress.fromObject(object.progressBytes); - } - if (object.ttlConfigDelta != null) { - if (typeof object.ttlConfigDelta !== "object") - throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.ttlConfigDelta: object expected"); - message.ttlConfigDelta = $root.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.fromObject(object.ttlConfigDelta); - } - return message; - }; + return OneofOptions; + })(); - /** - * Creates a plain object from a FieldOperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.FieldOperationMetadata - * @static - * @param {google.firestore.admin.v1.FieldOperationMetadata} message FieldOperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.indexConfigDeltas = []; - if (options.defaults) { - object.startTime = null; - object.endTime = null; - object.field = ""; - object.state = options.enums === String ? "OPERATION_STATE_UNSPECIFIED" : 0; - object.progressDocuments = null; - object.progressBytes = null; - object.ttlConfigDelta = null; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.field != null && message.hasOwnProperty("field")) - object.field = message.field; - if (message.indexConfigDeltas && message.indexConfigDeltas.length) { - object.indexConfigDeltas = []; - for (var j = 0; j < message.indexConfigDeltas.length; ++j) - object.indexConfigDeltas[j] = $root.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.toObject(message.indexConfigDeltas[j], options); - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.firestore.admin.v1.OperationState[message.state] : message.state; - if (message.progressDocuments != null && message.hasOwnProperty("progressDocuments")) - object.progressDocuments = $root.google.firestore.admin.v1.Progress.toObject(message.progressDocuments, options); - if (message.progressBytes != null && message.hasOwnProperty("progressBytes")) - object.progressBytes = $root.google.firestore.admin.v1.Progress.toObject(message.progressBytes, options); - if (message.ttlConfigDelta != null && message.hasOwnProperty("ttlConfigDelta")) - object.ttlConfigDelta = $root.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.toObject(message.ttlConfigDelta, options); - return object; - }; + protobuf.EnumOptions = (function() { - /** - * Converts this FieldOperationMetadata to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.FieldOperationMetadata - * @instance - * @returns {Object.} JSON object - */ - FieldOperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ - FieldOperationMetadata.IndexConfigDelta = (function() { + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } - /** - * Properties of an IndexConfigDelta. - * @memberof google.firestore.admin.v1.FieldOperationMetadata - * @interface IIndexConfigDelta - * @property {google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType|null} [changeType] IndexConfigDelta changeType - * @property {google.firestore.admin.v1.IIndex|null} [index] IndexConfigDelta index - */ + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; - /** - * Constructs a new IndexConfigDelta. - * @memberof google.firestore.admin.v1.FieldOperationMetadata - * @classdesc Represents an IndexConfigDelta. - * @implements IIndexConfigDelta - * @constructor - * @param {google.firestore.admin.v1.FieldOperationMetadata.IIndexConfigDelta=} [properties] Properties to set - */ - function IndexConfigDelta(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]]; - } + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; - /** - * IndexConfigDelta changeType. - * @member {google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType} changeType - * @memberof google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta - * @instance - */ - IndexConfigDelta.prototype.changeType = 0; + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * IndexConfigDelta index. - * @member {google.firestore.admin.v1.IIndex|null|undefined} index - * @memberof google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta - * @instance - */ - IndexConfigDelta.prototype.index = null; + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; - /** - * Creates an IndexConfigDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta} IndexConfigDelta - */ - IndexConfigDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta) - return object; - var message = new $root.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta(); - switch (object.changeType) { - case "CHANGE_TYPE_UNSPECIFIED": - case 0: - message.changeType = 0; - break; - case "ADD": - case 1: - message.changeType = 1; - break; - case "REMOVE": - case 2: - message.changeType = 2; - break; - } - if (object.index != null) { - if (typeof object.index !== "object") - throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.index: object expected"); - message.index = $root.google.firestore.admin.v1.Index.fromObject(object.index); - } - return message; - }; - - /** - * Creates a plain object from an IndexConfigDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta - * @static - * @param {google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta} message IndexConfigDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IndexConfigDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.changeType = options.enums === String ? "CHANGE_TYPE_UNSPECIFIED" : 0; - object.index = null; - } - if (message.changeType != null && message.hasOwnProperty("changeType")) - object.changeType = options.enums === String ? $root.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType[message.changeType] : message.changeType; - if (message.index != null && message.hasOwnProperty("index")) - object.index = $root.google.firestore.admin.v1.Index.toObject(message.index, options); - return object; - }; - - /** - * Converts this IndexConfigDelta to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta - * @instance - * @returns {Object.} JSON object - */ - IndexConfigDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; - /** - * ChangeType enum. - * @name google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType - * @enum {string} - * @property {string} CHANGE_TYPE_UNSPECIFIED=CHANGE_TYPE_UNSPECIFIED CHANGE_TYPE_UNSPECIFIED value - * @property {string} ADD=ADD ADD value - * @property {string} REMOVE=REMOVE REMOVE value - */ - IndexConfigDelta.ChangeType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CHANGE_TYPE_UNSPECIFIED"] = "CHANGE_TYPE_UNSPECIFIED"; - values[valuesById[1] = "ADD"] = "ADD"; - values[valuesById[2] = "REMOVE"] = "REMOVE"; - return values; - })(); + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return IndexConfigDelta; - })(); + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; - FieldOperationMetadata.TtlConfigDelta = (function() { + return EnumOptions; + })(); - /** - * Properties of a TtlConfigDelta. - * @memberof google.firestore.admin.v1.FieldOperationMetadata - * @interface ITtlConfigDelta - * @property {google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType|null} [changeType] TtlConfigDelta changeType - */ + protobuf.EnumValueOptions = (function() { - /** - * Constructs a new TtlConfigDelta. - * @memberof google.firestore.admin.v1.FieldOperationMetadata - * @classdesc Represents a TtlConfigDelta. - * @implements ITtlConfigDelta - * @constructor - * @param {google.firestore.admin.v1.FieldOperationMetadata.ITtlConfigDelta=} [properties] Properties to set - */ - function TtlConfigDelta(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]]; - } + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ - /** - * TtlConfigDelta changeType. - * @member {google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType} changeType - * @memberof google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta - * @instance - */ - TtlConfigDelta.prototype.changeType = 0; + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + 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 TtlConfigDelta message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta} TtlConfigDelta - */ - TtlConfigDelta.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta) - return object; - var message = new $root.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta(); - switch (object.changeType) { - case "CHANGE_TYPE_UNSPECIFIED": - case 0: - message.changeType = 0; - break; - case "ADD": - case 1: - message.changeType = 1; - break; - case "REMOVE": - case 2: - message.changeType = 2; - break; - } - return message; - }; + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; - /** - * Creates a plain object from a TtlConfigDelta message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta - * @static - * @param {google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta} message TtlConfigDelta - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TtlConfigDelta.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.changeType = options.enums === String ? "CHANGE_TYPE_UNSPECIFIED" : 0; - if (message.changeType != null && message.hasOwnProperty("changeType")) - object.changeType = options.enums === String ? $root.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType[message.changeType] : message.changeType; - return object; - }; + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Converts this TtlConfigDelta to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta - * @instance - * @returns {Object.} JSON object - */ - TtlConfigDelta.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; - /** - * ChangeType enum. - * @name google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType - * @enum {string} - * @property {string} CHANGE_TYPE_UNSPECIFIED=CHANGE_TYPE_UNSPECIFIED CHANGE_TYPE_UNSPECIFIED value - * @property {string} ADD=ADD ADD value - * @property {string} REMOVE=REMOVE REMOVE value - */ - TtlConfigDelta.ChangeType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CHANGE_TYPE_UNSPECIFIED"] = "CHANGE_TYPE_UNSPECIFIED"; - values[valuesById[1] = "ADD"] = "ADD"; - values[valuesById[2] = "REMOVE"] = "REMOVE"; - return values; - })(); + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; - return TtlConfigDelta; - })(); + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return FieldOperationMetadata; - })(); + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; - v1.ExportDocumentsMetadata = (function() { + return EnumValueOptions; + })(); - /** - * Properties of an ExportDocumentsMetadata. - * @memberof google.firestore.admin.v1 - * @interface IExportDocumentsMetadata - * @property {google.protobuf.ITimestamp|null} [startTime] ExportDocumentsMetadata startTime - * @property {google.protobuf.ITimestamp|null} [endTime] ExportDocumentsMetadata endTime - * @property {google.firestore.admin.v1.OperationState|null} [operationState] ExportDocumentsMetadata operationState - * @property {google.firestore.admin.v1.IProgress|null} [progressDocuments] ExportDocumentsMetadata progressDocuments - * @property {google.firestore.admin.v1.IProgress|null} [progressBytes] ExportDocumentsMetadata progressBytes - * @property {Array.|null} [collectionIds] ExportDocumentsMetadata collectionIds - * @property {string|null} [outputUriPrefix] ExportDocumentsMetadata outputUriPrefix - */ + protobuf.ServiceOptions = (function() { - /** - * Constructs a new ExportDocumentsMetadata. - * @memberof google.firestore.admin.v1 - * @classdesc Represents an ExportDocumentsMetadata. - * @implements IExportDocumentsMetadata - * @constructor - * @param {google.firestore.admin.v1.IExportDocumentsMetadata=} [properties] Properties to set - */ - function ExportDocumentsMetadata(properties) { - this.collectionIds = []; - 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]]; - } + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + */ - /** - * ExportDocumentsMetadata startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.firestore.admin.v1.ExportDocumentsMetadata - * @instance - */ - ExportDocumentsMetadata.prototype.startTime = null; + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } - /** - * ExportDocumentsMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.firestore.admin.v1.ExportDocumentsMetadata - * @instance - */ - ExportDocumentsMetadata.prototype.endTime = null; + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; - /** - * ExportDocumentsMetadata operationState. - * @member {google.firestore.admin.v1.OperationState} operationState - * @memberof google.firestore.admin.v1.ExportDocumentsMetadata - * @instance - */ - ExportDocumentsMetadata.prototype.operationState = 0; + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * ExportDocumentsMetadata progressDocuments. - * @member {google.firestore.admin.v1.IProgress|null|undefined} progressDocuments - * @memberof google.firestore.admin.v1.ExportDocumentsMetadata - * @instance - */ - ExportDocumentsMetadata.prototype.progressDocuments = null; + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; - /** - * ExportDocumentsMetadata progressBytes. - * @member {google.firestore.admin.v1.IProgress|null|undefined} progressBytes - * @memberof google.firestore.admin.v1.ExportDocumentsMetadata - * @instance - */ - ExportDocumentsMetadata.prototype.progressBytes = null; + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; - /** - * ExportDocumentsMetadata collectionIds. - * @member {Array.} collectionIds - * @memberof google.firestore.admin.v1.ExportDocumentsMetadata - * @instance - */ - ExportDocumentsMetadata.prototype.collectionIds = $util.emptyArray; + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + return message; + }; - /** - * ExportDocumentsMetadata outputUriPrefix. - * @member {string} outputUriPrefix - * @memberof google.firestore.admin.v1.ExportDocumentsMetadata - * @instance - */ - ExportDocumentsMetadata.prototype.outputUriPrefix = ""; + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + return object; + }; - /** - * Creates an ExportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.ExportDocumentsMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.ExportDocumentsMetadata} ExportDocumentsMetadata - */ - ExportDocumentsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.ExportDocumentsMetadata) - return object; - var message = new $root.google.firestore.admin.v1.ExportDocumentsMetadata(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.operationState) { - case "OPERATION_STATE_UNSPECIFIED": - case 0: - message.operationState = 0; - break; - case "INITIALIZING": - case 1: - message.operationState = 1; - break; - case "PROCESSING": - case 2: - message.operationState = 2; - break; - case "CANCELLING": - case 3: - message.operationState = 3; - break; - case "FINALIZING": - case 4: - message.operationState = 4; - break; - case "SUCCESSFUL": - case 5: - message.operationState = 5; - break; - case "FAILED": - case 6: - message.operationState = 6; - break; - case "CANCELLED": - case 7: - message.operationState = 7; - break; - } - if (object.progressDocuments != null) { - if (typeof object.progressDocuments !== "object") - throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.progressDocuments: object expected"); - message.progressDocuments = $root.google.firestore.admin.v1.Progress.fromObject(object.progressDocuments); - } - if (object.progressBytes != null) { - if (typeof object.progressBytes !== "object") - throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.progressBytes: object expected"); - message.progressBytes = $root.google.firestore.admin.v1.Progress.fromObject(object.progressBytes); - } - if (object.collectionIds) { - if (!Array.isArray(object.collectionIds)) - throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.collectionIds: array expected"); - message.collectionIds = []; - for (var i = 0; i < object.collectionIds.length; ++i) - message.collectionIds[i] = String(object.collectionIds[i]); - } - if (object.outputUriPrefix != null) - message.outputUriPrefix = String(object.outputUriPrefix); - return message; - }; + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from an ExportDocumentsMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.ExportDocumentsMetadata - * @static - * @param {google.firestore.admin.v1.ExportDocumentsMetadata} message ExportDocumentsMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportDocumentsMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.collectionIds = []; - if (options.defaults) { - object.startTime = null; - object.endTime = null; - object.operationState = options.enums === String ? "OPERATION_STATE_UNSPECIFIED" : 0; - object.progressDocuments = null; - object.progressBytes = null; - object.outputUriPrefix = ""; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.operationState != null && message.hasOwnProperty("operationState")) - object.operationState = options.enums === String ? $root.google.firestore.admin.v1.OperationState[message.operationState] : message.operationState; - if (message.progressDocuments != null && message.hasOwnProperty("progressDocuments")) - object.progressDocuments = $root.google.firestore.admin.v1.Progress.toObject(message.progressDocuments, options); - if (message.progressBytes != null && message.hasOwnProperty("progressBytes")) - object.progressBytes = $root.google.firestore.admin.v1.Progress.toObject(message.progressBytes, options); - if (message.collectionIds && message.collectionIds.length) { - object.collectionIds = []; - for (var j = 0; j < message.collectionIds.length; ++j) - object.collectionIds[j] = message.collectionIds[j]; - } - if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) - object.outputUriPrefix = message.outputUriPrefix; - return object; - }; + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; - /** - * Converts this ExportDocumentsMetadata to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.ExportDocumentsMetadata - * @instance - * @returns {Object.} JSON object - */ - ExportDocumentsMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return ServiceOptions; + })(); - return ExportDocumentsMetadata; - })(); + protobuf.MethodOptions = (function() { - v1.ImportDocumentsMetadata = (function() { + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + */ - /** - * Properties of an ImportDocumentsMetadata. - * @memberof google.firestore.admin.v1 - * @interface IImportDocumentsMetadata - * @property {google.protobuf.ITimestamp|null} [startTime] ImportDocumentsMetadata startTime - * @property {google.protobuf.ITimestamp|null} [endTime] ImportDocumentsMetadata endTime - * @property {google.firestore.admin.v1.OperationState|null} [operationState] ImportDocumentsMetadata operationState - * @property {google.firestore.admin.v1.IProgress|null} [progressDocuments] ImportDocumentsMetadata progressDocuments - * @property {google.firestore.admin.v1.IProgress|null} [progressBytes] ImportDocumentsMetadata progressBytes - * @property {Array.|null} [collectionIds] ImportDocumentsMetadata collectionIds - * @property {string|null} [inputUriPrefix] ImportDocumentsMetadata inputUriPrefix - */ + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + 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]]; + } - /** - * Constructs a new ImportDocumentsMetadata. - * @memberof google.firestore.admin.v1 - * @classdesc Represents an ImportDocumentsMetadata. - * @implements IImportDocumentsMetadata - * @constructor - * @param {google.firestore.admin.v1.IImportDocumentsMetadata=} [properties] Properties to set - */ - function ImportDocumentsMetadata(properties) { - this.collectionIds = []; - 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]]; - } + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; - /** - * ImportDocumentsMetadata startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.firestore.admin.v1.ImportDocumentsMetadata - * @instance - */ - ImportDocumentsMetadata.prototype.startTime = null; + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; - /** - * ImportDocumentsMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.firestore.admin.v1.ImportDocumentsMetadata - * @instance - */ - ImportDocumentsMetadata.prototype.endTime = null; + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * ImportDocumentsMetadata operationState. - * @member {google.firestore.admin.v1.OperationState} operationState - * @memberof google.firestore.admin.v1.ImportDocumentsMetadata - * @instance - */ - ImportDocumentsMetadata.prototype.operationState = 0; + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; - /** - * ImportDocumentsMetadata progressDocuments. - * @member {google.firestore.admin.v1.IProgress|null|undefined} progressDocuments - * @memberof google.firestore.admin.v1.ImportDocumentsMetadata - * @instance - */ - ImportDocumentsMetadata.prototype.progressDocuments = null; + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - /** - * ImportDocumentsMetadata progressBytes. - * @member {google.firestore.admin.v1.IProgress|null|undefined} progressBytes - * @memberof google.firestore.admin.v1.ImportDocumentsMetadata - * @instance - */ - ImportDocumentsMetadata.prototype.progressBytes = null; + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; - /** - * ImportDocumentsMetadata collectionIds. - * @member {Array.} collectionIds - * @memberof google.firestore.admin.v1.ImportDocumentsMetadata - * @instance - */ - ImportDocumentsMetadata.prototype.collectionIds = $util.emptyArray; + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } + return message; + }; - /** - * ImportDocumentsMetadata inputUriPrefix. - * @member {string} inputUriPrefix - * @memberof google.firestore.admin.v1.ImportDocumentsMetadata - * @instance - */ - ImportDocumentsMetadata.prototype.inputUriPrefix = ""; + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; - /** - * Creates an ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.ImportDocumentsMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.ImportDocumentsMetadata} ImportDocumentsMetadata - */ - ImportDocumentsMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.ImportDocumentsMetadata) - return object; - var message = new $root.google.firestore.admin.v1.ImportDocumentsMetadata(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - switch (object.operationState) { - case "OPERATION_STATE_UNSPECIFIED": - case 0: - message.operationState = 0; - break; - case "INITIALIZING": - case 1: - message.operationState = 1; - break; - case "PROCESSING": - case 2: - message.operationState = 2; - break; - case "CANCELLING": - case 3: - message.operationState = 3; - break; - case "FINALIZING": - case 4: - message.operationState = 4; - break; - case "SUCCESSFUL": - case 5: - message.operationState = 5; - break; - case "FAILED": - case 6: - message.operationState = 6; - break; - case "CANCELLED": - case 7: - message.operationState = 7; - break; - } - if (object.progressDocuments != null) { - if (typeof object.progressDocuments !== "object") - throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata.progressDocuments: object expected"); - message.progressDocuments = $root.google.firestore.admin.v1.Progress.fromObject(object.progressDocuments); - } - if (object.progressBytes != null) { - if (typeof object.progressBytes !== "object") - throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata.progressBytes: object expected"); - message.progressBytes = $root.google.firestore.admin.v1.Progress.fromObject(object.progressBytes); - } - if (object.collectionIds) { - if (!Array.isArray(object.collectionIds)) - throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata.collectionIds: array expected"); - message.collectionIds = []; - for (var i = 0; i < object.collectionIds.length; ++i) - message.collectionIds[i] = String(object.collectionIds[i]); - } - if (object.inputUriPrefix != null) - message.inputUriPrefix = String(object.inputUriPrefix); - return message; - }; + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.ImportDocumentsMetadata - * @static - * @param {google.firestore.admin.v1.ImportDocumentsMetadata} message ImportDocumentsMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImportDocumentsMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.collectionIds = []; - if (options.defaults) { - object.startTime = null; - object.endTime = null; - object.operationState = options.enums === String ? "OPERATION_STATE_UNSPECIFIED" : 0; - object.progressDocuments = null; - object.progressBytes = null; - object.inputUriPrefix = ""; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.operationState != null && message.hasOwnProperty("operationState")) - object.operationState = options.enums === String ? $root.google.firestore.admin.v1.OperationState[message.operationState] : message.operationState; - if (message.progressDocuments != null && message.hasOwnProperty("progressDocuments")) - object.progressDocuments = $root.google.firestore.admin.v1.Progress.toObject(message.progressDocuments, options); - if (message.progressBytes != null && message.hasOwnProperty("progressBytes")) - object.progressBytes = $root.google.firestore.admin.v1.Progress.toObject(message.progressBytes, options); - if (message.collectionIds && message.collectionIds.length) { - object.collectionIds = []; - for (var j = 0; j < message.collectionIds.length; ++j) - object.collectionIds[j] = message.collectionIds[j]; - } - if (message.inputUriPrefix != null && message.hasOwnProperty("inputUriPrefix")) - object.inputUriPrefix = message.inputUriPrefix; - return object; - }; + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; - /** - * Converts this ImportDocumentsMetadata to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.ImportDocumentsMetadata - * @instance - * @returns {Object.} JSON object - */ - ImportDocumentsMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ImportDocumentsMetadata; - })(); + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {string} + * @property {string} IDEMPOTENCY_UNKNOWN=IDEMPOTENCY_UNKNOWN IDEMPOTENCY_UNKNOWN value + * @property {string} NO_SIDE_EFFECTS=NO_SIDE_EFFECTS NO_SIDE_EFFECTS value + * @property {string} IDEMPOTENT=IDEMPOTENT IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = "IDEMPOTENCY_UNKNOWN"; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = "NO_SIDE_EFFECTS"; + values[valuesById[2] = "IDEMPOTENT"] = "IDEMPOTENT"; + return values; + })(); - v1.ExportDocumentsResponse = (function() { + return MethodOptions; + })(); - /** - * Properties of an ExportDocumentsResponse. - * @memberof google.firestore.admin.v1 - * @interface IExportDocumentsResponse - * @property {string|null} [outputUriPrefix] ExportDocumentsResponse outputUriPrefix - */ + protobuf.UninterpretedOption = (function() { - /** - * Constructs a new ExportDocumentsResponse. - * @memberof google.firestore.admin.v1 - * @classdesc Represents an ExportDocumentsResponse. - * @implements IExportDocumentsResponse - * @constructor - * @param {google.firestore.admin.v1.IExportDocumentsResponse=} [properties] Properties to set - */ - function ExportDocumentsResponse(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]]; - } + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|string|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|string|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ - /** - * ExportDocumentsResponse outputUriPrefix. - * @member {string} outputUriPrefix - * @memberof google.firestore.admin.v1.ExportDocumentsResponse - * @instance - */ - ExportDocumentsResponse.prototype.outputUriPrefix = ""; + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + 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 an ExportDocumentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.ExportDocumentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.ExportDocumentsResponse} ExportDocumentsResponse - */ - ExportDocumentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.ExportDocumentsResponse) - return object; - var message = new $root.google.firestore.admin.v1.ExportDocumentsResponse(); - if (object.outputUriPrefix != null) - message.outputUriPrefix = String(object.outputUriPrefix); - return message; - }; + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; - /** - * Creates a plain object from an ExportDocumentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.ExportDocumentsResponse - * @static - * @param {google.firestore.admin.v1.ExportDocumentsResponse} message ExportDocumentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExportDocumentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.outputUriPrefix = ""; - if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) - object.outputUriPrefix = message.outputUriPrefix; - return object; - }; + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; - /** - * Converts this ExportDocumentsResponse to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.ExportDocumentsResponse - * @instance - * @returns {Object.} JSON object - */ - ExportDocumentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * UninterpretedOption positiveIntValue. + * @member {number|string} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - return ExportDocumentsResponse; - })(); + /** + * UninterpretedOption negativeIntValue. + * @member {number|string} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * OperationState enum. - * @name google.firestore.admin.v1.OperationState - * @enum {string} - * @property {string} OPERATION_STATE_UNSPECIFIED=OPERATION_STATE_UNSPECIFIED OPERATION_STATE_UNSPECIFIED value - * @property {string} INITIALIZING=INITIALIZING INITIALIZING value - * @property {string} PROCESSING=PROCESSING PROCESSING value - * @property {string} CANCELLING=CANCELLING CANCELLING value - * @property {string} FINALIZING=FINALIZING FINALIZING value - * @property {string} SUCCESSFUL=SUCCESSFUL SUCCESSFUL value - * @property {string} FAILED=FAILED FAILED value - * @property {string} CANCELLED=CANCELLED CANCELLED value - */ - v1.OperationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "OPERATION_STATE_UNSPECIFIED"] = "OPERATION_STATE_UNSPECIFIED"; - values[valuesById[1] = "INITIALIZING"] = "INITIALIZING"; - values[valuesById[2] = "PROCESSING"] = "PROCESSING"; - values[valuesById[3] = "CANCELLING"] = "CANCELLING"; - values[valuesById[4] = "FINALIZING"] = "FINALIZING"; - values[valuesById[5] = "SUCCESSFUL"] = "SUCCESSFUL"; - values[valuesById[6] = "FAILED"] = "FAILED"; - values[valuesById[7] = "CANCELLED"] = "CANCELLED"; - return values; - })(); + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; - v1.Progress = (function() { + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - /** - * Properties of a Progress. - * @memberof google.firestore.admin.v1 - * @interface IProgress - * @property {number|string|null} [estimatedWork] Progress estimatedWork - * @property {number|string|null} [completedWork] Progress completedWork - */ + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; - /** - * Constructs a new Progress. - * @memberof google.firestore.admin.v1 - * @classdesc Represents a Progress. - * @implements IProgress - * @constructor - * @param {google.firestore.admin.v1.IProgress=} [properties] Properties to set - */ - function Progress(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]]; - } - - /** - * Progress estimatedWork. - * @member {number|string} estimatedWork - * @memberof google.firestore.admin.v1.Progress - * @instance - */ - Progress.prototype.estimatedWork = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Progress completedWork. - * @member {number|string} completedWork - * @memberof google.firestore.admin.v1.Progress - * @instance - */ - Progress.prototype.completedWork = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a Progress message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.firestore.admin.v1.Progress - * @static - * @param {Object.} object Plain object - * @returns {google.firestore.admin.v1.Progress} Progress - */ - Progress.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.admin.v1.Progress) - return object; - var message = new $root.google.firestore.admin.v1.Progress(); - if (object.estimatedWork != null) - if ($util.Long) - (message.estimatedWork = $util.Long.fromValue(object.estimatedWork)).unsigned = false; - else if (typeof object.estimatedWork === "string") - message.estimatedWork = parseInt(object.estimatedWork, 10); - else if (typeof object.estimatedWork === "number") - message.estimatedWork = object.estimatedWork; - else if (typeof object.estimatedWork === "object") - message.estimatedWork = new $util.LongBits(object.estimatedWork.low >>> 0, object.estimatedWork.high >>> 0).toNumber(); - if (object.completedWork != null) - if ($util.Long) - (message.completedWork = $util.Long.fromValue(object.completedWork)).unsigned = false; - else if (typeof object.completedWork === "string") - message.completedWork = parseInt(object.completedWork, 10); - else if (typeof object.completedWork === "number") - message.completedWork = object.completedWork; - else if (typeof object.completedWork === "object") - message.completedWork = new $util.LongBits(object.completedWork.low >>> 0, object.completedWork.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a Progress message. Also converts values to other types if specified. - * @function toObject - * @memberof google.firestore.admin.v1.Progress - * @static - * @param {google.firestore.admin.v1.Progress} message Progress - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Progress.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.estimatedWork = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.estimatedWork = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.completedWork = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.completedWork = options.longs === String ? "0" : 0; - } - if (message.estimatedWork != null && message.hasOwnProperty("estimatedWork")) - if (typeof message.estimatedWork === "number") - object.estimatedWork = options.longs === String ? String(message.estimatedWork) : message.estimatedWork; - else - object.estimatedWork = options.longs === String ? $util.Long.prototype.toString.call(message.estimatedWork) : options.longs === Number ? new $util.LongBits(message.estimatedWork.low >>> 0, message.estimatedWork.high >>> 0).toNumber() : message.estimatedWork; - if (message.completedWork != null && message.hasOwnProperty("completedWork")) - if (typeof message.completedWork === "number") - object.completedWork = options.longs === String ? String(message.completedWork) : message.completedWork; - else - object.completedWork = options.longs === String ? $util.Long.prototype.toString.call(message.completedWork) : options.longs === Number ? new $util.LongBits(message.completedWork.low >>> 0, message.completedWork.high >>> 0).toNumber() : message.completedWork; - return object; - }; - - /** - * Converts this Progress to JSON. - * @function toJSON - * @memberof google.firestore.admin.v1.Progress - * @instance - * @returns {Object.} JSON object - */ - Progress.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Progress; - })(); - - return v1; - })(); - - return admin; - })(); - - return firestore; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - 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]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); } } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.api.Http} message Http + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.rules = []; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; return object; }; /** - * Converts this Http to JSON. + * Converts this UninterpretedOption to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.protobuf.UninterpretedOption * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + UninterpretedOption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; - })(); - - api.HttpRule = (function() { - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [body] HttpRule body - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(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]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.SourceCodeInfo = (function() { /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function SourceCodeInfo(properties) { + this.location = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4666,229 +5016,602 @@ } /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo * @instance */ - HttpRule.prototype.put = null; + SourceCodeInfo.prototype.location = $util.emptyArray; /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - HttpRule.prototype.post = null; + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - HttpRule.prototype["delete"] = null; + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo * @instance + * @returns {Object.} JSON object */ - HttpRule.prototype.patch = null; + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - HttpRule.prototype.custom = null; + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; + SourceCodeInfo.Location = (function() { - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + 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]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + 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]]; + } /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) return object; - var message = new $root.google.api.HttpRule(); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.selector != null) - message.selector = String(object.selector); - if (object.body != null) - message.body = String(object.body); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); } } return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + GeneratedCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); } return object; }; /** - * Converts this HttpRule to JSON. + * Converts this GeneratedCodeInfo to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.protobuf.GeneratedCodeInfo * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + GeneratedCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + 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]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {string} + * @property {string} NONE=NONE NONE value + * @property {string} SET=SET SET value + * @property {string} ALIAS=ALIAS ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = "NONE"; + values[valuesById[1] = "SET"] = "SET"; + values[valuesById[2] = "ALIAS"] = "ALIAS"; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; })(); - api.CustomHttpPattern = (function() { + protobuf.Struct = (function() { /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * Properties of a Struct. + * @memberof google.protobuf + * @interface IStruct + * @property {Object.|null} [fields] Struct fields */ /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * Constructs a new Struct. + * @memberof google.protobuf + * @classdesc Represents a Struct. + * @implements IStruct * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.protobuf.IStruct=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function Struct(properties) { + this.fields = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4896,130 +5619,114 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct * @instance */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; + Struct.prototype.fields = $util.emptyObject; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.Struct * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.protobuf.Struct} Struct */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + } + } return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a Struct message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.Struct * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.protobuf.Struct} message Struct * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + Struct.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this Struct to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.protobuf.Struct * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + Struct.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; - })(); + /** + * Gets the default type url for Struct + * @function getTypeUrl + * @memberof google.protobuf.Struct + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Struct"; + }; - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {string} - * @property {string} FIELD_BEHAVIOR_UNSPECIFIED=FIELD_BEHAVIOR_UNSPECIFIED FIELD_BEHAVIOR_UNSPECIFIED value - * @property {string} OPTIONAL=OPTIONAL OPTIONAL value - * @property {string} REQUIRED=REQUIRED REQUIRED value - * @property {string} OUTPUT_ONLY=OUTPUT_ONLY OUTPUT_ONLY value - * @property {string} INPUT_ONLY=INPUT_ONLY INPUT_ONLY value - * @property {string} IMMUTABLE=IMMUTABLE IMMUTABLE value - * @property {string} UNORDERED_LIST=UNORDERED_LIST UNORDERED_LIST value - * @property {string} NON_EMPTY_DEFAULT=NON_EMPTY_DEFAULT NON_EMPTY_DEFAULT value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = "FIELD_BEHAVIOR_UNSPECIFIED"; - values[valuesById[1] = "OPTIONAL"] = "OPTIONAL"; - values[valuesById[2] = "REQUIRED"] = "REQUIRED"; - values[valuesById[3] = "OUTPUT_ONLY"] = "OUTPUT_ONLY"; - values[valuesById[4] = "INPUT_ONLY"] = "INPUT_ONLY"; - values[valuesById[5] = "IMMUTABLE"] = "IMMUTABLE"; - values[valuesById[6] = "UNORDERED_LIST"] = "UNORDERED_LIST"; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = "NON_EMPTY_DEFAULT"; - return values; + return Struct; })(); - api.ResourceDescriptor = (function() { + protobuf.Value = (function() { /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style + * Properties of a Value. + * @memberof google.protobuf + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue */ /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * Constructs a new Value. + * @memberof google.protobuf + * @classdesc Represents a Value. + * @implements IValue * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.protobuf.IValue=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5027,232 +5734,216 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor + * Value nullValue. + * @member {google.protobuf.NullValue|null|undefined} nullValue + * @memberof google.protobuf.Value * @instance */ - ResourceDescriptor.prototype.type = ""; + Value.prototype.nullValue = null; /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.protobuf.Value * @instance */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + Value.prototype.numberValue = null; /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.protobuf.Value * @instance */ - ResourceDescriptor.prototype.nameField = ""; + Value.prototype.stringValue = null; /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor + * Value boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.protobuf.Value * @instance */ - ResourceDescriptor.prototype.history = 0; + Value.prototype.boolValue = null; /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value * @instance */ - ResourceDescriptor.prototype.plural = ""; + Value.prototype.structValue = null; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value * @instance */ - ResourceDescriptor.prototype.singular = ""; + Value.prototype.listValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.Value * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.protobuf.Value} Value */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; + case "NULL_VALUE": + case 0: + message.nullValue = 0; break; } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } - return message; - }; - + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + } + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + } + return message; + }; + /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.Value * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.protobuf.Value} message Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; + } + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; + } + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; } return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this Value to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.protobuf.Value * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {string} - * @property {string} HISTORY_UNSPECIFIED=HISTORY_UNSPECIFIED HISTORY_UNSPECIFIED value - * @property {string} ORIGINALLY_SINGLE_PATTERN=ORIGINALLY_SINGLE_PATTERN ORIGINALLY_SINGLE_PATTERN value - * @property {string} FUTURE_MULTI_PATTERN=FUTURE_MULTI_PATTERN FUTURE_MULTI_PATTERN value + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.protobuf.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = "HISTORY_UNSPECIFIED"; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = "ORIGINALLY_SINGLE_PATTERN"; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = "FUTURE_MULTI_PATTERN"; - return values; - })(); + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Value"; + }; - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {string} - * @property {string} STYLE_UNSPECIFIED=STYLE_UNSPECIFIED STYLE_UNSPECIFIED value - * @property {string} DECLARATIVE_FRIENDLY=DECLARATIVE_FRIENDLY DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = "STYLE_UNSPECIFIED"; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = "DECLARATIVE_FRIENDLY"; - return values; - })(); + return Value; + })(); - return ResourceDescriptor; + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {string} + * @property {string} NULL_VALUE=NULL_VALUE NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = "NULL_VALUE"; + return values; })(); - api.ResourceReference = (function() { + protobuf.ListValue = (function() { /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * Properties of a ListValue. + * @memberof google.protobuf + * @interface IListValue + * @property {Array.|null} [values] ListValue values */ /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * Constructs a new ListValue. + * @memberof google.protobuf + * @classdesc Represents a ListValue. + * @implements IListValue * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.protobuf.IListValue=} [properties] Properties to set */ - function ResourceReference(properties) { + function ListValue(properties) { + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5260,109 +5951,108 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue * @instance */ - ResourceReference.prototype.childType = ""; + ListValue.prototype.values = $util.emptyArray; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.protobuf.ListValue * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.protobuf.ListValue} ListValue */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a ListValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.protobuf.ListValue * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.protobuf.ListValue} message ListValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + ListValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this ListValue to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.protobuf.ListValue * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + ListValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; - })(); - - return api; - })(); - - google.protobuf = (function() { + /** + * Gets the default type url for ListValue + * @function getTypeUrl + * @memberof google.protobuf.ListValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ListValue"; + }; - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; + return ListValue; + })(); - protobuf.FileDescriptorSet = (function() { + protobuf.DoubleValue = (function() { /** - * Properties of a FileDescriptorSet. + * Properties of a DoubleValue. * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value */ /** - * Constructs a new FileDescriptorSet. + * Constructs a new DoubleValue. * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set */ - function FileDescriptorSet(properties) { - this.file = []; + function DoubleValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5370,111 +6060,97 @@ } /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue * @instance */ - FileDescriptorSet.prototype.file = $util.emptyArray; + DoubleValue.prototype.value = 0; /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.DoubleValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.DoubleValue} DoubleValue */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); return message; }; /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.DoubleValue * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {google.protobuf.DoubleValue} message DoubleValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + DoubleValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; /** - * Converts this FileDescriptorSet to JSON. + * Converts this DoubleValue to JSON. * @function toJSON - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.DoubleValue * @instance * @returns {Object.} JSON object */ - FileDescriptorSet.prototype.toJSON = function toJSON() { + DoubleValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FileDescriptorSet; + /** + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; + + return DoubleValue; })(); - protobuf.FileDescriptorProto = (function() { + protobuf.FloatValue = (function() { /** - * Properties of a FileDescriptorProto. + * Properties of a FloatValue. * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax + * @interface IFloatValue + * @property {number|null} [value] FloatValue value */ /** - * Constructs a new FileDescriptorProto. + * Constructs a new FloatValue. * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto + * @classdesc Represents a FloatValue. + * @implements IFloatValue * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IFloatValue=} [properties] Properties to set */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; + function FloatValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5482,319 +6158,209 @@ } /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue * @instance */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; + FloatValue.prototype.value = 0; /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FloatValue} FloatValue */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) + return object; + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.FloatValue} message FloatValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + FloatValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto + * Converts this FloatValue to JSON. + * @function toJSON + * @memberof google.protobuf.FloatValue * @instance + * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; + FloatValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Gets the default type url for FloatValue + * @function getTypeUrl + * @memberof google.protobuf.FloatValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FloatValue"; + }; - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; + return FloatValue; + })(); - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; + protobuf.Int64Value = (function() { /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Properties of an Int64Value. + * @memberof google.protobuf + * @interface IInt64Value + * @property {number|string|null} [value] Int64Value value */ - FileDescriptorProto.prototype.options = null; /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Constructs a new Int64Value. + * @memberof google.protobuf + * @classdesc Represents an Int64Value. + * @implements IInt64Value + * @constructor + * @param {google.protobuf.IInt64Value=} [properties] Properties to set */ - FileDescriptorProto.prototype.sourceCodeInfo = null; + function Int64Value(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]]; + } /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto + * Int64Value value. + * @member {number|string} value + * @memberof google.protobuf.Int64Value * @instance */ - FileDescriptorProto.prototype.syntax = ""; + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.Int64Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.Int64Value} Int64Value */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.Int64Value * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {google.protobuf.Int64Value} message Int64Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + Int64Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; return object; }; /** - * Converts this FileDescriptorProto to JSON. + * Converts this Int64Value to JSON. * @function toJSON - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.Int64Value * @instance * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.toJSON = function toJSON() { + Int64Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FileDescriptorProto; + /** + * Gets the default type url for Int64Value + * @function getTypeUrl + * @memberof google.protobuf.Int64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int64Value"; + }; + + return Int64Value; })(); - protobuf.DescriptorProto = (function() { + protobuf.UInt64Value = (function() { /** - * Properties of a DescriptorProto. + * Properties of a UInt64Value. * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @interface IUInt64Value + * @property {number|string|null} [value] UInt64Value value */ /** - * Constructs a new DescriptorProto. + * Constructs a new UInt64Value. * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; + function UInt64Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5802,495 +6368,405 @@ } /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto + * UInt64Value value. + * @member {number|string} value + * @memberof google.protobuf.UInt64Value * @instance */ - DescriptorProto.prototype.field = $util.emptyArray; + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt64Value} UInt64Value */ - DescriptorProto.prototype.extension = $util.emptyArray; + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) + return object; + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + return message; + }; /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - DescriptorProto.prototype.nestedType = $util.emptyArray; + UInt64Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + return object; + }; /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto + * Converts this UInt64Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt64Value * @instance + * @returns {Object.} JSON object */ - DescriptorProto.prototype.enumType = $util.emptyArray; + UInt64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance + * Gets the default type url for UInt64Value + * @function getTypeUrl + * @memberof google.protobuf.UInt64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt64Value"; + }; - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; + return UInt64Value; + })(); + + protobuf.Int32Value = (function() { /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance + * Properties of an Int32Value. + * @memberof google.protobuf + * @interface IInt32Value + * @property {number|null} [value] Int32Value value */ - DescriptorProto.prototype.options = null; /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance + * Constructs a new Int32Value. + * @memberof google.protobuf + * @classdesc Represents an Int32Value. + * @implements IInt32Value + * @constructor + * @param {google.protobuf.IInt32Value=} [properties] Properties to set */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; + function Int32Value(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]]; + } /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value * @instance */ - DescriptorProto.prototype.reservedName = $util.emptyArray; + Int32Value.prototype.value = 0; /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.Int32Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.Int32Value} Int32Value */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; return message; }; /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.Int32Value * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {google.protobuf.Int32Value} message Int32Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + Int32Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Int32Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int32Value + * @instance + * @returns {Object.} JSON object + */ + Int32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Int32Value + * @function getTypeUrl + * @memberof google.protobuf.Int32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.Int32Value"; + }; + + return Int32Value; + })(); + + protobuf.UInt32Value = (function() { + + /** + * Properties of a UInt32Value. + * @memberof google.protobuf + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value + */ + + /** + * Constructs a new UInt32Value. + * @memberof google.protobuf + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value + * @constructor + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + */ + function UInt32Value(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]]; + } + + /** + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value + * @instance + */ + UInt32Value.prototype.value = 0; + + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt32Value} UInt32Value + */ + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) + return object; + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; + return message; + }; + + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this DescriptorProto to JSON. + * Converts this UInt32Value to JSON. * @function toJSON - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.UInt32Value * @instance * @returns {Object.} JSON object */ - DescriptorProto.prototype.toJSON = function toJSON() { + UInt32Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - DescriptorProto.ExtensionRange = (function() { + /** + * Gets the default type url for UInt32Value + * @function getTypeUrl + * @memberof google.protobuf.UInt32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt32Value"; + }; - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - */ + return UInt32Value; + })(); - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(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]]; - } + protobuf.BoolValue = (function() { - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; + /** + * Properties of a BoolValue. + * @memberof google.protobuf + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value + */ - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; + /** + * Constructs a new BoolValue. + * @memberof google.protobuf + * @classdesc Represents a BoolValue. + * @implements IBoolValue + * @constructor + * @param {google.protobuf.IBoolValue=} [properties] Properties to set + */ + function BoolValue(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 an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; + /** + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue + * @instance + */ + BoolValue.prototype.value = false; - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; + /** + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BoolValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BoolValue} BoolValue + */ + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) return object; - }; + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); + return message; + }; - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BoolValue + * @static + * @param {google.protobuf.BoolValue} message BoolValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoolValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ + /** + * Converts this BoolValue to JSON. + * @function toJSON + * @memberof google.protobuf.BoolValue + * @instance + * @returns {Object.} JSON object + */ + BoolValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(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]]; + /** + * Gets the default type url for BoolValue + * @function getTypeUrl + * @memberof google.protobuf.BoolValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.BoolValue"; + }; - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReservedRange; - })(); - - return DescriptorProto; + return BoolValue; })(); - protobuf.FieldDescriptorProto = (function() { + protobuf.StringValue = (function() { /** - * Properties of a FieldDescriptorProto. + * Properties of a StringValue. * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @interface IStringValue + * @property {string|null} [value] StringValue value */ /** - * Constructs a new FieldDescriptorProto. + * Constructs a new StringValue. * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto + * @classdesc Represents a StringValue. + * @implements IStringValue * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IStringValue=} [properties] Properties to set */ - function FieldDescriptorProto(properties) { + function StringValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6298,4286 +6774,5543 @@ } /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue * @instance */ - FieldDescriptorProto.prototype.name = ""; + StringValue.prototype.value = ""; /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.StringValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.StringValue} StringValue */ - FieldDescriptorProto.prototype.number = 0; + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) + return object; + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); + return message; + }; /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.StringValue + * @static + * @param {google.protobuf.StringValue} message StringValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - FieldDescriptorProto.prototype.label = 1; + StringValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto + * Converts this StringValue to JSON. + * @function toJSON + * @memberof google.protobuf.StringValue * @instance + * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.type = 1; + StringValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Gets the default type url for StringValue + * @function getTypeUrl + * @memberof google.protobuf.StringValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - FieldDescriptorProto.prototype.typeName = ""; + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.StringValue"; + }; - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; + return StringValue; + })(); + + protobuf.BytesValue = (function() { /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Properties of a BytesValue. + * @memberof google.protobuf + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value */ - FieldDescriptorProto.prototype.defaultValue = ""; /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Constructs a new BytesValue. + * @memberof google.protobuf + * @classdesc Represents a BytesValue. + * @implements IBytesValue + * @constructor + * @param {google.protobuf.IBytesValue=} [properties] Properties to set */ - FieldDescriptorProto.prototype.oneofIndex = 0; + function BytesValue(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]]; + } /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue * @instance */ - FieldDescriptorProto.prototype.jsonName = ""; + BytesValue.prototype.value = $util.newBuffer([]); /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.BytesValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.BytesValue} BytesValue */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - } - switch (object.type) { - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } + var message = new $root.google.protobuf.BytesValue(); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; return message; }; /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.BytesValue * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {google.protobuf.BytesValue} message BytesValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options) { + BytesValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this FieldDescriptorProto to JSON. + * Converts this BytesValue to JSON. * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.BytesValue * @instance * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { + BytesValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {string} - * @property {string} TYPE_DOUBLE=TYPE_DOUBLE TYPE_DOUBLE value - * @property {string} TYPE_FLOAT=TYPE_FLOAT TYPE_FLOAT value - * @property {string} TYPE_INT64=TYPE_INT64 TYPE_INT64 value - * @property {string} TYPE_UINT64=TYPE_UINT64 TYPE_UINT64 value - * @property {string} TYPE_INT32=TYPE_INT32 TYPE_INT32 value - * @property {string} TYPE_FIXED64=TYPE_FIXED64 TYPE_FIXED64 value - * @property {string} TYPE_FIXED32=TYPE_FIXED32 TYPE_FIXED32 value - * @property {string} TYPE_BOOL=TYPE_BOOL TYPE_BOOL value - * @property {string} TYPE_STRING=TYPE_STRING TYPE_STRING value - * @property {string} TYPE_GROUP=TYPE_GROUP TYPE_GROUP value - * @property {string} TYPE_MESSAGE=TYPE_MESSAGE TYPE_MESSAGE value - * @property {string} TYPE_BYTES=TYPE_BYTES TYPE_BYTES value - * @property {string} TYPE_UINT32=TYPE_UINT32 TYPE_UINT32 value - * @property {string} TYPE_ENUM=TYPE_ENUM TYPE_ENUM value - * @property {string} TYPE_SFIXED32=TYPE_SFIXED32 TYPE_SFIXED32 value - * @property {string} TYPE_SFIXED64=TYPE_SFIXED64 TYPE_SFIXED64 value - * @property {string} TYPE_SINT32=TYPE_SINT32 TYPE_SINT32 value - * @property {string} TYPE_SINT64=TYPE_SINT64 TYPE_SINT64 value + * Gets the default type url for BytesValue + * @function getTypeUrl + * @memberof google.protobuf.BytesValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = "TYPE_DOUBLE"; - values[valuesById[2] = "TYPE_FLOAT"] = "TYPE_FLOAT"; - values[valuesById[3] = "TYPE_INT64"] = "TYPE_INT64"; - values[valuesById[4] = "TYPE_UINT64"] = "TYPE_UINT64"; - values[valuesById[5] = "TYPE_INT32"] = "TYPE_INT32"; - values[valuesById[6] = "TYPE_FIXED64"] = "TYPE_FIXED64"; - values[valuesById[7] = "TYPE_FIXED32"] = "TYPE_FIXED32"; - values[valuesById[8] = "TYPE_BOOL"] = "TYPE_BOOL"; - values[valuesById[9] = "TYPE_STRING"] = "TYPE_STRING"; - values[valuesById[10] = "TYPE_GROUP"] = "TYPE_GROUP"; - values[valuesById[11] = "TYPE_MESSAGE"] = "TYPE_MESSAGE"; - values[valuesById[12] = "TYPE_BYTES"] = "TYPE_BYTES"; - values[valuesById[13] = "TYPE_UINT32"] = "TYPE_UINT32"; - values[valuesById[14] = "TYPE_ENUM"] = "TYPE_ENUM"; - values[valuesById[15] = "TYPE_SFIXED32"] = "TYPE_SFIXED32"; - values[valuesById[16] = "TYPE_SFIXED64"] = "TYPE_SFIXED64"; - values[valuesById[17] = "TYPE_SINT32"] = "TYPE_SINT32"; - values[valuesById[18] = "TYPE_SINT64"] = "TYPE_SINT64"; - return values; - })(); + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BytesValue"; + }; + + return BytesValue; + })(); + + protobuf.Duration = (function() { /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {string} - * @property {string} LABEL_OPTIONAL=LABEL_OPTIONAL LABEL_OPTIONAL value - * @property {string} LABEL_REQUIRED=LABEL_REQUIRED LABEL_REQUIRED value - * @property {string} LABEL_REPEATED=LABEL_REPEATED LABEL_REPEATED value + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|string|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = "LABEL_OPTIONAL"; - values[valuesById[2] = "LABEL_REQUIRED"] = "LABEL_REQUIRED"; - values[valuesById[3] = "LABEL_REPEATED"] = "LABEL_REPEATED"; - return values; - })(); - return FieldDescriptorProto; - })(); + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(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]]; + } + + /** + * Duration seconds. + * @member {number|string} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + return protobuf; + })(); + + google.firestore = (function() { + + /** + * Namespace firestore. + * @memberof google + * @namespace + */ + var firestore = {}; + + firestore.admin = (function() { + + /** + * Namespace admin. + * @memberof google.firestore + * @namespace + */ + var admin = {}; + + admin.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.firestore.admin + * @namespace + */ + var v1 = {}; + + v1.Database = (function() { + + /** + * Properties of a Database. + * @memberof google.firestore.admin.v1 + * @interface IDatabase + * @property {string|null} [name] Database name + * @property {string|null} [locationId] Database locationId + * @property {google.firestore.admin.v1.Database.DatabaseType|null} [type] Database type + * @property {google.firestore.admin.v1.Database.ConcurrencyMode|null} [concurrencyMode] Database concurrencyMode + * @property {google.firestore.admin.v1.Database.AppEngineIntegrationMode|null} [appEngineIntegrationMode] Database appEngineIntegrationMode + * @property {string|null} [keyPrefix] Database keyPrefix + * @property {string|null} [etag] Database etag + */ + + /** + * Constructs a new Database. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a Database. + * @implements IDatabase + * @constructor + * @param {google.firestore.admin.v1.IDatabase=} [properties] Properties to set + */ + function Database(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]]; + } + + /** + * Database name. + * @member {string} name + * @memberof google.firestore.admin.v1.Database + * @instance + */ + Database.prototype.name = ""; + + /** + * Database locationId. + * @member {string} locationId + * @memberof google.firestore.admin.v1.Database + * @instance + */ + Database.prototype.locationId = ""; + + /** + * Database type. + * @member {google.firestore.admin.v1.Database.DatabaseType} type + * @memberof google.firestore.admin.v1.Database + * @instance + */ + Database.prototype.type = 0; + + /** + * Database concurrencyMode. + * @member {google.firestore.admin.v1.Database.ConcurrencyMode} concurrencyMode + * @memberof google.firestore.admin.v1.Database + * @instance + */ + Database.prototype.concurrencyMode = 0; + + /** + * Database appEngineIntegrationMode. + * @member {google.firestore.admin.v1.Database.AppEngineIntegrationMode} appEngineIntegrationMode + * @memberof google.firestore.admin.v1.Database + * @instance + */ + Database.prototype.appEngineIntegrationMode = 0; + + /** + * Database keyPrefix. + * @member {string} keyPrefix + * @memberof google.firestore.admin.v1.Database + * @instance + */ + Database.prototype.keyPrefix = ""; + + /** + * Database etag. + * @member {string} etag + * @memberof google.firestore.admin.v1.Database + * @instance + */ + Database.prototype.etag = ""; + + /** + * Creates a Database message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.Database + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.Database} Database + */ + Database.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.Database) + return object; + var message = new $root.google.firestore.admin.v1.Database(); + if (object.name != null) + message.name = String(object.name); + if (object.locationId != null) + message.locationId = String(object.locationId); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DATABASE_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "FIRESTORE_NATIVE": + case 1: + message.type = 1; + break; + case "DATASTORE_MODE": + case 2: + message.type = 2; + break; + } + switch (object.concurrencyMode) { + default: + if (typeof object.concurrencyMode === "number") { + message.concurrencyMode = object.concurrencyMode; + break; + } + break; + case "CONCURRENCY_MODE_UNSPECIFIED": + case 0: + message.concurrencyMode = 0; + break; + case "OPTIMISTIC": + case 1: + message.concurrencyMode = 1; + break; + case "PESSIMISTIC": + case 2: + message.concurrencyMode = 2; + break; + case "OPTIMISTIC_WITH_ENTITY_GROUPS": + case 3: + message.concurrencyMode = 3; + break; + } + switch (object.appEngineIntegrationMode) { + default: + if (typeof object.appEngineIntegrationMode === "number") { + message.appEngineIntegrationMode = object.appEngineIntegrationMode; + break; + } + break; + case "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED": + case 0: + message.appEngineIntegrationMode = 0; + break; + case "ENABLED": + case 1: + message.appEngineIntegrationMode = 1; + break; + case "DISABLED": + case 2: + message.appEngineIntegrationMode = 2; + break; + } + if (object.keyPrefix != null) + message.keyPrefix = String(object.keyPrefix); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from a Database message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.Database + * @static + * @param {google.firestore.admin.v1.Database} message Database + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Database.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.locationId = ""; + object.type = options.enums === String ? "DATABASE_TYPE_UNSPECIFIED" : 0; + object.concurrencyMode = options.enums === String ? "CONCURRENCY_MODE_UNSPECIFIED" : 0; + object.appEngineIntegrationMode = options.enums === String ? "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED" : 0; + object.keyPrefix = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.firestore.admin.v1.Database.DatabaseType[message.type] === undefined ? message.type : $root.google.firestore.admin.v1.Database.DatabaseType[message.type] : message.type; + if (message.concurrencyMode != null && message.hasOwnProperty("concurrencyMode")) + object.concurrencyMode = options.enums === String ? $root.google.firestore.admin.v1.Database.ConcurrencyMode[message.concurrencyMode] === undefined ? message.concurrencyMode : $root.google.firestore.admin.v1.Database.ConcurrencyMode[message.concurrencyMode] : message.concurrencyMode; + if (message.appEngineIntegrationMode != null && message.hasOwnProperty("appEngineIntegrationMode")) + object.appEngineIntegrationMode = options.enums === String ? $root.google.firestore.admin.v1.Database.AppEngineIntegrationMode[message.appEngineIntegrationMode] === undefined ? message.appEngineIntegrationMode : $root.google.firestore.admin.v1.Database.AppEngineIntegrationMode[message.appEngineIntegrationMode] : message.appEngineIntegrationMode; + if (message.keyPrefix != null && message.hasOwnProperty("keyPrefix")) + object.keyPrefix = message.keyPrefix; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this Database to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.Database + * @instance + * @returns {Object.} JSON object + */ + Database.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Database + * @function getTypeUrl + * @memberof google.firestore.admin.v1.Database + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Database.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.Database"; + }; + + /** + * DatabaseType enum. + * @name google.firestore.admin.v1.Database.DatabaseType + * @enum {string} + * @property {string} DATABASE_TYPE_UNSPECIFIED=DATABASE_TYPE_UNSPECIFIED DATABASE_TYPE_UNSPECIFIED value + * @property {string} FIRESTORE_NATIVE=FIRESTORE_NATIVE FIRESTORE_NATIVE value + * @property {string} DATASTORE_MODE=DATASTORE_MODE DATASTORE_MODE value + */ + Database.DatabaseType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATABASE_TYPE_UNSPECIFIED"] = "DATABASE_TYPE_UNSPECIFIED"; + values[valuesById[1] = "FIRESTORE_NATIVE"] = "FIRESTORE_NATIVE"; + values[valuesById[2] = "DATASTORE_MODE"] = "DATASTORE_MODE"; + return values; + })(); + + /** + * ConcurrencyMode enum. + * @name google.firestore.admin.v1.Database.ConcurrencyMode + * @enum {string} + * @property {string} CONCURRENCY_MODE_UNSPECIFIED=CONCURRENCY_MODE_UNSPECIFIED CONCURRENCY_MODE_UNSPECIFIED value + * @property {string} OPTIMISTIC=OPTIMISTIC OPTIMISTIC value + * @property {string} PESSIMISTIC=PESSIMISTIC PESSIMISTIC value + * @property {string} OPTIMISTIC_WITH_ENTITY_GROUPS=OPTIMISTIC_WITH_ENTITY_GROUPS OPTIMISTIC_WITH_ENTITY_GROUPS value + */ + Database.ConcurrencyMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONCURRENCY_MODE_UNSPECIFIED"] = "CONCURRENCY_MODE_UNSPECIFIED"; + values[valuesById[1] = "OPTIMISTIC"] = "OPTIMISTIC"; + values[valuesById[2] = "PESSIMISTIC"] = "PESSIMISTIC"; + values[valuesById[3] = "OPTIMISTIC_WITH_ENTITY_GROUPS"] = "OPTIMISTIC_WITH_ENTITY_GROUPS"; + return values; + })(); + + /** + * AppEngineIntegrationMode enum. + * @name google.firestore.admin.v1.Database.AppEngineIntegrationMode + * @enum {string} + * @property {string} APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED=APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED value + * @property {string} ENABLED=ENABLED ENABLED value + * @property {string} DISABLED=DISABLED DISABLED value + */ + Database.AppEngineIntegrationMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED"] = "APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED"; + values[valuesById[1] = "ENABLED"] = "ENABLED"; + values[valuesById[2] = "DISABLED"] = "DISABLED"; + return values; + })(); + + return Database; + })(); + + v1.Field = (function() { + + /** + * Properties of a Field. + * @memberof google.firestore.admin.v1 + * @interface IField + * @property {string|null} [name] Field name + * @property {google.firestore.admin.v1.Field.IIndexConfig|null} [indexConfig] Field indexConfig + * @property {google.firestore.admin.v1.Field.ITtlConfig|null} [ttlConfig] Field ttlConfig + */ + + /** + * Constructs a new Field. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a Field. + * @implements IField + * @constructor + * @param {google.firestore.admin.v1.IField=} [properties] Properties to set + */ + function Field(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]]; + } + + /** + * Field name. + * @member {string} name + * @memberof google.firestore.admin.v1.Field + * @instance + */ + Field.prototype.name = ""; + + /** + * Field indexConfig. + * @member {google.firestore.admin.v1.Field.IIndexConfig|null|undefined} indexConfig + * @memberof google.firestore.admin.v1.Field + * @instance + */ + Field.prototype.indexConfig = null; + + /** + * Field ttlConfig. + * @member {google.firestore.admin.v1.Field.ITtlConfig|null|undefined} ttlConfig + * @memberof google.firestore.admin.v1.Field + * @instance + */ + Field.prototype.ttlConfig = null; + + /** + * Creates a Field message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.Field + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.Field} Field + */ + Field.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.Field) + return object; + var message = new $root.google.firestore.admin.v1.Field(); + if (object.name != null) + message.name = String(object.name); + if (object.indexConfig != null) { + if (typeof object.indexConfig !== "object") + throw TypeError(".google.firestore.admin.v1.Field.indexConfig: object expected"); + message.indexConfig = $root.google.firestore.admin.v1.Field.IndexConfig.fromObject(object.indexConfig); + } + if (object.ttlConfig != null) { + if (typeof object.ttlConfig !== "object") + throw TypeError(".google.firestore.admin.v1.Field.ttlConfig: object expected"); + message.ttlConfig = $root.google.firestore.admin.v1.Field.TtlConfig.fromObject(object.ttlConfig); + } + return message; + }; + + /** + * Creates a plain object from a Field message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.Field + * @static + * @param {google.firestore.admin.v1.Field} message Field + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Field.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.indexConfig = null; + object.ttlConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.indexConfig != null && message.hasOwnProperty("indexConfig")) + object.indexConfig = $root.google.firestore.admin.v1.Field.IndexConfig.toObject(message.indexConfig, options); + if (message.ttlConfig != null && message.hasOwnProperty("ttlConfig")) + object.ttlConfig = $root.google.firestore.admin.v1.Field.TtlConfig.toObject(message.ttlConfig, options); + return object; + }; + + /** + * Converts this Field to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.Field + * @instance + * @returns {Object.} JSON object + */ + Field.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Field + * @function getTypeUrl + * @memberof google.firestore.admin.v1.Field + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Field.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.Field"; + }; + + Field.IndexConfig = (function() { + + /** + * Properties of an IndexConfig. + * @memberof google.firestore.admin.v1.Field + * @interface IIndexConfig + * @property {Array.|null} [indexes] IndexConfig indexes + * @property {boolean|null} [usesAncestorConfig] IndexConfig usesAncestorConfig + * @property {string|null} [ancestorField] IndexConfig ancestorField + * @property {boolean|null} [reverting] IndexConfig reverting + */ + + /** + * Constructs a new IndexConfig. + * @memberof google.firestore.admin.v1.Field + * @classdesc Represents an IndexConfig. + * @implements IIndexConfig + * @constructor + * @param {google.firestore.admin.v1.Field.IIndexConfig=} [properties] Properties to set + */ + function IndexConfig(properties) { + this.indexes = []; + 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]]; + } + + /** + * IndexConfig indexes. + * @member {Array.} indexes + * @memberof google.firestore.admin.v1.Field.IndexConfig + * @instance + */ + IndexConfig.prototype.indexes = $util.emptyArray; + + /** + * IndexConfig usesAncestorConfig. + * @member {boolean} usesAncestorConfig + * @memberof google.firestore.admin.v1.Field.IndexConfig + * @instance + */ + IndexConfig.prototype.usesAncestorConfig = false; + + /** + * IndexConfig ancestorField. + * @member {string} ancestorField + * @memberof google.firestore.admin.v1.Field.IndexConfig + * @instance + */ + IndexConfig.prototype.ancestorField = ""; + + /** + * IndexConfig reverting. + * @member {boolean} reverting + * @memberof google.firestore.admin.v1.Field.IndexConfig + * @instance + */ + IndexConfig.prototype.reverting = false; + + /** + * Creates an IndexConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.Field.IndexConfig + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.Field.IndexConfig} IndexConfig + */ + IndexConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.Field.IndexConfig) + return object; + var message = new $root.google.firestore.admin.v1.Field.IndexConfig(); + if (object.indexes) { + if (!Array.isArray(object.indexes)) + throw TypeError(".google.firestore.admin.v1.Field.IndexConfig.indexes: array expected"); + message.indexes = []; + for (var i = 0; i < object.indexes.length; ++i) { + if (typeof object.indexes[i] !== "object") + throw TypeError(".google.firestore.admin.v1.Field.IndexConfig.indexes: object expected"); + message.indexes[i] = $root.google.firestore.admin.v1.Index.fromObject(object.indexes[i]); + } + } + if (object.usesAncestorConfig != null) + message.usesAncestorConfig = Boolean(object.usesAncestorConfig); + if (object.ancestorField != null) + message.ancestorField = String(object.ancestorField); + if (object.reverting != null) + message.reverting = Boolean(object.reverting); + return message; + }; + + /** + * Creates a plain object from an IndexConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.Field.IndexConfig + * @static + * @param {google.firestore.admin.v1.Field.IndexConfig} message IndexConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IndexConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.indexes = []; + if (options.defaults) { + object.usesAncestorConfig = false; + object.ancestorField = ""; + object.reverting = false; + } + if (message.indexes && message.indexes.length) { + object.indexes = []; + for (var j = 0; j < message.indexes.length; ++j) + object.indexes[j] = $root.google.firestore.admin.v1.Index.toObject(message.indexes[j], options); + } + if (message.usesAncestorConfig != null && message.hasOwnProperty("usesAncestorConfig")) + object.usesAncestorConfig = message.usesAncestorConfig; + if (message.ancestorField != null && message.hasOwnProperty("ancestorField")) + object.ancestorField = message.ancestorField; + if (message.reverting != null && message.hasOwnProperty("reverting")) + object.reverting = message.reverting; + return object; + }; + + /** + * Converts this IndexConfig to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.Field.IndexConfig + * @instance + * @returns {Object.} JSON object + */ + IndexConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IndexConfig + * @function getTypeUrl + * @memberof google.firestore.admin.v1.Field.IndexConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IndexConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.Field.IndexConfig"; + }; + + return IndexConfig; + })(); + + Field.TtlConfig = (function() { + + /** + * Properties of a TtlConfig. + * @memberof google.firestore.admin.v1.Field + * @interface ITtlConfig + * @property {google.firestore.admin.v1.Field.TtlConfig.State|null} [state] TtlConfig state + */ + + /** + * Constructs a new TtlConfig. + * @memberof google.firestore.admin.v1.Field + * @classdesc Represents a TtlConfig. + * @implements ITtlConfig + * @constructor + * @param {google.firestore.admin.v1.Field.ITtlConfig=} [properties] Properties to set + */ + function TtlConfig(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]]; + } + + /** + * TtlConfig state. + * @member {google.firestore.admin.v1.Field.TtlConfig.State} state + * @memberof google.firestore.admin.v1.Field.TtlConfig + * @instance + */ + TtlConfig.prototype.state = 0; + + /** + * Creates a TtlConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.Field.TtlConfig + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.Field.TtlConfig} TtlConfig + */ + TtlConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.Field.TtlConfig) + return object; + var message = new $root.google.firestore.admin.v1.Field.TtlConfig(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "ACTIVE": + case 2: + message.state = 2; + break; + case "NEEDS_REPAIR": + case 3: + message.state = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a TtlConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.Field.TtlConfig + * @static + * @param {google.firestore.admin.v1.Field.TtlConfig} message TtlConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TtlConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.firestore.admin.v1.Field.TtlConfig.State[message.state] === undefined ? message.state : $root.google.firestore.admin.v1.Field.TtlConfig.State[message.state] : message.state; + return object; + }; + + /** + * Converts this TtlConfig to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.Field.TtlConfig + * @instance + * @returns {Object.} JSON object + */ + TtlConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TtlConfig + * @function getTypeUrl + * @memberof google.firestore.admin.v1.Field.TtlConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TtlConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.Field.TtlConfig"; + }; + + /** + * State enum. + * @name google.firestore.admin.v1.Field.TtlConfig.State + * @enum {string} + * @property {string} STATE_UNSPECIFIED=STATE_UNSPECIFIED STATE_UNSPECIFIED value + * @property {string} CREATING=CREATING CREATING value + * @property {string} ACTIVE=ACTIVE ACTIVE value + * @property {string} NEEDS_REPAIR=NEEDS_REPAIR NEEDS_REPAIR value + */ + TtlConfig.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED"; + values[valuesById[1] = "CREATING"] = "CREATING"; + values[valuesById[2] = "ACTIVE"] = "ACTIVE"; + values[valuesById[3] = "NEEDS_REPAIR"] = "NEEDS_REPAIR"; + return values; + })(); + + return TtlConfig; + })(); + + return Field; + })(); + + v1.FirestoreAdmin = (function() { + + /** + * Constructs a new FirestoreAdmin service. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a FirestoreAdmin + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function FirestoreAdmin(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (FirestoreAdmin.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = FirestoreAdmin; + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#createIndex}. + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @typedef CreateIndexCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateIndex. + * @function createIndex + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.ICreateIndexRequest} request CreateIndexRequest message or plain object + * @param {google.firestore.admin.v1.FirestoreAdmin.CreateIndexCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(FirestoreAdmin.prototype.createIndex = function createIndex(request, callback) { + return this.rpcCall(createIndex, $root.google.firestore.admin.v1.CreateIndexRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateIndex" }); + + /** + * Calls CreateIndex. + * @function createIndex + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.ICreateIndexRequest} request CreateIndexRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#listIndexes}. + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @typedef ListIndexesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.firestore.admin.v1.ListIndexesResponse} [response] ListIndexesResponse + */ + + /** + * Calls ListIndexes. + * @function listIndexes + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IListIndexesRequest} request ListIndexesRequest message or plain object + * @param {google.firestore.admin.v1.FirestoreAdmin.ListIndexesCallback} callback Node-style callback called with the error, if any, and ListIndexesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(FirestoreAdmin.prototype.listIndexes = function listIndexes(request, callback) { + return this.rpcCall(listIndexes, $root.google.firestore.admin.v1.ListIndexesRequest, $root.google.firestore.admin.v1.ListIndexesResponse, request, callback); + }, "name", { value: "ListIndexes" }); + + /** + * Calls ListIndexes. + * @function listIndexes + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IListIndexesRequest} request ListIndexesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#getIndex}. + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @typedef GetIndexCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.firestore.admin.v1.Index} [response] Index + */ + + /** + * Calls GetIndex. + * @function getIndex + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IGetIndexRequest} request GetIndexRequest message or plain object + * @param {google.firestore.admin.v1.FirestoreAdmin.GetIndexCallback} callback Node-style callback called with the error, if any, and Index + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(FirestoreAdmin.prototype.getIndex = function getIndex(request, callback) { + return this.rpcCall(getIndex, $root.google.firestore.admin.v1.GetIndexRequest, $root.google.firestore.admin.v1.Index, request, callback); + }, "name", { value: "GetIndex" }); + + /** + * Calls GetIndex. + * @function getIndex + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IGetIndexRequest} request GetIndexRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#deleteIndex}. + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @typedef DeleteIndexCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteIndex. + * @function deleteIndex + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IDeleteIndexRequest} request DeleteIndexRequest message or plain object + * @param {google.firestore.admin.v1.FirestoreAdmin.DeleteIndexCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(FirestoreAdmin.prototype.deleteIndex = function deleteIndex(request, callback) { + return this.rpcCall(deleteIndex, $root.google.firestore.admin.v1.DeleteIndexRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteIndex" }); + + /** + * Calls DeleteIndex. + * @function deleteIndex + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IDeleteIndexRequest} request DeleteIndexRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#getField}. + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @typedef GetFieldCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.firestore.admin.v1.Field} [response] Field + */ + + /** + * Calls GetField. + * @function getField + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IGetFieldRequest} request GetFieldRequest message or plain object + * @param {google.firestore.admin.v1.FirestoreAdmin.GetFieldCallback} callback Node-style callback called with the error, if any, and Field + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(FirestoreAdmin.prototype.getField = function getField(request, callback) { + return this.rpcCall(getField, $root.google.firestore.admin.v1.GetFieldRequest, $root.google.firestore.admin.v1.Field, request, callback); + }, "name", { value: "GetField" }); + + /** + * Calls GetField. + * @function getField + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IGetFieldRequest} request GetFieldRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#updateField}. + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @typedef UpdateFieldCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateField. + * @function updateField + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IUpdateFieldRequest} request UpdateFieldRequest message or plain object + * @param {google.firestore.admin.v1.FirestoreAdmin.UpdateFieldCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(FirestoreAdmin.prototype.updateField = function updateField(request, callback) { + return this.rpcCall(updateField, $root.google.firestore.admin.v1.UpdateFieldRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateField" }); + + /** + * Calls UpdateField. + * @function updateField + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IUpdateFieldRequest} request UpdateFieldRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#listFields}. + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @typedef ListFieldsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.firestore.admin.v1.ListFieldsResponse} [response] ListFieldsResponse + */ + + /** + * Calls ListFields. + * @function listFields + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IListFieldsRequest} request ListFieldsRequest message or plain object + * @param {google.firestore.admin.v1.FirestoreAdmin.ListFieldsCallback} callback Node-style callback called with the error, if any, and ListFieldsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(FirestoreAdmin.prototype.listFields = function listFields(request, callback) { + return this.rpcCall(listFields, $root.google.firestore.admin.v1.ListFieldsRequest, $root.google.firestore.admin.v1.ListFieldsResponse, request, callback); + }, "name", { value: "ListFields" }); + + /** + * Calls ListFields. + * @function listFields + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IListFieldsRequest} request ListFieldsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#exportDocuments}. + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @typedef ExportDocumentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ExportDocuments. + * @function exportDocuments + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IExportDocumentsRequest} request ExportDocumentsRequest message or plain object + * @param {google.firestore.admin.v1.FirestoreAdmin.ExportDocumentsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(FirestoreAdmin.prototype.exportDocuments = function exportDocuments(request, callback) { + return this.rpcCall(exportDocuments, $root.google.firestore.admin.v1.ExportDocumentsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportDocuments" }); + + /** + * Calls ExportDocuments. + * @function exportDocuments + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IExportDocumentsRequest} request ExportDocumentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#importDocuments}. + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @typedef ImportDocumentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - protobuf.OneofDescriptorProto = (function() { + /** + * Calls ImportDocuments. + * @function importDocuments + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IImportDocumentsRequest} request ImportDocumentsRequest message or plain object + * @param {google.firestore.admin.v1.FirestoreAdmin.ImportDocumentsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(FirestoreAdmin.prototype.importDocuments = function importDocuments(request, callback) { + return this.rpcCall(importDocuments, $root.google.firestore.admin.v1.ImportDocumentsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportDocuments" }); - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ + /** + * Calls ImportDocuments. + * @function importDocuments + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IImportDocumentsRequest} request ImportDocumentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(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]]; - } + /** + * 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 + */ - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; + /** + * 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" }); - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; + /** + * 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 + */ - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#getDatabase}. + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @typedef GetDatabaseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.firestore.admin.v1.Database} [response] Database + */ - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; + /** + * Calls GetDatabase. + * @function getDatabase + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IGetDatabaseRequest} request GetDatabaseRequest message or plain object + * @param {google.firestore.admin.v1.FirestoreAdmin.GetDatabaseCallback} callback Node-style callback called with the error, if any, and Database + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(FirestoreAdmin.prototype.getDatabase = function getDatabase(request, callback) { + return this.rpcCall(getDatabase, $root.google.firestore.admin.v1.GetDatabaseRequest, $root.google.firestore.admin.v1.Database, request, callback); + }, "name", { value: "GetDatabase" }); - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls GetDatabase. + * @function getDatabase + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IGetDatabaseRequest} request GetDatabaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return OneofDescriptorProto; - })(); + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#listDatabases}. + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @typedef ListDatabasesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.firestore.admin.v1.ListDatabasesResponse} [response] ListDatabasesResponse + */ - protobuf.EnumDescriptorProto = (function() { + /** + * Calls ListDatabases. + * @function listDatabases + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IListDatabasesRequest} request ListDatabasesRequest message or plain object + * @param {google.firestore.admin.v1.FirestoreAdmin.ListDatabasesCallback} callback Node-style callback called with the error, if any, and ListDatabasesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(FirestoreAdmin.prototype.listDatabases = function listDatabases(request, callback) { + return this.rpcCall(listDatabases, $root.google.firestore.admin.v1.ListDatabasesRequest, $root.google.firestore.admin.v1.ListDatabasesResponse, request, callback); + }, "name", { value: "ListDatabases" }); - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - */ + /** + * Calls ListDatabases. + * @function listDatabases + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IListDatabasesRequest} request ListDatabasesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - 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]]; - } + /** + * Callback as used by {@link google.firestore.admin.v1.FirestoreAdmin#updateDatabase}. + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @typedef UpdateDatabaseCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateDatabase. + * @function updateDatabase + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IUpdateDatabaseRequest} request UpdateDatabaseRequest message or plain object + * @param {google.firestore.admin.v1.FirestoreAdmin.UpdateDatabaseCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(FirestoreAdmin.prototype.updateDatabase = function updateDatabase(request, callback) { + return this.rpcCall(updateDatabase, $root.google.firestore.admin.v1.UpdateDatabaseRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateDatabase" }); + + /** + * Calls UpdateDatabase. + * @function updateDatabase + * @memberof google.firestore.admin.v1.FirestoreAdmin + * @instance + * @param {google.firestore.admin.v1.IUpdateDatabaseRequest} request UpdateDatabaseRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; + return FirestoreAdmin; + })(); - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; + v1.ListDatabasesRequest = (function() { - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; + /** + * Properties of a ListDatabasesRequest. + * @memberof google.firestore.admin.v1 + * @interface IListDatabasesRequest + * @property {string|null} [parent] ListDatabasesRequest parent + */ - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + /** + * Constructs a new ListDatabasesRequest. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a ListDatabasesRequest. + * @implements IListDatabasesRequest + * @constructor + * @param {google.firestore.admin.v1.IListDatabasesRequest=} [properties] Properties to set + */ + function ListDatabasesRequest(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]]; } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.value = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - return object; - }; - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ListDatabasesRequest parent. + * @member {string} parent + * @memberof google.firestore.admin.v1.ListDatabasesRequest + * @instance + */ + ListDatabasesRequest.prototype.parent = ""; - return EnumDescriptorProto; - })(); + /** + * Creates a ListDatabasesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.ListDatabasesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.ListDatabasesRequest} ListDatabasesRequest + */ + ListDatabasesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.ListDatabasesRequest) + return object; + var message = new $root.google.firestore.admin.v1.ListDatabasesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; - protobuf.EnumValueDescriptorProto = (function() { + /** + * Creates a plain object from a ListDatabasesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.ListDatabasesRequest + * @static + * @param {google.firestore.admin.v1.ListDatabasesRequest} message ListDatabasesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDatabasesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ + /** + * Converts this ListDatabasesRequest to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.ListDatabasesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDatabasesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(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]]; - } + /** + * Gets the default type url for ListDatabasesRequest + * @function getTypeUrl + * @memberof google.firestore.admin.v1.ListDatabasesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDatabasesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.ListDatabasesRequest"; + }; - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; + return ListDatabasesRequest; + })(); - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; + v1.CreateDatabaseRequest = (function() { - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; + /** + * 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 + */ - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; + /** + * 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]]; + } - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; + /** + * CreateDatabaseRequest parent. + * @member {string} parent + * @memberof google.firestore.admin.v1.CreateDatabaseRequest + * @instance + */ + CreateDatabaseRequest.prototype.parent = ""; - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * CreateDatabaseRequest database. + * @member {google.firestore.admin.v1.IDatabase|null|undefined} database + * @memberof google.firestore.admin.v1.CreateDatabaseRequest + * @instance + */ + CreateDatabaseRequest.prototype.database = null; - return EnumValueDescriptorProto; - })(); + /** + * CreateDatabaseRequest databaseId. + * @member {string} databaseId + * @memberof google.firestore.admin.v1.CreateDatabaseRequest + * @instance + */ + CreateDatabaseRequest.prototype.databaseId = ""; - protobuf.ServiceDescriptorProto = (function() { + /** + * 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; + }; - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ + /** + * 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; + }; - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - 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]]; - } + /** + * 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); + }; - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; + /** + * 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"; + }; - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; + return CreateDatabaseRequest; + })(); - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; + v1.ListDatabasesResponse = (function() { - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; + /** + * Properties of a ListDatabasesResponse. + * @memberof google.firestore.admin.v1 + * @interface IListDatabasesResponse + * @property {Array.|null} [databases] ListDatabasesResponse databases + */ - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; + /** + * Constructs a new ListDatabasesResponse. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a ListDatabasesResponse. + * @implements IListDatabasesResponse + * @constructor + * @param {google.firestore.admin.v1.IListDatabasesResponse=} [properties] Properties to set + */ + function ListDatabasesResponse(properties) { + this.databases = []; + 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]]; + } - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ListDatabasesResponse databases. + * @member {Array.} databases + * @memberof google.firestore.admin.v1.ListDatabasesResponse + * @instance + */ + ListDatabasesResponse.prototype.databases = $util.emptyArray; - return ServiceDescriptorProto; - })(); + /** + * Creates a ListDatabasesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.ListDatabasesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.ListDatabasesResponse} ListDatabasesResponse + */ + ListDatabasesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.ListDatabasesResponse) + return object; + var message = new $root.google.firestore.admin.v1.ListDatabasesResponse(); + if (object.databases) { + if (!Array.isArray(object.databases)) + throw TypeError(".google.firestore.admin.v1.ListDatabasesResponse.databases: array expected"); + message.databases = []; + for (var i = 0; i < object.databases.length; ++i) { + if (typeof object.databases[i] !== "object") + throw TypeError(".google.firestore.admin.v1.ListDatabasesResponse.databases: object expected"); + message.databases[i] = $root.google.firestore.admin.v1.Database.fromObject(object.databases[i]); + } + } + return message; + }; - protobuf.MethodDescriptorProto = (function() { + /** + * Creates a plain object from a ListDatabasesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.ListDatabasesResponse + * @static + * @param {google.firestore.admin.v1.ListDatabasesResponse} message ListDatabasesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDatabasesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.databases = []; + if (message.databases && message.databases.length) { + object.databases = []; + for (var j = 0; j < message.databases.length; ++j) + object.databases[j] = $root.google.firestore.admin.v1.Database.toObject(message.databases[j], options); + } + return object; + }; - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ + /** + * Converts this ListDatabasesResponse to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.ListDatabasesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDatabasesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(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]]; - } + /** + * Gets the default type url for ListDatabasesResponse + * @function getTypeUrl + * @memberof google.firestore.admin.v1.ListDatabasesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDatabasesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.ListDatabasesResponse"; + }; - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; + return ListDatabasesResponse; + })(); - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; + v1.GetDatabaseRequest = (function() { - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; + /** + * Properties of a GetDatabaseRequest. + * @memberof google.firestore.admin.v1 + * @interface IGetDatabaseRequest + * @property {string|null} [name] GetDatabaseRequest name + */ - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; + /** + * Constructs a new GetDatabaseRequest. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a GetDatabaseRequest. + * @implements IGetDatabaseRequest + * @constructor + * @param {google.firestore.admin.v1.IGetDatabaseRequest=} [properties] Properties to set + */ + function GetDatabaseRequest(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]]; + } - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; + /** + * GetDatabaseRequest name. + * @member {string} name + * @memberof google.firestore.admin.v1.GetDatabaseRequest + * @instance + */ + GetDatabaseRequest.prototype.name = ""; - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; + /** + * Creates a GetDatabaseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.GetDatabaseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.GetDatabaseRequest} GetDatabaseRequest + */ + GetDatabaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.GetDatabaseRequest) + return object; + var message = new $root.google.firestore.admin.v1.GetDatabaseRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; + /** + * Creates a plain object from a GetDatabaseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.GetDatabaseRequest + * @static + * @param {google.firestore.admin.v1.GetDatabaseRequest} message GetDatabaseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDatabaseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; + /** + * Converts this GetDatabaseRequest to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.GetDatabaseRequest + * @instance + * @returns {Object.} JSON object + */ + GetDatabaseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Gets the default type url for GetDatabaseRequest + * @function getTypeUrl + * @memberof google.firestore.admin.v1.GetDatabaseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDatabaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.GetDatabaseRequest"; + }; - return MethodDescriptorProto; - })(); + return GetDatabaseRequest; + })(); - protobuf.FileOptions = (function() { + v1.UpdateDatabaseRequest = (function() { - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ + /** + * Properties of an UpdateDatabaseRequest. + * @memberof google.firestore.admin.v1 + * @interface IUpdateDatabaseRequest + * @property {google.firestore.admin.v1.IDatabase|null} [database] UpdateDatabaseRequest database + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDatabaseRequest updateMask + */ - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - 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]]; - } + /** + * Constructs a new UpdateDatabaseRequest. + * @memberof google.firestore.admin.v1 + * @classdesc Represents an UpdateDatabaseRequest. + * @implements IUpdateDatabaseRequest + * @constructor + * @param {google.firestore.admin.v1.IUpdateDatabaseRequest=} [properties] Properties to set + */ + function UpdateDatabaseRequest(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]]; + } - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; + /** + * UpdateDatabaseRequest database. + * @member {google.firestore.admin.v1.IDatabase|null|undefined} database + * @memberof google.firestore.admin.v1.UpdateDatabaseRequest + * @instance + */ + UpdateDatabaseRequest.prototype.database = null; - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; + /** + * UpdateDatabaseRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.firestore.admin.v1.UpdateDatabaseRequest + * @instance + */ + UpdateDatabaseRequest.prototype.updateMask = null; - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; + /** + * Creates an UpdateDatabaseRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.UpdateDatabaseRequest + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.UpdateDatabaseRequest} UpdateDatabaseRequest + */ + UpdateDatabaseRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.UpdateDatabaseRequest) + return object; + var message = new $root.google.firestore.admin.v1.UpdateDatabaseRequest(); + if (object.database != null) { + if (typeof object.database !== "object") + throw TypeError(".google.firestore.admin.v1.UpdateDatabaseRequest.database: object expected"); + message.database = $root.google.firestore.admin.v1.Database.fromObject(object.database); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.firestore.admin.v1.UpdateDatabaseRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; + /** + * Creates a plain object from an UpdateDatabaseRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.UpdateDatabaseRequest + * @static + * @param {google.firestore.admin.v1.UpdateDatabaseRequest} message UpdateDatabaseRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDatabaseRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.database = null; + object.updateMask = null; + } + if (message.database != null && message.hasOwnProperty("database")) + object.database = $root.google.firestore.admin.v1.Database.toObject(message.database, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; + /** + * Converts this UpdateDatabaseRequest to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.UpdateDatabaseRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDatabaseRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; + /** + * Gets the default type url for UpdateDatabaseRequest + * @function getTypeUrl + * @memberof google.firestore.admin.v1.UpdateDatabaseRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDatabaseRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.UpdateDatabaseRequest"; + }; - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; + return UpdateDatabaseRequest; + })(); - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; + v1.UpdateDatabaseMetadata = (function() { - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; + /** + * Properties of an UpdateDatabaseMetadata. + * @memberof google.firestore.admin.v1 + * @interface IUpdateDatabaseMetadata + */ - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; + /** + * Constructs a new UpdateDatabaseMetadata. + * @memberof google.firestore.admin.v1 + * @classdesc Represents an UpdateDatabaseMetadata. + * @implements IUpdateDatabaseMetadata + * @constructor + * @param {google.firestore.admin.v1.IUpdateDatabaseMetadata=} [properties] Properties to set + */ + function UpdateDatabaseMetadata(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 an UpdateDatabaseMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.UpdateDatabaseMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.UpdateDatabaseMetadata} UpdateDatabaseMetadata + */ + UpdateDatabaseMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.UpdateDatabaseMetadata) + return object; + return new $root.google.firestore.admin.v1.UpdateDatabaseMetadata(); + }; - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; + /** + * Creates a plain object from an UpdateDatabaseMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.UpdateDatabaseMetadata + * @static + * @param {google.firestore.admin.v1.UpdateDatabaseMetadata} message UpdateDatabaseMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDatabaseMetadata.toObject = function toObject() { + return {}; + }; - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = false; + /** + * Converts this UpdateDatabaseMetadata to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.UpdateDatabaseMetadata + * @instance + * @returns {Object.} JSON object + */ + UpdateDatabaseMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; + /** + * Gets the default type url for UpdateDatabaseMetadata + * @function getTypeUrl + * @memberof google.firestore.admin.v1.UpdateDatabaseMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDatabaseMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.UpdateDatabaseMetadata"; + }; - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; + return UpdateDatabaseMetadata; + })(); - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; + v1.CreateIndexRequest = (function() { - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + /** + * Properties of a CreateIndexRequest. + * @memberof google.firestore.admin.v1 + * @interface ICreateIndexRequest + * @property {string|null} [parent] CreateIndexRequest parent + * @property {google.firestore.admin.v1.IIndex|null} [index] CreateIndexRequest index + */ - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + /** + * Constructs a new CreateIndexRequest. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a CreateIndexRequest. + * @implements ICreateIndexRequest + * @constructor + * @param {google.firestore.admin.v1.ICreateIndexRequest=} [properties] Properties to set + */ + function CreateIndexRequest(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]]; } - } - return message; - }; - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = false; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; + /** + * CreateIndexRequest parent. + * @member {string} parent + * @memberof google.firestore.admin.v1.CreateIndexRequest + * @instance + */ + CreateIndexRequest.prototype.parent = ""; + + /** + * CreateIndexRequest index. + * @member {google.firestore.admin.v1.IIndex|null|undefined} index + * @memberof google.firestore.admin.v1.CreateIndexRequest + * @instance + */ + CreateIndexRequest.prototype.index = null; - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a CreateIndexRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.CreateIndexRequest + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.CreateIndexRequest} CreateIndexRequest + */ + CreateIndexRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.CreateIndexRequest) + return object; + var message = new $root.google.firestore.admin.v1.CreateIndexRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.index != null) { + if (typeof object.index !== "object") + throw TypeError(".google.firestore.admin.v1.CreateIndexRequest.index: object expected"); + message.index = $root.google.firestore.admin.v1.Index.fromObject(object.index); + } + return message; + }; - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {string} - * @property {string} SPEED=SPEED SPEED value - * @property {string} CODE_SIZE=CODE_SIZE CODE_SIZE value - * @property {string} LITE_RUNTIME=LITE_RUNTIME LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = "SPEED"; - values[valuesById[2] = "CODE_SIZE"] = "CODE_SIZE"; - values[valuesById[3] = "LITE_RUNTIME"] = "LITE_RUNTIME"; - return values; - })(); + /** + * Creates a plain object from a CreateIndexRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.CreateIndexRequest + * @static + * @param {google.firestore.admin.v1.CreateIndexRequest} message CreateIndexRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateIndexRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.index = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.index != null && message.hasOwnProperty("index")) + object.index = $root.google.firestore.admin.v1.Index.toObject(message.index, options); + return object; + }; - return FileOptions; - })(); + /** + * Converts this CreateIndexRequest to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.CreateIndexRequest + * @instance + * @returns {Object.} JSON object + */ + CreateIndexRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - protobuf.MessageOptions = (function() { + /** + * Gets the default type url for CreateIndexRequest + * @function getTypeUrl + * @memberof google.firestore.admin.v1.CreateIndexRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateIndexRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.CreateIndexRequest"; + }; - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ + return CreateIndexRequest; + })(); - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } + v1.ListIndexesRequest = (function() { - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; + /** + * Properties of a ListIndexesRequest. + * @memberof google.firestore.admin.v1 + * @interface IListIndexesRequest + * @property {string|null} [parent] ListIndexesRequest parent + * @property {string|null} [filter] ListIndexesRequest filter + * @property {number|null} [pageSize] ListIndexesRequest pageSize + * @property {string|null} [pageToken] ListIndexesRequest pageToken + */ - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; + /** + * Constructs a new ListIndexesRequest. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a ListIndexesRequest. + * @implements IListIndexesRequest + * @constructor + * @param {google.firestore.admin.v1.IListIndexesRequest=} [properties] Properties to set + */ + function ListIndexesRequest(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]]; + } - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; + /** + * ListIndexesRequest parent. + * @member {string} parent + * @memberof google.firestore.admin.v1.ListIndexesRequest + * @instance + */ + ListIndexesRequest.prototype.parent = ""; - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; + /** + * ListIndexesRequest filter. + * @member {string} filter + * @memberof google.firestore.admin.v1.ListIndexesRequest + * @instance + */ + ListIndexesRequest.prototype.filter = ""; - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * ListIndexesRequest pageSize. + * @member {number} pageSize + * @memberof google.firestore.admin.v1.ListIndexesRequest + * @instance + */ + ListIndexesRequest.prototype.pageSize = 0; - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; + /** + * ListIndexesRequest pageToken. + * @member {string} pageToken + * @memberof google.firestore.admin.v1.ListIndexesRequest + * @instance + */ + ListIndexesRequest.prototype.pageToken = ""; - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; + /** + * Creates a ListIndexesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.ListIndexesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.ListIndexesRequest} ListIndexesRequest + */ + ListIndexesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.ListIndexesRequest) + return object; + var message = new $root.google.firestore.admin.v1.ListIndexesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; + /** + * Creates a plain object from a ListIndexesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.ListIndexesRequest + * @static + * @param {google.firestore.admin.v1.ListIndexesRequest} message ListIndexesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListIndexesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this ListIndexesRequest to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.ListIndexesRequest + * @instance + * @returns {Object.} JSON object + */ + ListIndexesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return MessageOptions; - })(); + /** + * Gets the default type url for ListIndexesRequest + * @function getTypeUrl + * @memberof google.firestore.admin.v1.ListIndexesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListIndexesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.ListIndexesRequest"; + }; - protobuf.FieldOptions = (function() { + return ListIndexesRequest; + })(); - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - */ + v1.ListIndexesResponse = (function() { - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - 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]]; - } + /** + * Properties of a ListIndexesResponse. + * @memberof google.firestore.admin.v1 + * @interface IListIndexesResponse + * @property {Array.|null} [indexes] ListIndexesResponse indexes + * @property {string|null} [nextPageToken] ListIndexesResponse nextPageToken + */ - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; + /** + * Constructs a new ListIndexesResponse. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a ListIndexesResponse. + * @implements IListIndexesResponse + * @constructor + * @param {google.firestore.admin.v1.IListIndexesResponse=} [properties] Properties to set + */ + function ListIndexesResponse(properties) { + this.indexes = []; + 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]]; + } - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; + /** + * ListIndexesResponse indexes. + * @member {Array.} indexes + * @memberof google.firestore.admin.v1.ListIndexesResponse + * @instance + */ + ListIndexesResponse.prototype.indexes = $util.emptyArray; - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; + /** + * ListIndexesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.firestore.admin.v1.ListIndexesResponse + * @instance + */ + ListIndexesResponse.prototype.nextPageToken = ""; - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; + /** + * Creates a ListIndexesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.ListIndexesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.ListIndexesResponse} ListIndexesResponse + */ + ListIndexesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.ListIndexesResponse) + return object; + var message = new $root.google.firestore.admin.v1.ListIndexesResponse(); + if (object.indexes) { + if (!Array.isArray(object.indexes)) + throw TypeError(".google.firestore.admin.v1.ListIndexesResponse.indexes: array expected"); + message.indexes = []; + for (var i = 0; i < object.indexes.length; ++i) { + if (typeof object.indexes[i] !== "object") + throw TypeError(".google.firestore.admin.v1.ListIndexesResponse.indexes: object expected"); + message.indexes[i] = $root.google.firestore.admin.v1.Index.fromObject(object.indexes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListIndexesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.ListIndexesResponse + * @static + * @param {google.firestore.admin.v1.ListIndexesResponse} message ListIndexesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListIndexesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.indexes = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.indexes && message.indexes.length) { + object.indexes = []; + for (var j = 0; j < message.indexes.length; ++j) + object.indexes[j] = $root.google.firestore.admin.v1.Index.toObject(message.indexes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; + /** + * Converts this ListIndexesResponse to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.ListIndexesResponse + * @instance + * @returns {Object.} JSON object + */ + ListIndexesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; + /** + * Gets the default type url for ListIndexesResponse + * @function getTypeUrl + * @memberof google.firestore.admin.v1.ListIndexesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListIndexesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.ListIndexesResponse"; + }; - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + return ListIndexesResponse; + })(); - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + v1.GetIndexRequest = (function() { - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + /** + * Properties of a GetIndexRequest. + * @memberof google.firestore.admin.v1 + * @interface IGetIndexRequest + * @property {string|null} [name] GetIndexRequest name + */ - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + /** + * Constructs a new GetIndexRequest. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a GetIndexRequest. + * @implements IGetIndexRequest + * @constructor + * @param {google.firestore.admin.v1.IGetIndexRequest=} [properties] Properties to set + */ + function GetIndexRequest(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]]; } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - return message; - }; - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; + /** + * GetIndexRequest name. + * @member {string} name + * @memberof google.firestore.admin.v1.GetIndexRequest + * @instance + */ + GetIndexRequest.prototype.name = ""; + + /** + * Creates a GetIndexRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.GetIndexRequest + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.GetIndexRequest} GetIndexRequest + */ + GetIndexRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.GetIndexRequest) + return object; + var message = new $root.google.firestore.admin.v1.GetIndexRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a GetIndexRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.GetIndexRequest + * @static + * @param {google.firestore.admin.v1.GetIndexRequest} message GetIndexRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIndexRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {string} - * @property {string} STRING=STRING STRING value - * @property {string} CORD=CORD CORD value - * @property {string} STRING_PIECE=STRING_PIECE STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = "STRING"; - values[valuesById[1] = "CORD"] = "CORD"; - values[valuesById[2] = "STRING_PIECE"] = "STRING_PIECE"; - return values; - })(); + /** + * Converts this GetIndexRequest to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.GetIndexRequest + * @instance + * @returns {Object.} JSON object + */ + GetIndexRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {string} - * @property {string} JS_NORMAL=JS_NORMAL JS_NORMAL value - * @property {string} JS_STRING=JS_STRING JS_STRING value - * @property {string} JS_NUMBER=JS_NUMBER JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = "JS_NORMAL"; - values[valuesById[1] = "JS_STRING"] = "JS_STRING"; - values[valuesById[2] = "JS_NUMBER"] = "JS_NUMBER"; - return values; - })(); + /** + * Gets the default type url for GetIndexRequest + * @function getTypeUrl + * @memberof google.firestore.admin.v1.GetIndexRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetIndexRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.GetIndexRequest"; + }; - return FieldOptions; - })(); + return GetIndexRequest; + })(); - protobuf.OneofOptions = (function() { + v1.DeleteIndexRequest = (function() { - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ + /** + * Properties of a DeleteIndexRequest. + * @memberof google.firestore.admin.v1 + * @interface IDeleteIndexRequest + * @property {string|null} [name] DeleteIndexRequest name + */ - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } + /** + * Constructs a new DeleteIndexRequest. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a DeleteIndexRequest. + * @implements IDeleteIndexRequest + * @constructor + * @param {google.firestore.admin.v1.IDeleteIndexRequest=} [properties] Properties to set + */ + function DeleteIndexRequest(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]]; + } - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * DeleteIndexRequest name. + * @member {string} name + * @memberof google.firestore.admin.v1.DeleteIndexRequest + * @instance + */ + DeleteIndexRequest.prototype.name = ""; - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; + /** + * Creates a DeleteIndexRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.DeleteIndexRequest + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.DeleteIndexRequest} DeleteIndexRequest + */ + DeleteIndexRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.DeleteIndexRequest) + return object; + var message = new $root.google.firestore.admin.v1.DeleteIndexRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * Creates a plain object from a DeleteIndexRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.DeleteIndexRequest + * @static + * @param {google.firestore.admin.v1.DeleteIndexRequest} message DeleteIndexRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteIndexRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteIndexRequest to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.DeleteIndexRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteIndexRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteIndexRequest + * @function getTypeUrl + * @memberof google.firestore.admin.v1.DeleteIndexRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteIndexRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.DeleteIndexRequest"; + }; + + return DeleteIndexRequest; + })(); + + v1.UpdateFieldRequest = (function() { + + /** + * Properties of an UpdateFieldRequest. + * @memberof google.firestore.admin.v1 + * @interface IUpdateFieldRequest + * @property {google.firestore.admin.v1.IField|null} [field] UpdateFieldRequest field + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFieldRequest updateMask + */ + + /** + * Constructs a new UpdateFieldRequest. + * @memberof google.firestore.admin.v1 + * @classdesc Represents an UpdateFieldRequest. + * @implements IUpdateFieldRequest + * @constructor + * @param {google.firestore.admin.v1.IUpdateFieldRequest=} [properties] Properties to set + */ + function UpdateFieldRequest(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]]; + } - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * UpdateFieldRequest field. + * @member {google.firestore.admin.v1.IField|null|undefined} field + * @memberof google.firestore.admin.v1.UpdateFieldRequest + * @instance + */ + UpdateFieldRequest.prototype.field = null; - return OneofOptions; - })(); + /** + * UpdateFieldRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.firestore.admin.v1.UpdateFieldRequest + * @instance + */ + UpdateFieldRequest.prototype.updateMask = null; - protobuf.EnumOptions = (function() { + /** + * Creates an UpdateFieldRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.UpdateFieldRequest + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.UpdateFieldRequest} UpdateFieldRequest + */ + UpdateFieldRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.UpdateFieldRequest) + return object; + var message = new $root.google.firestore.admin.v1.UpdateFieldRequest(); + if (object.field != null) { + if (typeof object.field !== "object") + throw TypeError(".google.firestore.admin.v1.UpdateFieldRequest.field: object expected"); + message.field = $root.google.firestore.admin.v1.Field.fromObject(object.field); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.firestore.admin.v1.UpdateFieldRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ + /** + * Creates a plain object from an UpdateFieldRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.UpdateFieldRequest + * @static + * @param {google.firestore.admin.v1.UpdateFieldRequest} message UpdateFieldRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateFieldRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = null; + object.updateMask = null; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = $root.google.firestore.admin.v1.Field.toObject(message.field, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; - /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } + /** + * Converts this UpdateFieldRequest to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.UpdateFieldRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateFieldRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; + /** + * Gets the default type url for UpdateFieldRequest + * @function getTypeUrl + * @memberof google.firestore.admin.v1.UpdateFieldRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateFieldRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.UpdateFieldRequest"; + }; - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; + return UpdateFieldRequest; + })(); - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + v1.GetFieldRequest = (function() { - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + /** + * Properties of a GetFieldRequest. + * @memberof google.firestore.admin.v1 + * @interface IGetFieldRequest + * @property {string|null} [name] GetFieldRequest name + */ + + /** + * Constructs a new GetFieldRequest. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a GetFieldRequest. + * @implements IGetFieldRequest + * @constructor + * @param {google.firestore.admin.v1.IGetFieldRequest=} [properties] Properties to set + */ + function GetFieldRequest(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]]; } - } - return message; - }; - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * GetFieldRequest name. + * @member {string} name + * @memberof google.firestore.admin.v1.GetFieldRequest + * @instance + */ + GetFieldRequest.prototype.name = ""; - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a GetFieldRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.GetFieldRequest + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.GetFieldRequest} GetFieldRequest + */ + GetFieldRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.GetFieldRequest) + return object; + var message = new $root.google.firestore.admin.v1.GetFieldRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; - return EnumOptions; - })(); + /** + * Creates a plain object from a GetFieldRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.GetFieldRequest + * @static + * @param {google.firestore.admin.v1.GetFieldRequest} message GetFieldRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFieldRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; - protobuf.EnumValueOptions = (function() { + /** + * Converts this GetFieldRequest to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.GetFieldRequest + * @instance + * @returns {Object.} JSON object + */ + GetFieldRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ + /** + * Gets the default type url for GetFieldRequest + * @function getTypeUrl + * @memberof google.firestore.admin.v1.GetFieldRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetFieldRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.GetFieldRequest"; + }; - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } + return GetFieldRequest; + })(); - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; + v1.ListFieldsRequest = (function() { - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Properties of a ListFieldsRequest. + * @memberof google.firestore.admin.v1 + * @interface IListFieldsRequest + * @property {string|null} [parent] ListFieldsRequest parent + * @property {string|null} [filter] ListFieldsRequest filter + * @property {number|null} [pageSize] ListFieldsRequest pageSize + * @property {string|null} [pageToken] ListFieldsRequest pageToken + */ - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + /** + * Constructs a new ListFieldsRequest. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a ListFieldsRequest. + * @implements IListFieldsRequest + * @constructor + * @param {google.firestore.admin.v1.IListFieldsRequest=} [properties] Properties to set + */ + function ListFieldsRequest(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]]; } - } - return message; - }; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return EnumValueOptions; - })(); + /** + * ListFieldsRequest parent. + * @member {string} parent + * @memberof google.firestore.admin.v1.ListFieldsRequest + * @instance + */ + ListFieldsRequest.prototype.parent = ""; - protobuf.ServiceOptions = (function() { + /** + * ListFieldsRequest filter. + * @member {string} filter + * @memberof google.firestore.admin.v1.ListFieldsRequest + * @instance + */ + ListFieldsRequest.prototype.filter = ""; - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - */ + /** + * ListFieldsRequest pageSize. + * @member {number} pageSize + * @memberof google.firestore.admin.v1.ListFieldsRequest + * @instance + */ + ListFieldsRequest.prototype.pageSize = 0; - /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions - * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } + /** + * ListFieldsRequest pageToken. + * @member {string} pageToken + * @memberof google.firestore.admin.v1.ListFieldsRequest + * @instance + */ + ListFieldsRequest.prototype.pageToken = ""; - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; + /** + * Creates a ListFieldsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.ListFieldsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.ListFieldsRequest} ListFieldsRequest + */ + ListFieldsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.ListFieldsRequest) + return object; + var message = new $root.google.firestore.admin.v1.ListFieldsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Creates a plain object from a ListFieldsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.ListFieldsRequest + * @static + * @param {google.firestore.admin.v1.ListFieldsRequest} message ListFieldsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFieldsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; + /** + * Converts this ListFieldsRequest to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.ListFieldsRequest + * @instance + * @returns {Object.} JSON object + */ + ListFieldsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + /** + * Gets the default type url for ListFieldsRequest + * @function getTypeUrl + * @memberof google.firestore.admin.v1.ListFieldsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFieldsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.ListFieldsRequest"; + }; - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - return message; - }; + return ListFieldsRequest; + })(); - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - return object; - }; + v1.ListFieldsResponse = (function() { - /** - * Converts this ServiceOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceOptions - * @instance - * @returns {Object.} JSON object - */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of a ListFieldsResponse. + * @memberof google.firestore.admin.v1 + * @interface IListFieldsResponse + * @property {Array.|null} [fields] ListFieldsResponse fields + * @property {string|null} [nextPageToken] ListFieldsResponse nextPageToken + */ - return ServiceOptions; - })(); + /** + * Constructs a new ListFieldsResponse. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a ListFieldsResponse. + * @implements IListFieldsResponse + * @constructor + * @param {google.firestore.admin.v1.IListFieldsResponse=} [properties] Properties to set + */ + function ListFieldsResponse(properties) { + this.fields = []; + 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]]; + } - protobuf.MethodOptions = (function() { + /** + * ListFieldsResponse fields. + * @member {Array.} fields + * @memberof google.firestore.admin.v1.ListFieldsResponse + * @instance + */ + ListFieldsResponse.prototype.fields = $util.emptyArray; - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo - */ + /** + * ListFieldsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.firestore.admin.v1.ListFieldsResponse + * @instance + */ + ListFieldsResponse.prototype.nextPageToken = ""; - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - 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 ListFieldsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.ListFieldsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.ListFieldsResponse} ListFieldsResponse + */ + ListFieldsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.ListFieldsResponse) + return object; + var message = new $root.google.firestore.admin.v1.ListFieldsResponse(); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.firestore.admin.v1.ListFieldsResponse.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.firestore.admin.v1.ListFieldsResponse.fields: object expected"); + message.fields[i] = $root.google.firestore.admin.v1.Field.fromObject(object.fields[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; + /** + * Creates a plain object from a ListFieldsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.ListFieldsResponse + * @static + * @param {google.firestore.admin.v1.ListFieldsResponse} message ListFieldsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFieldsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fields = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.firestore.admin.v1.Field.toObject(message.fields[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Converts this ListFieldsResponse to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.ListFieldsResponse + * @instance + * @returns {Object.} JSON object + */ + ListFieldsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; + /** + * Gets the default type url for ListFieldsResponse + * @function getTypeUrl + * @memberof google.firestore.admin.v1.ListFieldsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFieldsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.ListFieldsResponse"; + }; - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + return ListFieldsResponse; + })(); - /** - * MethodOptions .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + v1.ExportDocumentsRequest = (function() { - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); - } - return message; - }; + /** + * Properties of an ExportDocumentsRequest. + * @memberof google.firestore.admin.v1 + * @interface IExportDocumentsRequest + * @property {string|null} [name] ExportDocumentsRequest name + * @property {Array.|null} [collectionIds] ExportDocumentsRequest collectionIds + * @property {string|null} [outputUriPrefix] ExportDocumentsRequest outputUriPrefix + */ - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object[".google.longrunning.operationInfo"] = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; + /** + * Constructs a new ExportDocumentsRequest. + * @memberof google.firestore.admin.v1 + * @classdesc Represents an ExportDocumentsRequest. + * @implements IExportDocumentsRequest + * @constructor + * @param {google.firestore.admin.v1.IExportDocumentsRequest=} [properties] Properties to set + */ + function ExportDocumentsRequest(properties) { + this.collectionIds = []; + 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]]; + } - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ExportDocumentsRequest name. + * @member {string} name + * @memberof google.firestore.admin.v1.ExportDocumentsRequest + * @instance + */ + ExportDocumentsRequest.prototype.name = ""; - return MethodOptions; - })(); + /** + * ExportDocumentsRequest collectionIds. + * @member {Array.} collectionIds + * @memberof google.firestore.admin.v1.ExportDocumentsRequest + * @instance + */ + ExportDocumentsRequest.prototype.collectionIds = $util.emptyArray; - protobuf.UninterpretedOption = (function() { + /** + * ExportDocumentsRequest outputUriPrefix. + * @member {string} outputUriPrefix + * @memberof google.firestore.admin.v1.ExportDocumentsRequest + * @instance + */ + ExportDocumentsRequest.prototype.outputUriPrefix = ""; - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|string|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|string|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ + /** + * Creates an ExportDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.ExportDocumentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.ExportDocumentsRequest} ExportDocumentsRequest + */ + ExportDocumentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.ExportDocumentsRequest) + return object; + var message = new $root.google.firestore.admin.v1.ExportDocumentsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.collectionIds) { + if (!Array.isArray(object.collectionIds)) + throw TypeError(".google.firestore.admin.v1.ExportDocumentsRequest.collectionIds: array expected"); + message.collectionIds = []; + for (var i = 0; i < object.collectionIds.length; ++i) + message.collectionIds[i] = String(object.collectionIds[i]); + } + if (object.outputUriPrefix != null) + message.outputUriPrefix = String(object.outputUriPrefix); + return message; + }; - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - 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 plain object from an ExportDocumentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.ExportDocumentsRequest + * @static + * @param {google.firestore.admin.v1.ExportDocumentsRequest} message ExportDocumentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportDocumentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.collectionIds = []; + if (options.defaults) { + object.name = ""; + object.outputUriPrefix = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.collectionIds && message.collectionIds.length) { + object.collectionIds = []; + for (var j = 0; j < message.collectionIds.length; ++j) + object.collectionIds[j] = message.collectionIds[j]; + } + if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) + object.outputUriPrefix = message.outputUriPrefix; + return object; + }; - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; + /** + * Converts this ExportDocumentsRequest to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.ExportDocumentsRequest + * @instance + * @returns {Object.} JSON object + */ + ExportDocumentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; + /** + * Gets the default type url for ExportDocumentsRequest + * @function getTypeUrl + * @memberof google.firestore.admin.v1.ExportDocumentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.ExportDocumentsRequest"; + }; - /** - * UninterpretedOption positiveIntValue. - * @member {number|string} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + return ExportDocumentsRequest; + })(); - /** - * UninterpretedOption negativeIntValue. - * @member {number|string} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + v1.ImportDocumentsRequest = (function() { - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; + /** + * Properties of an ImportDocumentsRequest. + * @memberof google.firestore.admin.v1 + * @interface IImportDocumentsRequest + * @property {string|null} [name] ImportDocumentsRequest name + * @property {Array.|null} [collectionIds] ImportDocumentsRequest collectionIds + * @property {string|null} [inputUriPrefix] ImportDocumentsRequest inputUriPrefix + */ - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + /** + * Constructs a new ImportDocumentsRequest. + * @memberof google.firestore.admin.v1 + * @classdesc Represents an ImportDocumentsRequest. + * @implements IImportDocumentsRequest + * @constructor + * @param {google.firestore.admin.v1.IImportDocumentsRequest=} [properties] Properties to set + */ + function ImportDocumentsRequest(properties) { + this.collectionIds = []; + 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]]; + } - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; + /** + * ImportDocumentsRequest name. + * @member {string} name + * @memberof google.firestore.admin.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.name = ""; - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; + /** + * ImportDocumentsRequest collectionIds. + * @member {Array.} collectionIds + * @memberof google.firestore.admin.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.collectionIds = $util.emptyArray; - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; + /** + * ImportDocumentsRequest inputUriPrefix. + * @member {string} inputUriPrefix + * @memberof google.firestore.admin.v1.ImportDocumentsRequest + * @instance + */ + ImportDocumentsRequest.prototype.inputUriPrefix = ""; - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates an ImportDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.ImportDocumentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.ImportDocumentsRequest} ImportDocumentsRequest + */ + ImportDocumentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.ImportDocumentsRequest) + return object; + var message = new $root.google.firestore.admin.v1.ImportDocumentsRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.collectionIds) { + if (!Array.isArray(object.collectionIds)) + throw TypeError(".google.firestore.admin.v1.ImportDocumentsRequest.collectionIds: array expected"); + message.collectionIds = []; + for (var i = 0; i < object.collectionIds.length; ++i) + message.collectionIds[i] = String(object.collectionIds[i]); + } + if (object.inputUriPrefix != null) + message.inputUriPrefix = String(object.inputUriPrefix); + return message; + }; - UninterpretedOption.NamePart = (function() { + /** + * Creates a plain object from an ImportDocumentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.ImportDocumentsRequest + * @static + * @param {google.firestore.admin.v1.ImportDocumentsRequest} message ImportDocumentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportDocumentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.collectionIds = []; + if (options.defaults) { + object.name = ""; + object.inputUriPrefix = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.collectionIds && message.collectionIds.length) { + object.collectionIds = []; + for (var j = 0; j < message.collectionIds.length; ++j) + object.collectionIds[j] = message.collectionIds[j]; + } + if (message.inputUriPrefix != null && message.hasOwnProperty("inputUriPrefix")) + object.inputUriPrefix = message.inputUriPrefix; + return object; + }; - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ + /** + * Converts this ImportDocumentsRequest to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.ImportDocumentsRequest + * @instance + * @returns {Object.} JSON object + */ + ImportDocumentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(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]]; - } + /** + * Gets the default type url for ImportDocumentsRequest + * @function getTypeUrl + * @memberof google.firestore.admin.v1.ImportDocumentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.ImportDocumentsRequest"; + }; - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; + return ImportDocumentsRequest; + })(); - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; + v1.Index = (function() { - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; + /** + * Properties of an Index. + * @memberof google.firestore.admin.v1 + * @interface IIndex + * @property {string|null} [name] Index name + * @property {google.firestore.admin.v1.Index.QueryScope|null} [queryScope] Index queryScope + * @property {Array.|null} [fields] Index fields + * @property {google.firestore.admin.v1.Index.State|null} [state] Index state + */ - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; + /** + * Constructs a new Index. + * @memberof google.firestore.admin.v1 + * @classdesc Represents an Index. + * @implements IIndex + * @constructor + * @param {google.firestore.admin.v1.IIndex=} [properties] Properties to set + */ + function Index(properties) { + this.fields = []; + 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]]; } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Index name. + * @member {string} name + * @memberof google.firestore.admin.v1.Index + * @instance + */ + Index.prototype.name = ""; - return NamePart; - })(); + /** + * Index queryScope. + * @member {google.firestore.admin.v1.Index.QueryScope} queryScope + * @memberof google.firestore.admin.v1.Index + * @instance + */ + Index.prototype.queryScope = 0; + + /** + * Index fields. + * @member {Array.} fields + * @memberof google.firestore.admin.v1.Index + * @instance + */ + Index.prototype.fields = $util.emptyArray; + + /** + * Index state. + * @member {google.firestore.admin.v1.Index.State} state + * @memberof google.firestore.admin.v1.Index + * @instance + */ + Index.prototype.state = 0; + + /** + * Creates an Index message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.Index + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.Index} Index + */ + Index.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.Index) + return object; + var message = new $root.google.firestore.admin.v1.Index(); + if (object.name != null) + message.name = String(object.name); + switch (object.queryScope) { + default: + if (typeof object.queryScope === "number") { + message.queryScope = object.queryScope; + break; + } + break; + case "QUERY_SCOPE_UNSPECIFIED": + case 0: + message.queryScope = 0; + break; + case "COLLECTION": + case 1: + message.queryScope = 1; + break; + case "COLLECTION_GROUP": + case 2: + message.queryScope = 2; + break; + } + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.firestore.admin.v1.Index.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.firestore.admin.v1.Index.fields: object expected"); + message.fields[i] = $root.google.firestore.admin.v1.Index.IndexField.fromObject(object.fields[i]); + } + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "CREATING": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + case "NEEDS_REPAIR": + case 3: + message.state = 3; + break; + } + return message; + }; - return UninterpretedOption; - })(); + /** + * Creates a plain object from an Index message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.Index + * @static + * @param {google.firestore.admin.v1.Index} message Index + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Index.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fields = []; + if (options.defaults) { + object.name = ""; + object.queryScope = options.enums === String ? "QUERY_SCOPE_UNSPECIFIED" : 0; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.queryScope != null && message.hasOwnProperty("queryScope")) + object.queryScope = options.enums === String ? $root.google.firestore.admin.v1.Index.QueryScope[message.queryScope] === undefined ? message.queryScope : $root.google.firestore.admin.v1.Index.QueryScope[message.queryScope] : message.queryScope; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.firestore.admin.v1.Index.IndexField.toObject(message.fields[j], options); + } + 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; + return object; + }; - protobuf.SourceCodeInfo = (function() { + /** + * Converts this Index to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.Index + * @instance + * @returns {Object.} JSON object + */ + Index.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ + /** + * Gets the default type url for Index + * @function getTypeUrl + * @memberof google.firestore.admin.v1.Index + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Index.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.Index"; + }; - /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo - * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - */ - function SourceCodeInfo(properties) { - this.location = []; - 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]]; - } + /** + * QueryScope enum. + * @name google.firestore.admin.v1.Index.QueryScope + * @enum {string} + * @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 + */ + 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"; + return values; + })(); - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; + Index.IndexField = (function() { - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; + /** + * Properties of an IndexField. + * @memberof google.firestore.admin.v1.Index + * @interface IIndexField + * @property {string|null} [fieldPath] IndexField fieldPath + * @property {google.firestore.admin.v1.Index.IndexField.Order|null} [order] IndexField order + * @property {google.firestore.admin.v1.Index.IndexField.ArrayConfig|null} [arrayConfig] IndexField arrayConfig + */ - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; + /** + * Constructs a new IndexField. + * @memberof google.firestore.admin.v1.Index + * @classdesc Represents an IndexField. + * @implements IIndexField + * @constructor + * @param {google.firestore.admin.v1.Index.IIndexField=} [properties] Properties to set + */ + function IndexField(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]]; + } - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * IndexField fieldPath. + * @member {string} fieldPath + * @memberof google.firestore.admin.v1.Index.IndexField + * @instance + */ + IndexField.prototype.fieldPath = ""; - SourceCodeInfo.Location = (function() { + /** + * IndexField order. + * @member {google.firestore.admin.v1.Index.IndexField.Order|null|undefined} order + * @memberof google.firestore.admin.v1.Index.IndexField + * @instance + */ + IndexField.prototype.order = null; - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ + /** + * IndexField arrayConfig. + * @member {google.firestore.admin.v1.Index.IndexField.ArrayConfig|null|undefined} arrayConfig + * @memberof google.firestore.admin.v1.Index.IndexField + * @instance + */ + IndexField.prototype.arrayConfig = null; - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - 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]]; - } + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; + /** + * IndexField valueMode. + * @member {"order"|"arrayConfig"|undefined} valueMode + * @memberof google.firestore.admin.v1.Index.IndexField + * @instance + */ + Object.defineProperty(IndexField.prototype, "valueMode", { + get: $util.oneOfGetter($oneOfFields = ["order", "arrayConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; + /** + * Creates an IndexField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.Index.IndexField + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.Index.IndexField} IndexField + */ + IndexField.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.Index.IndexField) + return object; + var message = new $root.google.firestore.admin.v1.Index.IndexField(); + if (object.fieldPath != null) + message.fieldPath = String(object.fieldPath); + switch (object.order) { + default: + if (typeof object.order === "number") { + message.order = object.order; + break; + } + break; + case "ORDER_UNSPECIFIED": + case 0: + message.order = 0; + break; + case "ASCENDING": + case 1: + message.order = 1; + break; + case "DESCENDING": + case 2: + message.order = 2; + break; + } + switch (object.arrayConfig) { + default: + if (typeof object.arrayConfig === "number") { + message.arrayConfig = object.arrayConfig; + break; + } + break; + case "ARRAY_CONFIG_UNSPECIFIED": + case 0: + message.arrayConfig = 0; + break; + case "CONTAINS": + case 1: + message.arrayConfig = 1; + break; + } + return message; + }; - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; + /** + * Creates a plain object from an IndexField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.Index.IndexField + * @static + * @param {google.firestore.admin.v1.Index.IndexField} message IndexField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IndexField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fieldPath = ""; + if (message.fieldPath != null && message.hasOwnProperty("fieldPath")) + object.fieldPath = message.fieldPath; + if (message.order != null && message.hasOwnProperty("order")) { + object.order = options.enums === String ? $root.google.firestore.admin.v1.Index.IndexField.Order[message.order] === undefined ? message.order : $root.google.firestore.admin.v1.Index.IndexField.Order[message.order] : message.order; + if (options.oneofs) + object.valueMode = "order"; + } + if (message.arrayConfig != null && message.hasOwnProperty("arrayConfig")) { + object.arrayConfig = options.enums === String ? $root.google.firestore.admin.v1.Index.IndexField.ArrayConfig[message.arrayConfig] === undefined ? message.arrayConfig : $root.google.firestore.admin.v1.Index.IndexField.ArrayConfig[message.arrayConfig] : message.arrayConfig; + if (options.oneofs) + object.valueMode = "arrayConfig"; + } + return object; + }; - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; + /** + * Converts this IndexField to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.Index.IndexField + * @instance + * @returns {Object.} JSON object + */ + IndexField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; + /** + * Gets the default type url for IndexField + * @function getTypeUrl + * @memberof google.firestore.admin.v1.Index.IndexField + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IndexField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.Index.IndexField"; + }; - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; + /** + * Order enum. + * @name google.firestore.admin.v1.Index.IndexField.Order + * @enum {string} + * @property {string} ORDER_UNSPECIFIED=ORDER_UNSPECIFIED ORDER_UNSPECIFIED value + * @property {string} ASCENDING=ASCENDING ASCENDING value + * @property {string} DESCENDING=DESCENDING DESCENDING value + */ + IndexField.Order = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ORDER_UNSPECIFIED"] = "ORDER_UNSPECIFIED"; + values[valuesById[1] = "ASCENDING"] = "ASCENDING"; + values[valuesById[2] = "DESCENDING"] = "DESCENDING"; + return values; + })(); - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; + /** + * ArrayConfig enum. + * @name google.firestore.admin.v1.Index.IndexField.ArrayConfig + * @enum {string} + * @property {string} ARRAY_CONFIG_UNSPECIFIED=ARRAY_CONFIG_UNSPECIFIED ARRAY_CONFIG_UNSPECIFIED value + * @property {string} CONTAINS=CONTAINS CONTAINS value + */ + IndexField.ArrayConfig = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ARRAY_CONFIG_UNSPECIFIED"] = "ARRAY_CONFIG_UNSPECIFIED"; + values[valuesById[1] = "CONTAINS"] = "CONTAINS"; + return values; + })(); - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return IndexField; + })(); + + /** + * State enum. + * @name google.firestore.admin.v1.Index.State + * @enum {string} + * @property {string} STATE_UNSPECIFIED=STATE_UNSPECIFIED STATE_UNSPECIFIED value + * @property {string} CREATING=CREATING CREATING value + * @property {string} READY=READY READY value + * @property {string} NEEDS_REPAIR=NEEDS_REPAIR NEEDS_REPAIR value + */ + Index.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED"; + values[valuesById[1] = "CREATING"] = "CREATING"; + values[valuesById[2] = "READY"] = "READY"; + values[valuesById[3] = "NEEDS_REPAIR"] = "NEEDS_REPAIR"; + return values; + })(); - return Location; - })(); + return Index; + })(); - return SourceCodeInfo; - })(); + v1.LocationMetadata = (function() { - protobuf.GeneratedCodeInfo = (function() { + /** + * Properties of a LocationMetadata. + * @memberof google.firestore.admin.v1 + * @interface ILocationMetadata + */ - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ + /** + * Constructs a new LocationMetadata. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a LocationMetadata. + * @implements ILocationMetadata + * @constructor + * @param {google.firestore.admin.v1.ILocationMetadata=} [properties] Properties to set + */ + function LocationMetadata(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]]; + } - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - 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 LocationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.LocationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.LocationMetadata} LocationMetadata + */ + LocationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.LocationMetadata) + return object; + return new $root.google.firestore.admin.v1.LocationMetadata(); + }; - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + /** + * Creates a plain object from a LocationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.LocationMetadata + * @static + * @param {google.firestore.admin.v1.LocationMetadata} message LocationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocationMetadata.toObject = function toObject() { + return {}; + }; - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; + /** + * Converts this LocationMetadata to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.LocationMetadata + * @instance + * @returns {Object.} JSON object + */ + LocationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; + /** + * Gets the default type url for LocationMetadata + * @function getTypeUrl + * @memberof google.firestore.admin.v1.LocationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.LocationMetadata"; + }; - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return LocationMetadata; + })(); - GeneratedCodeInfo.Annotation = (function() { + v1.IndexOperationMetadata = (function() { - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - */ + /** + * Properties of an IndexOperationMetadata. + * @memberof google.firestore.admin.v1 + * @interface IIndexOperationMetadata + * @property {google.protobuf.ITimestamp|null} [startTime] IndexOperationMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] IndexOperationMetadata endTime + * @property {string|null} [index] IndexOperationMetadata index + * @property {google.firestore.admin.v1.OperationState|null} [state] IndexOperationMetadata state + * @property {google.firestore.admin.v1.IProgress|null} [progressDocuments] IndexOperationMetadata progressDocuments + * @property {google.firestore.admin.v1.IProgress|null} [progressBytes] IndexOperationMetadata progressBytes + */ - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - 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]]; - } + /** + * Constructs a new IndexOperationMetadata. + * @memberof google.firestore.admin.v1 + * @classdesc Represents an IndexOperationMetadata. + * @implements IIndexOperationMetadata + * @constructor + * @param {google.firestore.admin.v1.IIndexOperationMetadata=} [properties] Properties to set + */ + function IndexOperationMetadata(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]]; + } - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; + /** + * IndexOperationMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.firestore.admin.v1.IndexOperationMetadata + * @instance + */ + IndexOperationMetadata.prototype.startTime = null; - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; + /** + * IndexOperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.firestore.admin.v1.IndexOperationMetadata + * @instance + */ + IndexOperationMetadata.prototype.endTime = null; - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; + /** + * IndexOperationMetadata index. + * @member {string} index + * @memberof google.firestore.admin.v1.IndexOperationMetadata + * @instance + */ + IndexOperationMetadata.prototype.index = ""; + + /** + * IndexOperationMetadata state. + * @member {google.firestore.admin.v1.OperationState} state + * @memberof google.firestore.admin.v1.IndexOperationMetadata + * @instance + */ + IndexOperationMetadata.prototype.state = 0; - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; + /** + * IndexOperationMetadata progressDocuments. + * @member {google.firestore.admin.v1.IProgress|null|undefined} progressDocuments + * @memberof google.firestore.admin.v1.IndexOperationMetadata + * @instance + */ + IndexOperationMetadata.prototype.progressDocuments = null; - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; + /** + * IndexOperationMetadata progressBytes. + * @member {google.firestore.admin.v1.IProgress|null|undefined} progressBytes + * @memberof google.firestore.admin.v1.IndexOperationMetadata + * @instance + */ + IndexOperationMetadata.prototype.progressBytes = null; - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; + /** + * Creates an IndexOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.IndexOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.IndexOperationMetadata} IndexOperationMetadata + */ + IndexOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.IndexOperationMetadata) + return object; + var message = new $root.google.firestore.admin.v1.IndexOperationMetadata(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.firestore.admin.v1.IndexOperationMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.firestore.admin.v1.IndexOperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.index != null) + message.index = String(object.index); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "OPERATION_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "INITIALIZING": + case 1: + message.state = 1; + break; + case "PROCESSING": + case 2: + message.state = 2; + break; + case "CANCELLING": + case 3: + message.state = 3; + break; + case "FINALIZING": + case 4: + message.state = 4; + break; + case "SUCCESSFUL": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + case "CANCELLED": + case 7: + message.state = 7; + break; + } + if (object.progressDocuments != null) { + if (typeof object.progressDocuments !== "object") + throw TypeError(".google.firestore.admin.v1.IndexOperationMetadata.progressDocuments: object expected"); + message.progressDocuments = $root.google.firestore.admin.v1.Progress.fromObject(object.progressDocuments); + } + if (object.progressBytes != null) { + if (typeof object.progressBytes !== "object") + throw TypeError(".google.firestore.admin.v1.IndexOperationMetadata.progressBytes: object expected"); + message.progressBytes = $root.google.firestore.admin.v1.Progress.fromObject(object.progressBytes); + } + return message; + }; - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an IndexOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.IndexOperationMetadata + * @static + * @param {google.firestore.admin.v1.IndexOperationMetadata} message IndexOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IndexOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + object.index = ""; + object.state = options.enums === String ? "OPERATION_STATE_UNSPECIFIED" : 0; + object.progressDocuments = null; + object.progressBytes = null; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.firestore.admin.v1.OperationState[message.state] === undefined ? message.state : $root.google.firestore.admin.v1.OperationState[message.state] : message.state; + if (message.progressDocuments != null && message.hasOwnProperty("progressDocuments")) + object.progressDocuments = $root.google.firestore.admin.v1.Progress.toObject(message.progressDocuments, options); + if (message.progressBytes != null && message.hasOwnProperty("progressBytes")) + object.progressBytes = $root.google.firestore.admin.v1.Progress.toObject(message.progressBytes, options); + return object; + }; - return Annotation; - })(); + /** + * Converts this IndexOperationMetadata to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.IndexOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + IndexOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return GeneratedCodeInfo; - })(); + /** + * Gets the default type url for IndexOperationMetadata + * @function getTypeUrl + * @memberof google.firestore.admin.v1.IndexOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IndexOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.IndexOperationMetadata"; + }; - protobuf.Empty = (function() { + return IndexOperationMetadata; + })(); - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ + v1.FieldOperationMetadata = (function() { - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(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]]; - } + /** + * Properties of a FieldOperationMetadata. + * @memberof google.firestore.admin.v1 + * @interface IFieldOperationMetadata + * @property {google.protobuf.ITimestamp|null} [startTime] FieldOperationMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] FieldOperationMetadata endTime + * @property {string|null} [field] FieldOperationMetadata field + * @property {Array.|null} [indexConfigDeltas] FieldOperationMetadata indexConfigDeltas + * @property {google.firestore.admin.v1.OperationState|null} [state] FieldOperationMetadata state + * @property {google.firestore.admin.v1.IProgress|null} [progressDocuments] FieldOperationMetadata progressDocuments + * @property {google.firestore.admin.v1.IProgress|null} [progressBytes] FieldOperationMetadata progressBytes + * @property {google.firestore.admin.v1.FieldOperationMetadata.ITtlConfigDelta|null} [ttlConfigDelta] FieldOperationMetadata ttlConfigDelta + */ - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; + /** + * Constructs a new FieldOperationMetadata. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a FieldOperationMetadata. + * @implements IFieldOperationMetadata + * @constructor + * @param {google.firestore.admin.v1.IFieldOperationMetadata=} [properties] Properties to set + */ + function FieldOperationMetadata(properties) { + this.indexConfigDeltas = []; + 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 plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; + /** + * FieldOperationMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.firestore.admin.v1.FieldOperationMetadata + * @instance + */ + FieldOperationMetadata.prototype.startTime = null; - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * FieldOperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.firestore.admin.v1.FieldOperationMetadata + * @instance + */ + FieldOperationMetadata.prototype.endTime = null; - return Empty; - })(); + /** + * FieldOperationMetadata field. + * @member {string} field + * @memberof google.firestore.admin.v1.FieldOperationMetadata + * @instance + */ + FieldOperationMetadata.prototype.field = ""; - protobuf.FieldMask = (function() { + /** + * FieldOperationMetadata indexConfigDeltas. + * @member {Array.} indexConfigDeltas + * @memberof google.firestore.admin.v1.FieldOperationMetadata + * @instance + */ + FieldOperationMetadata.prototype.indexConfigDeltas = $util.emptyArray; - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ + /** + * FieldOperationMetadata state. + * @member {google.firestore.admin.v1.OperationState} state + * @memberof google.firestore.admin.v1.FieldOperationMetadata + * @instance + */ + FieldOperationMetadata.prototype.state = 0; - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - */ - function FieldMask(properties) { - this.paths = []; - 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]]; - } + /** + * FieldOperationMetadata progressDocuments. + * @member {google.firestore.admin.v1.IProgress|null|undefined} progressDocuments + * @memberof google.firestore.admin.v1.FieldOperationMetadata + * @instance + */ + FieldOperationMetadata.prototype.progressDocuments = null; - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; + /** + * FieldOperationMetadata progressBytes. + * @member {google.firestore.admin.v1.IProgress|null|undefined} progressBytes + * @memberof google.firestore.admin.v1.FieldOperationMetadata + * @instance + */ + FieldOperationMetadata.prototype.progressBytes = null; - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; + /** + * FieldOperationMetadata ttlConfigDelta. + * @member {google.firestore.admin.v1.FieldOperationMetadata.ITtlConfigDelta|null|undefined} ttlConfigDelta + * @memberof google.firestore.admin.v1.FieldOperationMetadata + * @instance + */ + FieldOperationMetadata.prototype.ttlConfigDelta = null; - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.FieldMask} message FieldMask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; + /** + * Creates a FieldOperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.FieldOperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.FieldOperationMetadata} FieldOperationMetadata + */ + FieldOperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.FieldOperationMetadata) + return object; + var message = new $root.google.firestore.admin.v1.FieldOperationMetadata(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.field != null) + message.field = String(object.field); + if (object.indexConfigDeltas) { + if (!Array.isArray(object.indexConfigDeltas)) + throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.indexConfigDeltas: array expected"); + message.indexConfigDeltas = []; + for (var i = 0; i < object.indexConfigDeltas.length; ++i) { + if (typeof object.indexConfigDeltas[i] !== "object") + throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.indexConfigDeltas: object expected"); + message.indexConfigDeltas[i] = $root.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.fromObject(object.indexConfigDeltas[i]); + } + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "OPERATION_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "INITIALIZING": + case 1: + message.state = 1; + break; + case "PROCESSING": + case 2: + message.state = 2; + break; + case "CANCELLING": + case 3: + message.state = 3; + break; + case "FINALIZING": + case 4: + message.state = 4; + break; + case "SUCCESSFUL": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + case "CANCELLED": + case 7: + message.state = 7; + break; + } + if (object.progressDocuments != null) { + if (typeof object.progressDocuments !== "object") + throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.progressDocuments: object expected"); + message.progressDocuments = $root.google.firestore.admin.v1.Progress.fromObject(object.progressDocuments); + } + if (object.progressBytes != null) { + if (typeof object.progressBytes !== "object") + throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.progressBytes: object expected"); + message.progressBytes = $root.google.firestore.admin.v1.Progress.fromObject(object.progressBytes); + } + if (object.ttlConfigDelta != null) { + if (typeof object.ttlConfigDelta !== "object") + throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.ttlConfigDelta: object expected"); + message.ttlConfigDelta = $root.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.fromObject(object.ttlConfigDelta); + } + return message; + }; - /** - * Converts this FieldMask to JSON. - * @function toJSON - * @memberof google.protobuf.FieldMask - * @instance - * @returns {Object.} JSON object - */ - FieldMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a FieldOperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.FieldOperationMetadata + * @static + * @param {google.firestore.admin.v1.FieldOperationMetadata} message FieldOperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.indexConfigDeltas = []; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + object.field = ""; + object.state = options.enums === String ? "OPERATION_STATE_UNSPECIFIED" : 0; + object.progressDocuments = null; + object.progressBytes = null; + object.ttlConfigDelta = null; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.indexConfigDeltas && message.indexConfigDeltas.length) { + object.indexConfigDeltas = []; + for (var j = 0; j < message.indexConfigDeltas.length; ++j) + object.indexConfigDeltas[j] = $root.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.toObject(message.indexConfigDeltas[j], options); + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.firestore.admin.v1.OperationState[message.state] === undefined ? message.state : $root.google.firestore.admin.v1.OperationState[message.state] : message.state; + if (message.progressDocuments != null && message.hasOwnProperty("progressDocuments")) + object.progressDocuments = $root.google.firestore.admin.v1.Progress.toObject(message.progressDocuments, options); + if (message.progressBytes != null && message.hasOwnProperty("progressBytes")) + object.progressBytes = $root.google.firestore.admin.v1.Progress.toObject(message.progressBytes, options); + if (message.ttlConfigDelta != null && message.hasOwnProperty("ttlConfigDelta")) + object.ttlConfigDelta = $root.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.toObject(message.ttlConfigDelta, options); + return object; + }; - return FieldMask; - })(); + /** + * Converts this FieldOperationMetadata to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.FieldOperationMetadata + * @instance + * @returns {Object.} JSON object + */ + FieldOperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - protobuf.Timestamp = (function() { + /** + * Gets the default type url for FieldOperationMetadata + * @function getTypeUrl + * @memberof google.firestore.admin.v1.FieldOperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.FieldOperationMetadata"; + }; - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|string|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ + FieldOperationMetadata.IndexConfigDelta = (function() { - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(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]]; - } + /** + * Properties of an IndexConfigDelta. + * @memberof google.firestore.admin.v1.FieldOperationMetadata + * @interface IIndexConfigDelta + * @property {google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType|null} [changeType] IndexConfigDelta changeType + * @property {google.firestore.admin.v1.IIndex|null} [index] IndexConfigDelta index + */ - /** - * Timestamp seconds. - * @member {number|string} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** + * Constructs a new IndexConfigDelta. + * @memberof google.firestore.admin.v1.FieldOperationMetadata + * @classdesc Represents an IndexConfigDelta. + * @implements IIndexConfigDelta + * @constructor + * @param {google.firestore.admin.v1.FieldOperationMetadata.IIndexConfigDelta=} [properties] Properties to set + */ + function IndexConfigDelta(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]]; + } - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; + /** + * IndexConfigDelta changeType. + * @member {google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType} changeType + * @memberof google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + * @instance + */ + IndexConfigDelta.prototype.changeType = 0; - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; + /** + * IndexConfigDelta index. + * @member {google.firestore.admin.v1.IIndex|null|undefined} index + * @memberof google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + * @instance + */ + IndexConfigDelta.prototype.index = null; - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; + /** + * Creates an IndexConfigDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta} IndexConfigDelta + */ + IndexConfigDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta) + return object; + var message = new $root.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta(); + switch (object.changeType) { + default: + if (typeof object.changeType === "number") { + message.changeType = object.changeType; + break; + } + break; + case "CHANGE_TYPE_UNSPECIFIED": + case 0: + message.changeType = 0; + break; + case "ADD": + case 1: + message.changeType = 1; + break; + case "REMOVE": + case 2: + message.changeType = 2; + break; + } + if (object.index != null) { + if (typeof object.index !== "object") + throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.index: object expected"); + message.index = $root.google.firestore.admin.v1.Index.fromObject(object.index); + } + return message; + }; + + /** + * Creates a plain object from an IndexConfigDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + * @static + * @param {google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta} message IndexConfigDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IndexConfigDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.changeType = options.enums === String ? "CHANGE_TYPE_UNSPECIFIED" : 0; + object.index = null; + } + if (message.changeType != null && message.hasOwnProperty("changeType")) + object.changeType = options.enums === String ? $root.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType[message.changeType] === undefined ? message.changeType : $root.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType[message.changeType] : message.changeType; + if (message.index != null && message.hasOwnProperty("index")) + object.index = $root.google.firestore.admin.v1.Index.toObject(message.index, options); + return object; + }; - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this IndexConfigDelta to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + * @instance + * @returns {Object.} JSON object + */ + IndexConfigDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Timestamp; - })(); + /** + * Gets the default type url for IndexConfigDelta + * @function getTypeUrl + * @memberof google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IndexConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta"; + }; - protobuf.Any = (function() { + /** + * ChangeType enum. + * @name google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType + * @enum {string} + * @property {string} CHANGE_TYPE_UNSPECIFIED=CHANGE_TYPE_UNSPECIFIED CHANGE_TYPE_UNSPECIFIED value + * @property {string} ADD=ADD ADD value + * @property {string} REMOVE=REMOVE REMOVE value + */ + IndexConfigDelta.ChangeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CHANGE_TYPE_UNSPECIFIED"] = "CHANGE_TYPE_UNSPECIFIED"; + values[valuesById[1] = "ADD"] = "ADD"; + values[valuesById[2] = "REMOVE"] = "REMOVE"; + return values; + })(); - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ + return IndexConfigDelta; + })(); - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(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]]; - } + FieldOperationMetadata.TtlConfigDelta = (function() { - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; + /** + * Properties of a TtlConfigDelta. + * @memberof google.firestore.admin.v1.FieldOperationMetadata + * @interface ITtlConfigDelta + * @property {google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType|null} [changeType] TtlConfigDelta changeType + */ - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); + /** + * Constructs a new TtlConfigDelta. + * @memberof google.firestore.admin.v1.FieldOperationMetadata + * @classdesc Represents a TtlConfigDelta. + * @implements ITtlConfigDelta + * @constructor + * @param {google.firestore.admin.v1.FieldOperationMetadata.ITtlConfigDelta=} [properties] Properties to set + */ + function TtlConfigDelta(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 an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - return message; - }; + /** + * TtlConfigDelta changeType. + * @member {google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType} changeType + * @memberof google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta + * @instance + */ + TtlConfigDelta.prototype.changeType = 0; - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; + /** + * Creates a TtlConfigDelta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta} TtlConfigDelta + */ + TtlConfigDelta.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta) + return object; + var message = new $root.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta(); + switch (object.changeType) { + default: + if (typeof object.changeType === "number") { + message.changeType = object.changeType; + break; + } + break; + case "CHANGE_TYPE_UNSPECIFIED": + case 0: + message.changeType = 0; + break; + case "ADD": + case 1: + message.changeType = 1; + break; + case "REMOVE": + case 2: + message.changeType = 2; + break; + } + return message; + }; - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a TtlConfigDelta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta + * @static + * @param {google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta} message TtlConfigDelta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TtlConfigDelta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.changeType = options.enums === String ? "CHANGE_TYPE_UNSPECIFIED" : 0; + if (message.changeType != null && message.hasOwnProperty("changeType")) + object.changeType = options.enums === String ? $root.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType[message.changeType] === undefined ? message.changeType : $root.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType[message.changeType] : message.changeType; + return object; + }; - return Any; - })(); + /** + * Converts this TtlConfigDelta to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta + * @instance + * @returns {Object.} JSON object + */ + TtlConfigDelta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TtlConfigDelta + * @function getTypeUrl + * @memberof google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TtlConfigDelta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta"; + }; + + /** + * ChangeType enum. + * @name google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType + * @enum {string} + * @property {string} CHANGE_TYPE_UNSPECIFIED=CHANGE_TYPE_UNSPECIFIED CHANGE_TYPE_UNSPECIFIED value + * @property {string} ADD=ADD ADD value + * @property {string} REMOVE=REMOVE REMOVE value + */ + TtlConfigDelta.ChangeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CHANGE_TYPE_UNSPECIFIED"] = "CHANGE_TYPE_UNSPECIFIED"; + values[valuesById[1] = "ADD"] = "ADD"; + values[valuesById[2] = "REMOVE"] = "REMOVE"; + return values; + })(); - protobuf.Struct = (function() { + return TtlConfigDelta; + })(); - /** - * Properties of a Struct. - * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields - */ + return FieldOperationMetadata; + })(); - /** - * Constructs a new Struct. - * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct - * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set - */ - function Struct(properties) { - this.fields = {}; - 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]]; - } + v1.ExportDocumentsMetadata = (function() { - /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct - * @instance - */ - Struct.prototype.fields = $util.emptyObject; + /** + * Properties of an ExportDocumentsMetadata. + * @memberof google.firestore.admin.v1 + * @interface IExportDocumentsMetadata + * @property {google.protobuf.ITimestamp|null} [startTime] ExportDocumentsMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] ExportDocumentsMetadata endTime + * @property {google.firestore.admin.v1.OperationState|null} [operationState] ExportDocumentsMetadata operationState + * @property {google.firestore.admin.v1.IProgress|null} [progressDocuments] ExportDocumentsMetadata progressDocuments + * @property {google.firestore.admin.v1.IProgress|null} [progressBytes] ExportDocumentsMetadata progressBytes + * @property {Array.|null} [collectionIds] ExportDocumentsMetadata collectionIds + * @property {string|null} [outputUriPrefix] ExportDocumentsMetadata outputUriPrefix + */ - /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Struct - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct - */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) - return object; - var message = new $root.google.protobuf.Struct(); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); + /** + * Constructs a new ExportDocumentsMetadata. + * @memberof google.firestore.admin.v1 + * @classdesc Represents an ExportDocumentsMetadata. + * @implements IExportDocumentsMetadata + * @constructor + * @param {google.firestore.admin.v1.IExportDocumentsMetadata=} [properties] Properties to set + */ + function ExportDocumentsMetadata(properties) { + this.collectionIds = []; + 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]]; } - } - return message; - }; - - /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.Struct} message Struct - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Struct.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); - } - return object; - }; - - /** - * Converts this Struct to JSON. - * @function toJSON - * @memberof google.protobuf.Struct - * @instance - * @returns {Object.} JSON object - */ - Struct.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - return Struct; - })(); + /** + * ExportDocumentsMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.firestore.admin.v1.ExportDocumentsMetadata + * @instance + */ + ExportDocumentsMetadata.prototype.startTime = null; - protobuf.Value = (function() { + /** + * ExportDocumentsMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.firestore.admin.v1.ExportDocumentsMetadata + * @instance + */ + ExportDocumentsMetadata.prototype.endTime = null; - /** - * Properties of a Value. - * @memberof google.protobuf - * @interface IValue - * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue - * @property {number|null} [numberValue] Value numberValue - * @property {string|null} [stringValue] Value stringValue - * @property {boolean|null} [boolValue] Value boolValue - * @property {google.protobuf.IStruct|null} [structValue] Value structValue - * @property {google.protobuf.IListValue|null} [listValue] Value listValue - */ + /** + * ExportDocumentsMetadata operationState. + * @member {google.firestore.admin.v1.OperationState} operationState + * @memberof google.firestore.admin.v1.ExportDocumentsMetadata + * @instance + */ + ExportDocumentsMetadata.prototype.operationState = 0; - /** - * Constructs a new Value. - * @memberof google.protobuf - * @classdesc Represents a Value. - * @implements IValue - * @constructor - * @param {google.protobuf.IValue=} [properties] Properties to set - */ - function Value(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]]; - } + /** + * ExportDocumentsMetadata progressDocuments. + * @member {google.firestore.admin.v1.IProgress|null|undefined} progressDocuments + * @memberof google.firestore.admin.v1.ExportDocumentsMetadata + * @instance + */ + ExportDocumentsMetadata.prototype.progressDocuments = null; - /** - * Value nullValue. - * @member {google.protobuf.NullValue|null|undefined} nullValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.nullValue = null; + /** + * ExportDocumentsMetadata progressBytes. + * @member {google.firestore.admin.v1.IProgress|null|undefined} progressBytes + * @memberof google.firestore.admin.v1.ExportDocumentsMetadata + * @instance + */ + ExportDocumentsMetadata.prototype.progressBytes = null; - /** - * Value numberValue. - * @member {number|null|undefined} numberValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.numberValue = null; + /** + * ExportDocumentsMetadata collectionIds. + * @member {Array.} collectionIds + * @memberof google.firestore.admin.v1.ExportDocumentsMetadata + * @instance + */ + ExportDocumentsMetadata.prototype.collectionIds = $util.emptyArray; - /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.stringValue = null; + /** + * ExportDocumentsMetadata outputUriPrefix. + * @member {string} outputUriPrefix + * @memberof google.firestore.admin.v1.ExportDocumentsMetadata + * @instance + */ + ExportDocumentsMetadata.prototype.outputUriPrefix = ""; - /** - * Value boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.boolValue = null; + /** + * Creates an ExportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.ExportDocumentsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.ExportDocumentsMetadata} ExportDocumentsMetadata + */ + ExportDocumentsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.ExportDocumentsMetadata) + return object; + var message = new $root.google.firestore.admin.v1.ExportDocumentsMetadata(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.operationState) { + default: + if (typeof object.operationState === "number") { + message.operationState = object.operationState; + break; + } + break; + case "OPERATION_STATE_UNSPECIFIED": + case 0: + message.operationState = 0; + break; + case "INITIALIZING": + case 1: + message.operationState = 1; + break; + case "PROCESSING": + case 2: + message.operationState = 2; + break; + case "CANCELLING": + case 3: + message.operationState = 3; + break; + case "FINALIZING": + case 4: + message.operationState = 4; + break; + case "SUCCESSFUL": + case 5: + message.operationState = 5; + break; + case "FAILED": + case 6: + message.operationState = 6; + break; + case "CANCELLED": + case 7: + message.operationState = 7; + break; + } + if (object.progressDocuments != null) { + if (typeof object.progressDocuments !== "object") + throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.progressDocuments: object expected"); + message.progressDocuments = $root.google.firestore.admin.v1.Progress.fromObject(object.progressDocuments); + } + if (object.progressBytes != null) { + if (typeof object.progressBytes !== "object") + throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.progressBytes: object expected"); + message.progressBytes = $root.google.firestore.admin.v1.Progress.fromObject(object.progressBytes); + } + if (object.collectionIds) { + if (!Array.isArray(object.collectionIds)) + throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.collectionIds: array expected"); + message.collectionIds = []; + for (var i = 0; i < object.collectionIds.length; ++i) + message.collectionIds[i] = String(object.collectionIds[i]); + } + if (object.outputUriPrefix != null) + message.outputUriPrefix = String(object.outputUriPrefix); + return message; + }; - /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.structValue = null; + /** + * Creates a plain object from an ExportDocumentsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.ExportDocumentsMetadata + * @static + * @param {google.firestore.admin.v1.ExportDocumentsMetadata} message ExportDocumentsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportDocumentsMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.collectionIds = []; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + object.operationState = options.enums === String ? "OPERATION_STATE_UNSPECIFIED" : 0; + object.progressDocuments = null; + object.progressBytes = null; + object.outputUriPrefix = ""; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.operationState != null && message.hasOwnProperty("operationState")) + object.operationState = options.enums === String ? $root.google.firestore.admin.v1.OperationState[message.operationState] === undefined ? message.operationState : $root.google.firestore.admin.v1.OperationState[message.operationState] : message.operationState; + if (message.progressDocuments != null && message.hasOwnProperty("progressDocuments")) + object.progressDocuments = $root.google.firestore.admin.v1.Progress.toObject(message.progressDocuments, options); + if (message.progressBytes != null && message.hasOwnProperty("progressBytes")) + object.progressBytes = $root.google.firestore.admin.v1.Progress.toObject(message.progressBytes, options); + if (message.collectionIds && message.collectionIds.length) { + object.collectionIds = []; + for (var j = 0; j < message.collectionIds.length; ++j) + object.collectionIds[j] = message.collectionIds[j]; + } + if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) + object.outputUriPrefix = message.outputUriPrefix; + return object; + }; - /** - * Value listValue. - * @member {google.protobuf.IListValue|null|undefined} listValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.listValue = null; + /** + * Converts this ExportDocumentsMetadata to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.ExportDocumentsMetadata + * @instance + * @returns {Object.} JSON object + */ + ExportDocumentsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Gets the default type url for ExportDocumentsMetadata + * @function getTypeUrl + * @memberof google.firestore.admin.v1.ExportDocumentsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportDocumentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.ExportDocumentsMetadata"; + }; - /** - * Value kind. - * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind - * @memberof google.protobuf.Value - * @instance - */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + return ExportDocumentsMetadata; + })(); - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Value} Value - */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Value) - return object; - var message = new $root.google.protobuf.Value(); - switch (object.nullValue) { - case "NULL_VALUE": - case 0: - message.nullValue = 0; - break; - } - if (object.numberValue != null) - message.numberValue = Number(object.numberValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.structValue != null) { - if (typeof object.structValue !== "object") - throw TypeError(".google.protobuf.Value.structValue: object expected"); - message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); - } - if (object.listValue != null) { - if (typeof object.listValue !== "object") - throw TypeError(".google.protobuf.Value.listValue: object expected"); - message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); - } - return message; - }; + v1.ImportDocumentsMetadata = (function() { - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.Value} message Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; - if (options.oneofs) - object.kind = "nullValue"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.kind = "numberValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); - if (options.oneofs) - object.kind = "structValue"; - } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); - if (options.oneofs) - object.kind = "listValue"; - } - return object; - }; + /** + * Properties of an ImportDocumentsMetadata. + * @memberof google.firestore.admin.v1 + * @interface IImportDocumentsMetadata + * @property {google.protobuf.ITimestamp|null} [startTime] ImportDocumentsMetadata startTime + * @property {google.protobuf.ITimestamp|null} [endTime] ImportDocumentsMetadata endTime + * @property {google.firestore.admin.v1.OperationState|null} [operationState] ImportDocumentsMetadata operationState + * @property {google.firestore.admin.v1.IProgress|null} [progressDocuments] ImportDocumentsMetadata progressDocuments + * @property {google.firestore.admin.v1.IProgress|null} [progressBytes] ImportDocumentsMetadata progressBytes + * @property {Array.|null} [collectionIds] ImportDocumentsMetadata collectionIds + * @property {string|null} [inputUriPrefix] ImportDocumentsMetadata inputUriPrefix + */ - /** - * Converts this Value to JSON. - * @function toJSON - * @memberof google.protobuf.Value - * @instance - * @returns {Object.} JSON object - */ - Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Constructs a new ImportDocumentsMetadata. + * @memberof google.firestore.admin.v1 + * @classdesc Represents an ImportDocumentsMetadata. + * @implements IImportDocumentsMetadata + * @constructor + * @param {google.firestore.admin.v1.IImportDocumentsMetadata=} [properties] Properties to set + */ + function ImportDocumentsMetadata(properties) { + this.collectionIds = []; + 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]]; + } - return Value; - })(); + /** + * ImportDocumentsMetadata startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.firestore.admin.v1.ImportDocumentsMetadata + * @instance + */ + ImportDocumentsMetadata.prototype.startTime = null; - /** - * NullValue enum. - * @name google.protobuf.NullValue - * @enum {string} - * @property {string} NULL_VALUE=NULL_VALUE NULL_VALUE value - */ - protobuf.NullValue = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_VALUE"] = "NULL_VALUE"; - return values; - })(); + /** + * ImportDocumentsMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.firestore.admin.v1.ImportDocumentsMetadata + * @instance + */ + ImportDocumentsMetadata.prototype.endTime = null; - protobuf.ListValue = (function() { + /** + * ImportDocumentsMetadata operationState. + * @member {google.firestore.admin.v1.OperationState} operationState + * @memberof google.firestore.admin.v1.ImportDocumentsMetadata + * @instance + */ + ImportDocumentsMetadata.prototype.operationState = 0; - /** - * Properties of a ListValue. - * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values - */ + /** + * ImportDocumentsMetadata progressDocuments. + * @member {google.firestore.admin.v1.IProgress|null|undefined} progressDocuments + * @memberof google.firestore.admin.v1.ImportDocumentsMetadata + * @instance + */ + ImportDocumentsMetadata.prototype.progressDocuments = null; - /** - * Constructs a new ListValue. - * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue - * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set - */ - function ListValue(properties) { - this.values = []; - 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]]; - } + /** + * ImportDocumentsMetadata progressBytes. + * @member {google.firestore.admin.v1.IProgress|null|undefined} progressBytes + * @memberof google.firestore.admin.v1.ImportDocumentsMetadata + * @instance + */ + ImportDocumentsMetadata.prototype.progressBytes = null; - /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue - * @instance - */ - ListValue.prototype.values = $util.emptyArray; + /** + * ImportDocumentsMetadata collectionIds. + * @member {Array.} collectionIds + * @memberof google.firestore.admin.v1.ImportDocumentsMetadata + * @instance + */ + ImportDocumentsMetadata.prototype.collectionIds = $util.emptyArray; - /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ListValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue - */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) - return object; - var message = new $root.google.protobuf.ListValue(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.protobuf.ListValue.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.protobuf.ListValue.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); - } - } - return message; - }; + /** + * ImportDocumentsMetadata inputUriPrefix. + * @member {string} inputUriPrefix + * @memberof google.firestore.admin.v1.ImportDocumentsMetadata + * @instance + */ + ImportDocumentsMetadata.prototype.inputUriPrefix = ""; - /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.ListValue} message ListValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); - } - return object; - }; + /** + * Creates an ImportDocumentsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.ImportDocumentsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.ImportDocumentsMetadata} ImportDocumentsMetadata + */ + ImportDocumentsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.ImportDocumentsMetadata) + return object; + var message = new $root.google.firestore.admin.v1.ImportDocumentsMetadata(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + switch (object.operationState) { + default: + if (typeof object.operationState === "number") { + message.operationState = object.operationState; + break; + } + break; + case "OPERATION_STATE_UNSPECIFIED": + case 0: + message.operationState = 0; + break; + case "INITIALIZING": + case 1: + message.operationState = 1; + break; + case "PROCESSING": + case 2: + message.operationState = 2; + break; + case "CANCELLING": + case 3: + message.operationState = 3; + break; + case "FINALIZING": + case 4: + message.operationState = 4; + break; + case "SUCCESSFUL": + case 5: + message.operationState = 5; + break; + case "FAILED": + case 6: + message.operationState = 6; + break; + case "CANCELLED": + case 7: + message.operationState = 7; + break; + } + if (object.progressDocuments != null) { + if (typeof object.progressDocuments !== "object") + throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata.progressDocuments: object expected"); + message.progressDocuments = $root.google.firestore.admin.v1.Progress.fromObject(object.progressDocuments); + } + if (object.progressBytes != null) { + if (typeof object.progressBytes !== "object") + throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata.progressBytes: object expected"); + message.progressBytes = $root.google.firestore.admin.v1.Progress.fromObject(object.progressBytes); + } + if (object.collectionIds) { + if (!Array.isArray(object.collectionIds)) + throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata.collectionIds: array expected"); + message.collectionIds = []; + for (var i = 0; i < object.collectionIds.length; ++i) + message.collectionIds[i] = String(object.collectionIds[i]); + } + if (object.inputUriPrefix != null) + message.inputUriPrefix = String(object.inputUriPrefix); + return message; + }; + + /** + * Creates a plain object from an ImportDocumentsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.ImportDocumentsMetadata + * @static + * @param {google.firestore.admin.v1.ImportDocumentsMetadata} message ImportDocumentsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportDocumentsMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.collectionIds = []; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + object.operationState = options.enums === String ? "OPERATION_STATE_UNSPECIFIED" : 0; + object.progressDocuments = null; + object.progressBytes = null; + object.inputUriPrefix = ""; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.operationState != null && message.hasOwnProperty("operationState")) + object.operationState = options.enums === String ? $root.google.firestore.admin.v1.OperationState[message.operationState] === undefined ? message.operationState : $root.google.firestore.admin.v1.OperationState[message.operationState] : message.operationState; + if (message.progressDocuments != null && message.hasOwnProperty("progressDocuments")) + object.progressDocuments = $root.google.firestore.admin.v1.Progress.toObject(message.progressDocuments, options); + if (message.progressBytes != null && message.hasOwnProperty("progressBytes")) + object.progressBytes = $root.google.firestore.admin.v1.Progress.toObject(message.progressBytes, options); + if (message.collectionIds && message.collectionIds.length) { + object.collectionIds = []; + for (var j = 0; j < message.collectionIds.length; ++j) + object.collectionIds[j] = message.collectionIds[j]; + } + if (message.inputUriPrefix != null && message.hasOwnProperty("inputUriPrefix")) + object.inputUriPrefix = message.inputUriPrefix; + return object; + }; - /** - * Converts this ListValue to JSON. - * @function toJSON - * @memberof google.protobuf.ListValue - * @instance - * @returns {Object.} JSON object - */ - ListValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this ImportDocumentsMetadata to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.ImportDocumentsMetadata + * @instance + * @returns {Object.} JSON object + */ + ImportDocumentsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ListValue; - })(); + /** + * Gets the default type url for ImportDocumentsMetadata + * @function getTypeUrl + * @memberof google.firestore.admin.v1.ImportDocumentsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportDocumentsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.ImportDocumentsMetadata"; + }; - protobuf.DoubleValue = (function() { + return ImportDocumentsMetadata; + })(); - /** - * Properties of a DoubleValue. - * @memberof google.protobuf - * @interface IDoubleValue - * @property {number|null} [value] DoubleValue value - */ + v1.ExportDocumentsResponse = (function() { - /** - * Constructs a new DoubleValue. - * @memberof google.protobuf - * @classdesc Represents a DoubleValue. - * @implements IDoubleValue - * @constructor - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set - */ - function DoubleValue(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]]; - } + /** + * Properties of an ExportDocumentsResponse. + * @memberof google.firestore.admin.v1 + * @interface IExportDocumentsResponse + * @property {string|null} [outputUriPrefix] ExportDocumentsResponse outputUriPrefix + */ - /** - * DoubleValue value. - * @member {number} value - * @memberof google.protobuf.DoubleValue - * @instance - */ - DoubleValue.prototype.value = 0; + /** + * Constructs a new ExportDocumentsResponse. + * @memberof google.firestore.admin.v1 + * @classdesc Represents an ExportDocumentsResponse. + * @implements IExportDocumentsResponse + * @constructor + * @param {google.firestore.admin.v1.IExportDocumentsResponse=} [properties] Properties to set + */ + function ExportDocumentsResponse(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 DoubleValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DoubleValue} DoubleValue - */ - DoubleValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DoubleValue) - return object; - var message = new $root.google.protobuf.DoubleValue(); - if (object.value != null) - message.value = Number(object.value); - return message; - }; + /** + * ExportDocumentsResponse outputUriPrefix. + * @member {string} outputUriPrefix + * @memberof google.firestore.admin.v1.ExportDocumentsResponse + * @instance + */ + ExportDocumentsResponse.prototype.outputUriPrefix = ""; - /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DoubleValue - * @static - * @param {google.protobuf.DoubleValue} message DoubleValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DoubleValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; + /** + * Creates an ExportDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.ExportDocumentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.ExportDocumentsResponse} ExportDocumentsResponse + */ + ExportDocumentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.ExportDocumentsResponse) + return object; + var message = new $root.google.firestore.admin.v1.ExportDocumentsResponse(); + if (object.outputUriPrefix != null) + message.outputUriPrefix = String(object.outputUriPrefix); + return message; + }; - /** - * Converts this DoubleValue to JSON. - * @function toJSON - * @memberof google.protobuf.DoubleValue - * @instance - * @returns {Object.} JSON object - */ - DoubleValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an ExportDocumentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.ExportDocumentsResponse + * @static + * @param {google.firestore.admin.v1.ExportDocumentsResponse} message ExportDocumentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExportDocumentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.outputUriPrefix = ""; + if (message.outputUriPrefix != null && message.hasOwnProperty("outputUriPrefix")) + object.outputUriPrefix = message.outputUriPrefix; + return object; + }; - return DoubleValue; - })(); + /** + * Converts this ExportDocumentsResponse to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.ExportDocumentsResponse + * @instance + * @returns {Object.} JSON object + */ + ExportDocumentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - protobuf.FloatValue = (function() { + /** + * Gets the default type url for ExportDocumentsResponse + * @function getTypeUrl + * @memberof google.firestore.admin.v1.ExportDocumentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExportDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.ExportDocumentsResponse"; + }; - /** - * Properties of a FloatValue. - * @memberof google.protobuf - * @interface IFloatValue - * @property {number|null} [value] FloatValue value - */ + return ExportDocumentsResponse; + })(); - /** - * Constructs a new FloatValue. - * @memberof google.protobuf - * @classdesc Represents a FloatValue. - * @implements IFloatValue - * @constructor - * @param {google.protobuf.IFloatValue=} [properties] Properties to set - */ - function FloatValue(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]]; - } + /** + * OperationState enum. + * @name google.firestore.admin.v1.OperationState + * @enum {string} + * @property {string} OPERATION_STATE_UNSPECIFIED=OPERATION_STATE_UNSPECIFIED OPERATION_STATE_UNSPECIFIED value + * @property {string} INITIALIZING=INITIALIZING INITIALIZING value + * @property {string} PROCESSING=PROCESSING PROCESSING value + * @property {string} CANCELLING=CANCELLING CANCELLING value + * @property {string} FINALIZING=FINALIZING FINALIZING value + * @property {string} SUCCESSFUL=SUCCESSFUL SUCCESSFUL value + * @property {string} FAILED=FAILED FAILED value + * @property {string} CANCELLED=CANCELLED CANCELLED value + */ + v1.OperationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OPERATION_STATE_UNSPECIFIED"] = "OPERATION_STATE_UNSPECIFIED"; + values[valuesById[1] = "INITIALIZING"] = "INITIALIZING"; + values[valuesById[2] = "PROCESSING"] = "PROCESSING"; + values[valuesById[3] = "CANCELLING"] = "CANCELLING"; + values[valuesById[4] = "FINALIZING"] = "FINALIZING"; + values[valuesById[5] = "SUCCESSFUL"] = "SUCCESSFUL"; + values[valuesById[6] = "FAILED"] = "FAILED"; + values[valuesById[7] = "CANCELLED"] = "CANCELLED"; + return values; + })(); - /** - * FloatValue value. - * @member {number} value - * @memberof google.protobuf.FloatValue - * @instance - */ - FloatValue.prototype.value = 0; + v1.Progress = (function() { + + /** + * Properties of a Progress. + * @memberof google.firestore.admin.v1 + * @interface IProgress + * @property {number|string|null} [estimatedWork] Progress estimatedWork + * @property {number|string|null} [completedWork] Progress completedWork + */ - /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FloatValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FloatValue} FloatValue - */ - FloatValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FloatValue) - return object; - var message = new $root.google.protobuf.FloatValue(); - if (object.value != null) - message.value = Number(object.value); - return message; - }; + /** + * Constructs a new Progress. + * @memberof google.firestore.admin.v1 + * @classdesc Represents a Progress. + * @implements IProgress + * @constructor + * @param {google.firestore.admin.v1.IProgress=} [properties] Properties to set + */ + function Progress(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 plain object from a FloatValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FloatValue - * @static - * @param {google.protobuf.FloatValue} message FloatValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FloatValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - return object; - }; + /** + * Progress estimatedWork. + * @member {number|string} estimatedWork + * @memberof google.firestore.admin.v1.Progress + * @instance + */ + Progress.prototype.estimatedWork = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - /** - * Converts this FloatValue to JSON. - * @function toJSON - * @memberof google.protobuf.FloatValue - * @instance - * @returns {Object.} JSON object - */ - FloatValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Progress completedWork. + * @member {number|string} completedWork + * @memberof google.firestore.admin.v1.Progress + * @instance + */ + Progress.prototype.completedWork = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - return FloatValue; - })(); + /** + * Creates a Progress message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.admin.v1.Progress + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.admin.v1.Progress} Progress + */ + Progress.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.admin.v1.Progress) + return object; + var message = new $root.google.firestore.admin.v1.Progress(); + if (object.estimatedWork != null) + if ($util.Long) + (message.estimatedWork = $util.Long.fromValue(object.estimatedWork)).unsigned = false; + else if (typeof object.estimatedWork === "string") + message.estimatedWork = parseInt(object.estimatedWork, 10); + else if (typeof object.estimatedWork === "number") + message.estimatedWork = object.estimatedWork; + else if (typeof object.estimatedWork === "object") + message.estimatedWork = new $util.LongBits(object.estimatedWork.low >>> 0, object.estimatedWork.high >>> 0).toNumber(); + if (object.completedWork != null) + if ($util.Long) + (message.completedWork = $util.Long.fromValue(object.completedWork)).unsigned = false; + else if (typeof object.completedWork === "string") + message.completedWork = parseInt(object.completedWork, 10); + else if (typeof object.completedWork === "number") + message.completedWork = object.completedWork; + else if (typeof object.completedWork === "object") + message.completedWork = new $util.LongBits(object.completedWork.low >>> 0, object.completedWork.high >>> 0).toNumber(); + return message; + }; - protobuf.Int64Value = (function() { + /** + * Creates a plain object from a Progress message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.admin.v1.Progress + * @static + * @param {google.firestore.admin.v1.Progress} message Progress + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Progress.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.estimatedWork = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.estimatedWork = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.completedWork = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.completedWork = options.longs === String ? "0" : 0; + } + if (message.estimatedWork != null && message.hasOwnProperty("estimatedWork")) + if (typeof message.estimatedWork === "number") + object.estimatedWork = options.longs === String ? String(message.estimatedWork) : message.estimatedWork; + else + object.estimatedWork = options.longs === String ? $util.Long.prototype.toString.call(message.estimatedWork) : options.longs === Number ? new $util.LongBits(message.estimatedWork.low >>> 0, message.estimatedWork.high >>> 0).toNumber() : message.estimatedWork; + if (message.completedWork != null && message.hasOwnProperty("completedWork")) + if (typeof message.completedWork === "number") + object.completedWork = options.longs === String ? String(message.completedWork) : message.completedWork; + else + object.completedWork = options.longs === String ? $util.Long.prototype.toString.call(message.completedWork) : options.longs === Number ? new $util.LongBits(message.completedWork.low >>> 0, message.completedWork.high >>> 0).toNumber() : message.completedWork; + return object; + }; - /** - * Properties of an Int64Value. - * @memberof google.protobuf - * @interface IInt64Value - * @property {number|string|null} [value] Int64Value value - */ + /** + * Converts this Progress to JSON. + * @function toJSON + * @memberof google.firestore.admin.v1.Progress + * @instance + * @returns {Object.} JSON object + */ + Progress.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new Int64Value. - * @memberof google.protobuf - * @classdesc Represents an Int64Value. - * @implements IInt64Value - * @constructor - * @param {google.protobuf.IInt64Value=} [properties] Properties to set - */ - function Int64Value(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]]; - } + /** + * Gets the default type url for Progress + * @function getTypeUrl + * @memberof google.firestore.admin.v1.Progress + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Progress.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.admin.v1.Progress"; + }; - /** - * Int64Value value. - * @member {number|string} value - * @memberof google.protobuf.Int64Value - * @instance - */ - Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + return Progress; + })(); - /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int64Value} Int64Value - */ - Int64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int64Value) - return object; - var message = new $root.google.protobuf.Int64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); - return message; - }; + return v1; + })(); - /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.Int64Value} message Int64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Int64Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; - return object; - }; + return admin; + })(); - /** - * Converts this Int64Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int64Value - * @instance - * @returns {Object.} JSON object - */ - Int64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return firestore; + })(); + + google.type = (function() { - return Int64Value; - })(); + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; - protobuf.UInt64Value = (function() { + type.LatLng = (function() { /** - * Properties of a UInt64Value. - * @memberof google.protobuf - * @interface IUInt64Value - * @property {number|string|null} [value] UInt64Value value + * Properties of a LatLng. + * @memberof google.type + * @interface ILatLng + * @property {number|null} [latitude] LatLng latitude + * @property {number|null} [longitude] LatLng longitude */ /** - * Constructs a new UInt64Value. - * @memberof google.protobuf - * @classdesc Represents a UInt64Value. - * @implements IUInt64Value + * Constructs a new LatLng. + * @memberof google.type + * @classdesc Represents a LatLng. + * @implements ILatLng * @constructor - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @param {google.type.ILatLng=} [properties] Properties to set */ - function UInt64Value(properties) { + function LatLng(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10585,96 +12318,126 @@ } /** - * UInt64Value value. - * @member {number|string} value - * @memberof google.protobuf.UInt64Value + * LatLng latitude. + * @member {number} latitude + * @memberof google.type.LatLng * @instance */ - UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + LatLng.prototype.latitude = 0; /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * LatLng longitude. + * @member {number} longitude + * @memberof google.type.LatLng + * @instance + */ + LatLng.prototype.longitude = 0; + + /** + * Creates a LatLng message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UInt64Value + * @memberof google.type.LatLng * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UInt64Value} UInt64Value + * @returns {google.type.LatLng} LatLng */ - UInt64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt64Value) + LatLng.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.LatLng) return object; - var message = new $root.google.protobuf.UInt64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = true; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + var message = new $root.google.type.LatLng(); + if (object.latitude != null) + message.latitude = Number(object.latitude); + if (object.longitude != null) + message.longitude = Number(object.longitude); return message; }; /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * Creates a plain object from a LatLng message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UInt64Value + * @memberof google.type.LatLng * @static - * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {google.type.LatLng} message LatLng * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UInt64Value.toObject = function toObject(message, options) { + LatLng.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + if (options.defaults) { + object.latitude = 0; + object.longitude = 0; + } + if (message.latitude != null && message.hasOwnProperty("latitude")) + object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; + if (message.longitude != null && message.hasOwnProperty("longitude")) + object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; return object; }; /** - * Converts this UInt64Value to JSON. + * Converts this LatLng to JSON. * @function toJSON - * @memberof google.protobuf.UInt64Value + * @memberof google.type.LatLng * @instance * @returns {Object.} JSON object */ - UInt64Value.prototype.toJSON = function toJSON() { + LatLng.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UInt64Value; + /** + * Gets the default type url for LatLng + * @function getTypeUrl + * @memberof google.type.LatLng + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LatLng.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.LatLng"; + }; + + return LatLng; })(); - protobuf.Int32Value = (function() { + return type; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { /** - * Properties of an Int32Value. - * @memberof google.protobuf - * @interface IInt32Value - * @property {number|null} [value] Int32Value value + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details */ /** - * Constructs a new Int32Value. - * @memberof google.protobuf - * @classdesc Represents an Int32Value. - * @implements IInt32Value + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus * @constructor - * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @param {google.rpc.IStatus=} [properties] Properties to set */ - function Int32Value(properties) { + function Status(properties) { + this.details = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10682,165 +12445,176 @@ } /** - * Int32Value value. - * @member {number} value - * @memberof google.protobuf.Int32Value + * Status code. + * @member {number} code + * @memberof google.rpc.Status * @instance */ - Int32Value.prototype.value = 0; - - /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int32Value} Int32Value - */ - Int32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int32Value) - return object; - var message = new $root.google.protobuf.Int32Value(); - if (object.value != null) - message.value = object.value | 0; - return message; - }; - - /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.Int32Value} message Int32Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Int32Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; + Status.prototype.code = 0; /** - * Converts this Int32Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int32Value + * Status message. + * @member {string} message + * @memberof google.rpc.Status * @instance - * @returns {Object.} JSON object - */ - Int32Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Int32Value; - })(); - - protobuf.UInt32Value = (function() { - - /** - * Properties of a UInt32Value. - * @memberof google.protobuf - * @interface IUInt32Value - * @property {number|null} [value] UInt32Value value - */ - - /** - * Constructs a new UInt32Value. - * @memberof google.protobuf - * @classdesc Represents a UInt32Value. - * @implements IUInt32Value - * @constructor - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set */ - function UInt32Value(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]]; - } + Status.prototype.message = ""; /** - * UInt32Value value. - * @member {number} value - * @memberof google.protobuf.UInt32Value + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status * @instance */ - UInt32Value.prototype.value = 0; + Status.prototype.details = $util.emptyArray; /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UInt32Value + * @memberof google.rpc.Status * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UInt32Value} UInt32Value + * @returns {google.rpc.Status} Status */ - UInt32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt32Value) + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) return object; - var message = new $root.google.protobuf.UInt32Value(); - if (object.value != null) - message.value = object.value >>> 0; + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); + } + } return message; }; /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * Creates a plain object from a Status message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UInt32Value + * @memberof google.rpc.Status * @static - * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {google.rpc.Status} message Status * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UInt32Value.toObject = function toObject(message, options) { + Status.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } return object; }; /** - * Converts this UInt32Value to JSON. + * Converts this Status to JSON. * @function toJSON - * @memberof google.protobuf.UInt32Value + * @memberof google.rpc.Status * @instance * @returns {Object.} JSON object */ - UInt32Value.prototype.toJSON = function toJSON() { + Status.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UInt32Value; + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; })(); - protobuf.BoolValue = (function() { + return rpc; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {string} + * @property {string} FIELD_BEHAVIOR_UNSPECIFIED=FIELD_BEHAVIOR_UNSPECIFIED FIELD_BEHAVIOR_UNSPECIFIED value + * @property {string} OPTIONAL=OPTIONAL OPTIONAL value + * @property {string} REQUIRED=REQUIRED REQUIRED value + * @property {string} OUTPUT_ONLY=OUTPUT_ONLY OUTPUT_ONLY value + * @property {string} INPUT_ONLY=INPUT_ONLY INPUT_ONLY value + * @property {string} IMMUTABLE=IMMUTABLE IMMUTABLE value + * @property {string} UNORDERED_LIST=UNORDERED_LIST UNORDERED_LIST value + * @property {string} NON_EMPTY_DEFAULT=NON_EMPTY_DEFAULT NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = "FIELD_BEHAVIOR_UNSPECIFIED"; + values[valuesById[1] = "OPTIONAL"] = "OPTIONAL"; + values[valuesById[2] = "REQUIRED"] = "REQUIRED"; + values[valuesById[3] = "OUTPUT_ONLY"] = "OUTPUT_ONLY"; + values[valuesById[4] = "INPUT_ONLY"] = "INPUT_ONLY"; + values[valuesById[5] = "IMMUTABLE"] = "IMMUTABLE"; + values[valuesById[6] = "UNORDERED_LIST"] = "UNORDERED_LIST"; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = "NON_EMPTY_DEFAULT"; + return values; + })(); + + api.Http = (function() { /** - * Properties of a BoolValue. - * @memberof google.protobuf - * @interface IBoolValue - * @property {boolean|null} [value] BoolValue value + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new BoolValue. - * @memberof google.protobuf - * @classdesc Represents a BoolValue. - * @implements IBoolValue + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function BoolValue(properties) { + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10848,82 +12622,132 @@ } /** - * BoolValue value. - * @member {boolean} value - * @memberof google.protobuf.BoolValue + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - BoolValue.prototype.value = false; + Http.prototype.rules = $util.emptyArray; /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.BoolValue + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.protobuf.BoolValue} BoolValue + * @returns {google.api.Http} Http */ - BoolValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BoolValue) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.protobuf.BoolValue(); - if (object.value != null) - message.value = Boolean(object.value); + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.BoolValue + * @memberof google.api.Http * @static - * @param {google.protobuf.BoolValue} message BoolValue + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BoolValue.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.rules = []; if (options.defaults) - object.value = false; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this BoolValue to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.protobuf.BoolValue + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - BoolValue.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BoolValue; + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; })(); - protobuf.StringValue = (function() { + api.HttpRule = (function() { /** - * Properties of a StringValue. - * @memberof google.protobuf - * @interface IStringValue - * @property {string|null} [value] StringValue value + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings */ /** - * Constructs a new StringValue. - * @memberof google.protobuf - * @classdesc Represents a StringValue. - * @implements IStringValue + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function StringValue(properties) { + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10931,175 +12755,257 @@ } /** - * StringValue value. - * @member {string} value - * @memberof google.protobuf.StringValue + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule * @instance */ - StringValue.prototype.value = ""; + HttpRule.prototype["delete"] = null; /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.StringValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.StringValue} StringValue + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance */ - StringValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.StringValue) - return object; - var message = new $root.google.protobuf.StringValue(); - if (object.value != null) - message.value = String(object.value); - return message; - }; + HttpRule.prototype.patch = null; /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.StringValue - * @static - * @param {google.protobuf.StringValue} message StringValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance */ - StringValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; + HttpRule.prototype.custom = null; /** - * Converts this StringValue to JSON. - * @function toJSON - * @memberof google.protobuf.StringValue + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule * @instance - * @returns {Object.} JSON object */ - StringValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return StringValue; - })(); - - protobuf.BytesValue = (function() { + HttpRule.prototype.body = ""; /** - * Properties of a BytesValue. - * @memberof google.protobuf - * @interface IBytesValue - * @property {Uint8Array|null} [value] BytesValue value + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance */ + HttpRule.prototype.responseBody = ""; /** - * Constructs a new BytesValue. - * @memberof google.protobuf - * @classdesc Represents a BytesValue. - * @implements IBytesValue - * @constructor - * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance */ - function BytesValue(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]]; - } + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * BytesValue value. - * @member {Uint8Array} value - * @memberof google.protobuf.BytesValue + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule * @instance */ - BytesValue.prototype.value = $util.newBuffer([]); + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.BytesValue + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.protobuf.BytesValue} BytesValue + * @returns {google.api.HttpRule} HttpRule */ - BytesValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BytesValue) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.protobuf.BytesValue(); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } return message; }; /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.BytesValue + * @memberof google.api.HttpRule * @static - * @param {google.protobuf.BytesValue} message BytesValue + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BytesValue.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this BytesValue to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.protobuf.BytesValue + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - BytesValue.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BytesValue; + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; })(); - protobuf.Duration = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|string|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function Duration(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11107,123 +13013,119 @@ } /** - * Duration seconds. - * @member {number|string} seconds - * @memberof google.protobuf.Duration + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + CustomHttpPattern.prototype.kind = ""; /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - Duration.prototype.nanos = 0; + CustomHttpPattern.prototype.path = ""; /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Duration + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Duration + * @memberof google.api.CustomHttpPattern * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; + object.kind = ""; + object.path = ""; } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this Duration to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Duration; - })(); - - return protobuf; - })(); - - google.type = (function() { + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; + return CustomHttpPattern; + })(); - type.LatLng = (function() { + api.ResourceDescriptor = (function() { /** - * Properties of a LatLng. - * @memberof google.type - * @interface ILatLng - * @property {number|null} [latitude] LatLng latitude - * @property {number|null} [longitude] LatLng longitude + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style */ /** - * Constructs a new LatLng. - * @memberof google.type - * @classdesc Represents a LatLng. - * @implements ILatLng + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.type.ILatLng=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function LatLng(properties) { + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11231,111 +13133,257 @@ } /** - * LatLng latitude. - * @member {number} latitude - * @memberof google.type.LatLng + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - LatLng.prototype.latitude = 0; + ResourceDescriptor.prototype.type = ""; /** - * LatLng longitude. - * @member {number} longitude - * @memberof google.type.LatLng + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - LatLng.prototype.longitude = 0; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * Creates a LatLng message from a plain object. Also converts values to their respective internal types. + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.type.LatLng + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.type.LatLng} LatLng + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - LatLng.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.LatLng) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) return object; - var message = new $root.google.type.LatLng(); - if (object.latitude != null) - message.latitude = Number(object.latitude); - if (object.longitude != null) - message.longitude = Number(object.longitude); + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } return message; }; /** - * Creates a plain object from a LatLng message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.type.LatLng + * @memberof google.api.ResourceDescriptor * @static - * @param {google.type.LatLng} message LatLng + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LatLng.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } if (options.defaults) { - object.latitude = 0; - object.longitude = 0; + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } - if (message.latitude != null && message.hasOwnProperty("latitude")) - object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; - if (message.longitude != null && message.hasOwnProperty("longitude")) - object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; return object; }; /** - * Converts this LatLng to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.type.LatLng + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - LatLng.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LatLng; - })(); + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; - return type; - })(); + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {string} + * @property {string} HISTORY_UNSPECIFIED=HISTORY_UNSPECIFIED HISTORY_UNSPECIFIED value + * @property {string} ORIGINALLY_SINGLE_PATTERN=ORIGINALLY_SINGLE_PATTERN ORIGINALLY_SINGLE_PATTERN value + * @property {string} FUTURE_MULTI_PATTERN=FUTURE_MULTI_PATTERN FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = "HISTORY_UNSPECIFIED"; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = "ORIGINALLY_SINGLE_PATTERN"; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = "FUTURE_MULTI_PATTERN"; + return values; + })(); - google.rpc = (function() { + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {string} + * @property {string} STYLE_UNSPECIFIED=STYLE_UNSPECIFIED STYLE_UNSPECIFIED value + * @property {string} DECLARATIVE_FRIENDLY=DECLARATIVE_FRIENDLY DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = "STYLE_UNSPECIFIED"; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = "DECLARATIVE_FRIENDLY"; + return values; + })(); - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; + return ResourceDescriptor; + })(); - rpc.Status = (function() { + api.ResourceReference = (function() { /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set + * @param {google.api.IResourceReference=} [properties] Properties to set */ - function Status(properties) { - this.details = []; + function ResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11343,104 +13391,94 @@ } /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - Status.prototype.message = ""; + ResourceReference.prototype.type = ""; /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - Status.prototype.details = $util.emptyArray; + ResourceReference.prototype.childType = ""; /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.rpc.Status + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status + * @returns {google.api.ResourceReference} ResourceReference */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); return message; }; /** - * Creates a plain object from a Status message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.rpc.Status + * @memberof google.api.ResourceReference * @static - * @param {google.rpc.Status} message Status + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Status.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.details = []; if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + object.type = ""; + object.childType = ""; } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; return object; }; /** - * Converts this Status to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.rpc.Status + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - Status.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Status; + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; })(); - return rpc; + return api; })(); google.longrunning = (function() { @@ -11802,6 +13840,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + return Operation; })(); @@ -11885,6 +13938,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + return GetOperationRequest; })(); @@ -12011,6 +14079,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + return ListOperationsRequest; })(); @@ -12121,6 +14204,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + return ListOperationsResponse; })(); @@ -12204,6 +14302,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + return CancelOperationRequest; })(); @@ -12287,6 +14400,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + return DeleteOperationRequest; })(); @@ -12388,6 +14516,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + return WaitOperationRequest; })(); @@ -12486,6 +14629,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + return OperationInfo; })(); diff --git a/dev/protos/firestore_v1_proto_api.d.ts b/dev/protos/firestore_v1_proto_api.d.ts index 85b867b25..ec20d9c1e 100644 --- a/dev/protos/firestore_v1_proto_api.d.ts +++ b/dev/protos/firestore_v1_proto_api.d.ts @@ -72,6 +72,13 @@ export namespace firestore { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BundledQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace BundledQuery { @@ -132,6 +139,13 @@ export namespace firestore { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamedQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BundledDocumentMetadata. */ @@ -191,6 +205,13 @@ export namespace firestore { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BundledDocumentMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BundleMetadata. */ @@ -256,6 +277,13 @@ export namespace firestore { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BundleMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BundleElement. */ @@ -318,6 +346,13 @@ export namespace firestore { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BundleElement + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -372,6 +407,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Struct. */ @@ -413,6 +455,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Struct + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Value. */ @@ -487,6 +536,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** NullValue enum. */ @@ -532,2066 +588,2528 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { + /** + * Gets the default type url for ListValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); + /** Properties of an Empty. */ + interface IEmpty { } - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { + /** Represents an Empty. */ + class Empty implements IEmpty { /** - * Constructs a new FileDescriptorSet. + * Constructs a new Empty. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; + constructor(properties?: google.protobuf.IEmpty); /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorSet + * @returns Empty */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorSet to JSON. + * Converts this Empty to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** Properties of a DoubleValue. */ + interface IDoubleValue { - /** FileDescriptorProto syntax */ - syntax?: (string|null); + /** DoubleValue value */ + value?: (number|null); } - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { /** - * Constructs a new FileDescriptorProto. + * Constructs a new DoubleValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + constructor(properties?: google.protobuf.IDoubleValue); - /** FileDescriptorProto syntax. */ - public syntax: string; + /** DoubleValue value. */ + public value: number; /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorProto + * @returns DoubleValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorProto to JSON. + * Converts this DoubleValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); + /** + * Gets the default type url for DoubleValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + /** Properties of a FloatValue. */ + interface IFloatValue { - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); + /** FloatValue value */ + value?: (number|null); } - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { /** - * Constructs a new DescriptorProto. + * Constructs a new FloatValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + constructor(properties?: google.protobuf.IFloatValue); - /** DescriptorProto reservedName. */ - public reservedName: string[]; + /** FloatValue value. */ + public value: number; /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DescriptorProto + * @returns FloatValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DescriptorProto to JSON. + * Converts this FloatValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FloatValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - } + /** Properties of an Int64Value. */ + interface IInt64Value { - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { + /** Int64Value value */ + value?: (number|string|null); + } - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { - /** ExtensionRange start. */ - public start: number; + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); - /** ExtensionRange end. */ - public end: number; + /** Int64Value value. */ + public value: (number|string); - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** Properties of a ReservedRange. */ - interface IReservedRange { + /** + * Gets the default type url for Int64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ReservedRange start */ - start?: (number|null); + /** Properties of a UInt64Value. */ + interface IUInt64Value { - /** ReservedRange end */ - end?: (number|null); - } + /** UInt64Value value */ + value?: (number|string|null); + } - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + /** + * Constructs a new UInt64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt64Value); - /** ReservedRange start. */ - public start: number; + /** UInt64Value value. */ + public value: (number|string); - /** ReservedRange end. */ - public end: number; + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Gets the default type url for UInt64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { + /** Properties of an Int32Value. */ + interface IInt32Value { - /** FieldDescriptorProto name */ - name?: (string|null); + /** Int32Value value */ + value?: (number|null); + } - /** FieldDescriptorProto number */ - number?: (number|null); + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|null); + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|null); + /** Int32Value value. */ + public value: number; - /** FieldDescriptorProto typeName */ - typeName?: (string|null); + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; - /** FieldDescriptorProto extendee */ - extendee?: (string|null); + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); + /** Properties of a UInt32Value. */ + interface IUInt32Value { - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); + /** UInt32Value value */ + value?: (number|null); } - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { /** - * Constructs a new FieldDescriptorProto. + * Constructs a new UInt32Value. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); + constructor(properties?: google.protobuf.IUInt32Value); - /** FieldDescriptorProto name. */ - public name: string; + /** UInt32Value value. */ + public value: number; - /** FieldDescriptorProto number. */ - public number: number; + /** + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; - /** FieldDescriptorProto label. */ - public label: google.protobuf.FieldDescriptorProto.Label; + /** + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldDescriptorProto type. */ - public type: google.protobuf.FieldDescriptorProto.Type; + /** + * Converts this UInt32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FieldDescriptorProto typeName. */ - public typeName: string; + /** + * Gets the default type url for UInt32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FieldDescriptorProto extendee. */ - public extendee: string; + /** Properties of a BoolValue. */ + interface IBoolValue { - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; + /** BoolValue value */ + value?: (boolean|null); + } - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { - /** FieldDescriptorProto jsonName. */ - public jsonName: string; + /** + * Constructs a new BoolValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IBoolValue); - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); + /** BoolValue value. */ + public value: boolean; /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldDescriptorProto + * @returns BoolValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldDescriptorProto to JSON. + * Converts this BoolValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - namespace FieldDescriptorProto { - /** Type enum. */ - type Type = - "TYPE_DOUBLE"| "TYPE_FLOAT"| "TYPE_INT64"| "TYPE_UINT64"| "TYPE_INT32"| "TYPE_FIXED64"| "TYPE_FIXED32"| "TYPE_BOOL"| "TYPE_STRING"| "TYPE_GROUP"| "TYPE_MESSAGE"| "TYPE_BYTES"| "TYPE_UINT32"| "TYPE_ENUM"| "TYPE_SFIXED32"| "TYPE_SFIXED64"| "TYPE_SINT32"| "TYPE_SINT64"; - - /** Label enum. */ - type Label = - "LABEL_OPTIONAL"| "LABEL_REQUIRED"| "LABEL_REPEATED"; + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); + /** Properties of a StringValue. */ + interface IStringValue { - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); + /** StringValue value */ + value?: (string|null); } - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { + /** Represents a StringValue. */ + class StringValue implements IStringValue { /** - * Constructs a new OneofDescriptorProto. + * Constructs a new StringValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; + constructor(properties?: google.protobuf.IStringValue); - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); + /** StringValue value. */ + public value: string; /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneofDescriptorProto + * @returns StringValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneofDescriptorProto to JSON. + * Converts this StringValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); + /** + * Gets the default type url for StringValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + /** Properties of a BytesValue. */ + interface IBytesValue { - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); + /** BytesValue value */ + value?: (Uint8Array|null); } - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { /** - * Constructs a new EnumDescriptorProto. + * Constructs a new BytesValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; + constructor(properties?: google.protobuf.IBytesValue); - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); + /** BytesValue value. */ + public value: Uint8Array; /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumDescriptorProto + * @returns BytesValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumDescriptorProto to JSON. + * Converts this BytesValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { + /** + * Gets the default type url for BytesValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** EnumValueDescriptorProto name */ - name?: (string|null); + /** Properties of an Any. */ + interface IAny { - /** EnumValueDescriptorProto number */ - number?: (number|null); + /** Any type_url */ + type_url?: (string|null); - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); + /** Any value */ + value?: (Uint8Array|null); } - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + /** Represents an Any. */ + class Any implements IAny { /** - * Constructs a new EnumValueDescriptorProto. + * Constructs a new Any. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; + constructor(properties?: google.protobuf.IAny); - /** EnumValueDescriptorProto number. */ - public number: number; + /** Any type_url. */ + public type_url: string; - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); + /** Any value. */ + public value: Uint8Array; /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumValueDescriptorProto + * @returns Any */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumValueDescriptorProto to JSON. + * Converts this Any to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - /** ServiceDescriptorProto name */ - name?: (string|null); + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); } - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { /** - * Constructs a new ServiceDescriptorProto. + * Constructs a new FileDescriptorSet. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; + constructor(properties?: google.protobuf.IFileDescriptorSet); - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceDescriptorProto + * @returns FileDescriptorSet */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceDescriptorProto to JSON. + * Converts this FileDescriptorSet to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { - /** MethodDescriptorProto name */ + /** FileDescriptorProto name */ name?: (string|null); - /** MethodDescriptorProto inputType */ - inputType?: (string|null); + /** FileDescriptorProto package */ + "package"?: (string|null); - /** MethodDescriptorProto outputType */ - outputType?: (string|null); + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (string|null); } - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { /** - * Constructs a new MethodDescriptorProto. + * Constructs a new FileDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); + constructor(properties?: google.protobuf.IFileDescriptorProto); - /** MethodDescriptorProto name. */ + /** FileDescriptorProto name. */ public name: string; - /** MethodDescriptorProto inputType. */ - public inputType: string; + /** FileDescriptorProto package. */ + public package: string; - /** MethodDescriptorProto outputType. */ - public outputType: string; + /** FileDescriptorProto dependency. */ + public dependency: string[]; - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: string; /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodDescriptorProto + * @returns FileDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodDescriptorProto to JSON. + * Converts this FileDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { - /** FileOptions goPackage */ - goPackage?: (string|null); + /** DescriptorProto name */ + name?: (string|null); - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); - /** FileOptions deprecated */ - deprecated?: (boolean|null); + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); } - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { /** - * Constructs a new FileOptions. + * Constructs a new DescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; + constructor(properties?: google.protobuf.IDescriptorProto); - /** FileOptions optimizeFor. */ - public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + /** DescriptorProto name. */ + public name: string; - /** FileOptions goPackage. */ - public goPackage: string; + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** FileOptions deprecated. */ - public deprecated: boolean; + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** DescriptorProto reservedName. */ + public reservedName: string[]; /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileOptions + * @returns DescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileOptions to JSON. + * Converts this DescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace FileOptions { + namespace DescriptorProto { - /** OptimizeMode enum. */ - type OptimizeMode = - "SPEED"| "CODE_SIZE"| "LITE_RUNTIME"; - } + /** Properties of an ExtensionRange. */ + interface IExtensionRange { - /** Properties of a MessageOptions. */ - interface IMessageOptions { + /** ExtensionRange start */ + start?: (number|null); - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); + /** ExtensionRange end */ + end?: (number|null); - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } - /** MessageOptions deprecated */ - deprecated?: (boolean|null); + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** ExtensionRange start. */ + public start: number; - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } + /** ExtensionRange end. */ + public end: number; - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** MessageOptions deprecated. */ - public deprecated: boolean; + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** MessageOptions mapEntry. */ - public mapEntry: boolean; + /** Properties of a ReservedRange. */ + interface IReservedRange { - /** MessageOptions uninterpretedOption. */ + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MessageOptions + * @returns ExtensionRangeOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MessageOptions to JSON. + * Converts this ExtensionRangeOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FieldOptions. */ - interface IFieldOptions { + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|null); + /** FieldDescriptorProto name */ + name?: (string|null); - /** FieldOptions packed */ - packed?: (boolean|null); + /** FieldDescriptorProto number */ + number?: (number|null); - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|null); + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|null); - /** FieldOptions lazy */ - lazy?: (boolean|null); + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|null); - /** FieldOptions deprecated */ - deprecated?: (boolean|null); + /** FieldDescriptorProto typeName */ + typeName?: (string|null); - /** FieldOptions weak */ - weak?: (boolean|null); + /** FieldDescriptorProto extendee */ + extendee?: (string|null); - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); } - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { /** - * Constructs a new FieldOptions. + * Constructs a new FieldDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFieldOptions); + constructor(properties?: google.protobuf.IFieldDescriptorProto); - /** FieldOptions ctype. */ - public ctype: google.protobuf.FieldOptions.CType; + /** FieldDescriptorProto name. */ + public name: string; - /** FieldOptions packed. */ - public packed: boolean; + /** FieldDescriptorProto number. */ + public number: number; - /** FieldOptions jstype. */ - public jstype: google.protobuf.FieldOptions.JSType; + /** FieldDescriptorProto label. */ + public label: google.protobuf.FieldDescriptorProto.Label; - /** FieldOptions lazy. */ - public lazy: boolean; + /** FieldDescriptorProto type. */ + public type: google.protobuf.FieldDescriptorProto.Type; - /** FieldOptions deprecated. */ - public deprecated: boolean; + /** FieldDescriptorProto typeName. */ + public typeName: string; - /** FieldOptions weak. */ - public weak: boolean; + /** FieldDescriptorProto extendee. */ + public extendee: string; - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldOptions + * @returns FieldDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldOptions to JSON. + * Converts this FieldDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace FieldOptions { + namespace FieldDescriptorProto { - /** CType enum. */ - type CType = - "STRING"| "CORD"| "STRING_PIECE"; + /** Type enum. */ + type Type = + "TYPE_DOUBLE"| "TYPE_FLOAT"| "TYPE_INT64"| "TYPE_UINT64"| "TYPE_INT32"| "TYPE_FIXED64"| "TYPE_FIXED32"| "TYPE_BOOL"| "TYPE_STRING"| "TYPE_GROUP"| "TYPE_MESSAGE"| "TYPE_BYTES"| "TYPE_UINT32"| "TYPE_ENUM"| "TYPE_SFIXED32"| "TYPE_SFIXED64"| "TYPE_SINT32"| "TYPE_SINT64"; - /** JSType enum. */ - type JSType = - "JS_NORMAL"| "JS_STRING"| "JS_NUMBER"; + /** Label enum. */ + type Label = + "LABEL_OPTIONAL"| "LABEL_REQUIRED"| "LABEL_REPEATED"; } - /** Properties of an OneofOptions. */ - interface IOneofOptions { + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); } - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { /** - * Constructs a new OneofOptions. + * Constructs a new OneofDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IOneofOptions); + constructor(properties?: google.protobuf.IOneofDescriptorProto); - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneofOptions + * @returns OneofDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneofOptions to JSON. + * Converts this OneofDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EnumOptions. */ - interface IEnumOptions { + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); + /** EnumDescriptorProto name */ + name?: (string|null); - /** EnumOptions deprecated */ - deprecated?: (boolean|null); + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); } - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { /** - * Constructs a new EnumOptions. + * Constructs a new EnumDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumOptions); + constructor(properties?: google.protobuf.IEnumDescriptorProto); - /** EnumOptions allowAlias. */ - public allowAlias: boolean; + /** EnumDescriptorProto name. */ + public name: string; - /** EnumOptions deprecated. */ - public deprecated: boolean; + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumOptions + * @returns EnumDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); + /** EnumValueDescriptorProto name */ + name?: (string|null); - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); } - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { /** - * Constructs a new EnumValueOptions. + * Constructs a new EnumValueDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumValueOptions); + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - /** EnumValueOptions deprecated. */ - public deprecated: boolean; + /** EnumValueDescriptorProto name. */ + public name: string; - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumValueOptions + * @returns EnumValueDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumValueOptions to JSON. + * Converts this EnumValueDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - /** Properties of a ServiceOptions. */ - interface IServiceOptions { + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** ServiceDescriptorProto name */ + name?: (string|null); - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); } - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { /** - * Constructs a new ServiceOptions. + * Constructs a new ServiceDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IServiceOptions); + constructor(properties?: google.protobuf.IServiceDescriptorProto); - /** ServiceOptions deprecated. */ - public deprecated: boolean; + /** ServiceDescriptorProto name. */ + public name: string; - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceOptions + * @returns ServiceDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceOptions to JSON. + * Converts this ServiceDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MethodOptions. */ - interface IMethodOptions { + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { - /** MethodOptions deprecated */ - deprecated?: (boolean|null); + /** MethodDescriptorProto name */ + name?: (string|null); - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** MethodDescriptorProto inputType */ + inputType?: (string|null); - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); + /** MethodDescriptorProto outputType */ + outputType?: (string|null); - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); } - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { /** - * Constructs a new MethodOptions. + * Constructs a new MethodDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IMethodOptions); + constructor(properties?: google.protobuf.IMethodDescriptorProto); - /** MethodOptions deprecated. */ - public deprecated: boolean; + /** MethodDescriptorProto name. */ + public name: string; - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodOptions + * @returns MethodDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodOptions to JSON. + * Converts this MethodDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { + /** Properties of a FileOptions. */ + interface IFileOptions { - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + /** FileOptions javaPackage */ + javaPackage?: (string|null); - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|string|null); + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|string|null); + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|null); + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } + /** FileOptions goPackage */ + goPackage?: (string|null); - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); - /** UninterpretedOption identifierValue. */ - public identifierValue: string; + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|string); + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|string); + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); - /** UninterpretedOption doubleValue. */ - public doubleValue: number; + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); - /** UninterpretedOption stringValue. */ - public stringValue: Uint8Array; + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object + * Constructs a new FileOptions. + * @param [properties] Properties to set */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + constructor(properties?: google.protobuf.IFileOptions); - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FileOptions javaPackage. */ + public javaPackage: string; - namespace UninterpretedOption { + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; - /** Properties of a NamePart. */ - interface INamePart { + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; - /** NamePart namePart */ - namePart: string; + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; - /** NamePart isExtension */ - isExtension: boolean; - } + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; - /** Represents a NamePart. */ - class NamePart implements INamePart { + /** FileOptions optimizeFor. */ + public optimizeFor: google.protobuf.FileOptions.OptimizeMode; - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + /** FileOptions goPackage. */ + public goPackage: string; - /** NamePart namePart. */ - public namePart: string; + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; - /** NamePart isExtension. */ - public isExtension: boolean; + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** FileOptions deprecated. */ + public deprecated: boolean; - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SourceCodeInfo + * @returns FileOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this FileOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); - - /** Location leadingComments */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - /** Location path. */ - public path: number[]; + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Location span. */ - public span: number[]; + namespace FileOptions { - /** Location leadingComments. */ - public leadingComments: string; + /** OptimizeMode enum. */ + type OptimizeMode = + "SPEED"| "CODE_SIZE"| "LITE_RUNTIME"; + } - /** Location trailingComments. */ - public trailingComments: string; + /** Properties of a MessageOptions. */ + interface IMessageOptions { - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MessageOptions deprecated */ + deprecated?: (boolean|null); - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); } - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new MessageOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GeneratedCodeInfo + * @returns MessageOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this MessageOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace GeneratedCodeInfo { + /** Properties of a FieldOptions. */ + interface IFieldOptions { - /** Properties of an Annotation. */ - interface IAnnotation { + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|null); - /** Annotation path */ - path?: (number[]|null); + /** FieldOptions packed */ + packed?: (boolean|null); - /** Annotation sourceFile */ - sourceFile?: (string|null); + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|null); - /** Annotation begin */ - begin?: (number|null); + /** FieldOptions lazy */ + lazy?: (boolean|null); - /** Annotation end */ - end?: (number|null); - } + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); - /** Represents an Annotation. */ - class Annotation implements IAnnotation { + /** FieldOptions deprecated */ + deprecated?: (boolean|null); - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + /** FieldOptions weak */ + weak?: (boolean|null); - /** Annotation path. */ - public path: number[]; + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** Annotation sourceFile. */ - public sourceFile: string; + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - /** Annotation begin. */ - public begin: number; + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } - /** Annotation end. */ - public end: number; + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FieldOptions ctype. */ + public ctype: google.protobuf.FieldOptions.CType; - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: google.protobuf.FieldOptions.JSType; + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Empty. */ - interface IEmpty { + namespace FieldOptions { + + /** CType enum. */ + type CType = + "STRING"| "CORD"| "STRING_PIECE"; + + /** JSType enum. */ + type JSType = + "JS_NORMAL"| "JS_STRING"| "JS_NUMBER"; } - /** Represents an Empty. */ - class Empty implements IEmpty { + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { /** - * Constructs a new Empty. + * Constructs a new OneofOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEmpty); + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Empty + * @returns OneofOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Empty to JSON. + * Converts this OneofOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DoubleValue. */ - interface IDoubleValue { + /** Properties of an EnumOptions. */ + interface IEnumOptions { - /** DoubleValue value */ - value?: (number|null); + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents a DoubleValue. */ - class DoubleValue implements IDoubleValue { + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { /** - * Constructs a new DoubleValue. + * Constructs a new EnumOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDoubleValue); + constructor(properties?: google.protobuf.IEnumOptions); - /** DoubleValue value. */ - public value: number; + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DoubleValue + * @returns EnumOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @param message DoubleValue + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DoubleValue to JSON. + * Converts this EnumOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FloatValue. */ - interface IFloatValue { + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { - /** FloatValue value */ - value?: (number|null); + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents a FloatValue. */ - class FloatValue implements IFloatValue { + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { /** - * Constructs a new FloatValue. + * Constructs a new EnumValueOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFloatValue); + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; - /** FloatValue value. */ - public value: number; + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FloatValue + * @returns EnumValueOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @param message FloatValue + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FloatValue to JSON. + * Converts this EnumValueOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Int64Value. */ - interface IInt64Value { + /** Properties of a ServiceOptions. */ + interface IServiceOptions { - /** Int64Value value */ - value?: (number|string|null); + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); } - /** Represents an Int64Value. */ - class Int64Value implements IInt64Value { + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { /** - * Constructs a new Int64Value. + * Constructs a new ServiceOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IInt64Value); + constructor(properties?: google.protobuf.IServiceOptions); - /** Int64Value value. */ - public value: (number|string); + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Int64Value + * @returns ServiceOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @param message Int64Value + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Int64Value to JSON. + * Converts this ServiceOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a UInt64Value. */ - interface IUInt64Value { + /** Properties of a MethodOptions. */ + interface IMethodOptions { - /** UInt64Value value */ - value?: (number|string|null); + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); } - /** Represents a UInt64Value. */ - class UInt64Value implements IUInt64Value { + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { /** - * Constructs a new UInt64Value. + * Constructs a new MethodOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IUInt64Value); + constructor(properties?: google.protobuf.IMethodOptions); - /** UInt64Value value. */ - public value: (number|string); + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UInt64Value + * @returns MethodOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @param message UInt64Value + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UInt64Value to JSON. + * Converts this MethodOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Int32Value. */ - interface IInt32Value { + namespace MethodOptions { - /** Int32Value value */ - value?: (number|null); + /** IdempotencyLevel enum. */ + type IdempotencyLevel = + "IDEMPOTENCY_UNKNOWN"| "NO_SIDE_EFFECTS"| "IDEMPOTENT"; } - /** Represents an Int32Value. */ - class Int32Value implements IInt32Value { + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { /** - * Constructs a new Int32Value. + * Constructs a new UninterpretedOption. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IInt32Value); + constructor(properties?: google.protobuf.IUninterpretedOption); - /** Int32Value value. */ - public value: number; + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: Uint8Array; + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Int32Value + * @returns UninterpretedOption */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @param message Int32Value + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Int32Value to JSON. + * Converts this UninterpretedOption to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a UInt32Value. */ - interface IUInt32Value { + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { - /** UInt32Value value */ - value?: (number|null); + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); } - /** Represents a UInt32Value. */ - class UInt32Value implements IUInt32Value { + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { /** - * Constructs a new UInt32Value. + * Constructs a new SourceCodeInfo. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IUInt32Value); + constructor(properties?: google.protobuf.ISourceCodeInfo); - /** UInt32Value value. */ - public value: number; + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UInt32Value + * @returns SourceCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @param message UInt32Value + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UInt32Value to JSON. + * Converts this SourceCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BoolValue. */ - interface IBoolValue { + namespace SourceCodeInfo { - /** BoolValue value */ - value?: (boolean|null); - } + /** Properties of a Location. */ + interface ILocation { - /** Represents a BoolValue. */ - class BoolValue implements IBoolValue { + /** Location path */ + path?: (number[]|null); - /** - * Constructs a new BoolValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBoolValue); + /** Location span */ + span?: (number[]|null); - /** BoolValue value. */ - public value: boolean; + /** Location leadingComments */ + leadingComments?: (string|null); - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BoolValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + /** Location trailingComments */ + trailingComments?: (string|null); - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @param message BoolValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } - /** - * Converts this BoolValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Represents a Location. */ + class Location implements ILocation { - /** Properties of a StringValue. */ - interface IStringValue { + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - /** StringValue value */ - value?: (string|null); - } + /** Location path. */ + public path: number[]; - /** Represents a StringValue. */ - class StringValue implements IStringValue { + /** Location span. */ + public span: number[]; - /** - * Constructs a new StringValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStringValue); + /** Location leadingComments. */ + public leadingComments: string; - /** StringValue value. */ - public value: string; + /** Location trailingComments. */ + public trailingComments: string; - /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StringValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; - /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @param message StringValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - /** - * Converts this StringValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Properties of a BytesValue. */ - interface IBytesValue { + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { - /** BytesValue value */ - value?: (Uint8Array|null); + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); } - /** Represents a BytesValue. */ - class BytesValue implements IBytesValue { + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { /** - * Constructs a new BytesValue. + * Constructs a new GeneratedCodeInfo. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IBytesValue); + constructor(properties?: google.protobuf.IGeneratedCodeInfo); - /** BytesValue value. */ - public value: Uint8Array; + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns BytesValue + * @returns GeneratedCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @param message BytesValue + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this BytesValue to JSON. + * Converts this GeneratedCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Any. */ - interface IAny { + namespace GeneratedCodeInfo { - /** Any type_url */ - type_url?: (string|null); + /** Properties of an Annotation. */ + interface IAnnotation { - /** Any value */ - value?: (Uint8Array|null); - } + /** Annotation path */ + path?: (number[]|null); - /** Represents an Any. */ - class Any implements IAny { + /** Annotation sourceFile */ + sourceFile?: (string|null); - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); + /** Annotation begin */ + begin?: (number|null); - /** Any type_url. */ - public type_url: string; + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: google.protobuf.GeneratedCodeInfo.Annotation.Semantic; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Any value. */ - public value: Uint8Array; + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + namespace Annotation { - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Semantic enum. */ + type Semantic = + "NONE"| "SET"| "ALIAS"; + } } /** Properties of a FieldMask. */ @@ -2633,6 +3151,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Duration. */ @@ -2680,6 +3205,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2689,6 +3221,54 @@ export namespace google { /** Namespace v1. */ namespace v1 { + /** Properties of an AggregationResult. */ + interface IAggregationResult { + + /** AggregationResult aggregateFields */ + aggregateFields?: ({ [k: string]: google.firestore.v1.IValue }|null); + } + + /** Represents an AggregationResult. */ + class AggregationResult implements IAggregationResult { + + /** + * Constructs a new AggregationResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.v1.IAggregationResult); + + /** AggregationResult aggregateFields. */ + public aggregateFields: { [k: string]: google.firestore.v1.IValue }; + + /** + * Creates an AggregationResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AggregationResult + */ + public static fromObject(object: { [k: string]: any }): google.firestore.v1.AggregationResult; + + /** + * Creates a plain object from an AggregationResult message. Also converts values to other types if specified. + * @param message AggregationResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.v1.AggregationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AggregationResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AggregationResult + * @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 { @@ -2728,6 +3308,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Precondition. */ @@ -2778,6 +3365,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Precondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TransactionOptions. */ @@ -2828,6 +3422,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransactionOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace TransactionOptions { @@ -2871,6 +3472,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadWrite + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReadOnly. */ @@ -2915,6 +3523,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadOnly + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2975,6 +3590,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Document + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Value. */ @@ -3079,6 +3701,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ArrayValue. */ @@ -3120,6 +3749,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ArrayValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MapValue. */ @@ -3161,6 +3797,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MapValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Represents a Firestore */ @@ -3300,6 +3943,20 @@ export namespace google { */ public runQuery(request: google.firestore.v1.IRunQueryRequest): Promise; + /** + * Calls RunAggregationQuery. + * @param request RunAggregationQueryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RunAggregationQueryResponse + */ + public runAggregationQuery(request: google.firestore.v1.IRunAggregationQueryRequest, callback: google.firestore.v1.Firestore.RunAggregationQueryCallback): void; + + /** + * Calls RunAggregationQuery. + * @param request RunAggregationQueryRequest message or plain object + * @returns Promise + */ + public runAggregationQuery(request: google.firestore.v1.IRunAggregationQueryRequest): Promise; + /** * Calls PartitionQuery. * @param request PartitionQueryRequest message or plain object @@ -3450,6 +4107,13 @@ export namespace google { */ type RunQueryCallback = (error: (Error|null), response?: google.firestore.v1.RunQueryResponse) => void; + /** + * Callback as used by {@link google.firestore.v1.Firestore#runAggregationQuery}. + * @param error Error, if any + * @param [response] RunAggregationQueryResponse + */ + type RunAggregationQueryCallback = (error: (Error|null), response?: google.firestore.v1.RunAggregationQueryResponse) => void; + /** * Callback as used by {@link google.firestore.v1.Firestore#partitionQuery}. * @param error Error, if any @@ -3553,6 +4217,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDocumentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListDocumentsRequest. */ @@ -3645,6 +4316,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDocumentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListDocumentsResponse. */ @@ -3692,6 +4370,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDocumentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateDocumentRequest. */ @@ -3757,6 +4442,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDocumentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateDocumentRequest. */ @@ -3816,6 +4508,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDocumentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteDocumentRequest. */ @@ -3863,6 +4562,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDocumentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BatchGetDocumentsRequest. */ @@ -3937,6 +4643,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchGetDocumentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BatchGetDocumentsResponse. */ @@ -3999,6 +4712,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchGetDocumentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BeginTransactionRequest. */ @@ -4046,6 +4766,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BeginTransactionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BeginTransactionResponse. */ @@ -4087,6 +4814,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BeginTransactionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CommitRequest. */ @@ -4140,6 +4874,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommitRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CommitResponse. */ @@ -4187,6 +4928,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommitResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RollbackRequest. */ @@ -4234,6 +4982,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RollbackRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RunQueryRequest. */ @@ -4305,6 +5060,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunQueryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RunQueryResponse. */ @@ -4373,6 +5135,151 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunQueryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunAggregationQueryRequest. */ + interface IRunAggregationQueryRequest { + + /** RunAggregationQueryRequest parent */ + parent?: (string|null); + + /** RunAggregationQueryRequest structuredAggregationQuery */ + structuredAggregationQuery?: (google.firestore.v1.IStructuredAggregationQuery|null); + + /** RunAggregationQueryRequest transaction */ + transaction?: (Uint8Array|null); + + /** RunAggregationQueryRequest newTransaction */ + newTransaction?: (google.firestore.v1.ITransactionOptions|null); + + /** RunAggregationQueryRequest readTime */ + readTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a RunAggregationQueryRequest. */ + class RunAggregationQueryRequest implements IRunAggregationQueryRequest { + + /** + * Constructs a new RunAggregationQueryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.v1.IRunAggregationQueryRequest); + + /** RunAggregationQueryRequest parent. */ + public parent: string; + + /** RunAggregationQueryRequest structuredAggregationQuery. */ + public structuredAggregationQuery?: (google.firestore.v1.IStructuredAggregationQuery|null); + + /** RunAggregationQueryRequest transaction. */ + public transaction?: (Uint8Array|null); + + /** RunAggregationQueryRequest newTransaction. */ + public newTransaction?: (google.firestore.v1.ITransactionOptions|null); + + /** RunAggregationQueryRequest readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); + + /** RunAggregationQueryRequest queryType. */ + public queryType?: "structuredAggregationQuery"; + + /** RunAggregationQueryRequest consistencySelector. */ + public consistencySelector?: ("transaction"|"newTransaction"|"readTime"); + + /** + * Creates a RunAggregationQueryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunAggregationQueryRequest + */ + public static fromObject(object: { [k: string]: any }): google.firestore.v1.RunAggregationQueryRequest; + + /** + * Creates a plain object from a RunAggregationQueryRequest message. Also converts values to other types if specified. + * @param message RunAggregationQueryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.v1.RunAggregationQueryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunAggregationQueryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunAggregationQueryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RunAggregationQueryResponse. */ + interface IRunAggregationQueryResponse { + + /** RunAggregationQueryResponse result */ + result?: (google.firestore.v1.IAggregationResult|null); + + /** RunAggregationQueryResponse transaction */ + transaction?: (Uint8Array|null); + + /** RunAggregationQueryResponse readTime */ + readTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a RunAggregationQueryResponse. */ + class RunAggregationQueryResponse implements IRunAggregationQueryResponse { + + /** + * Constructs a new RunAggregationQueryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.v1.IRunAggregationQueryResponse); + + /** RunAggregationQueryResponse result. */ + public result?: (google.firestore.v1.IAggregationResult|null); + + /** RunAggregationQueryResponse transaction. */ + public transaction: Uint8Array; + + /** RunAggregationQueryResponse readTime. */ + public readTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a RunAggregationQueryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RunAggregationQueryResponse + */ + public static fromObject(object: { [k: string]: any }): google.firestore.v1.RunAggregationQueryResponse; + + /** + * Creates a plain object from a RunAggregationQueryResponse message. Also converts values to other types if specified. + * @param message RunAggregationQueryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.v1.RunAggregationQueryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RunAggregationQueryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunAggregationQueryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PartitionQueryRequest. */ @@ -4450,6 +5357,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartitionQueryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PartitionQueryResponse. */ @@ -4497,6 +5411,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartitionQueryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WriteRequest. */ @@ -4562,6 +5483,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WriteResponse. */ @@ -4621,6 +5549,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListenRequest. */ @@ -4683,6 +5618,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListenRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListenResponse. */ @@ -4751,6 +5693,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListenResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Target. */ @@ -4828,6 +5777,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Target + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Target { @@ -4871,6 +5827,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentsTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a QueryTarget. */ @@ -4921,6 +5884,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -4987,6 +5957,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace TargetChange { @@ -5056,6 +6033,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCollectionIdsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCollectionIdsResponse. */ @@ -5103,6 +6087,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCollectionIdsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BatchWriteRequest. */ @@ -5156,6 +6147,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchWriteRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BatchWriteResponse. */ @@ -5203,6 +6201,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchWriteResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a StructuredQuery. */ @@ -5286,6 +6291,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StructuredQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace StructuredQuery { @@ -5335,6 +6347,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CollectionSelector + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Filter. */ @@ -5391,6 +6410,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Filter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CompositeFilter. */ @@ -5438,13 +6464,20 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompositeFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CompositeFilter { /** Operator enum. */ type Operator = - "OPERATOR_UNSPECIFIED"| "AND"; + "OPERATOR_UNSPECIFIED"| "AND"| "OR"; } /** Properties of a FieldFilter. */ @@ -5498,6 +6531,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldFilter { @@ -5555,6 +6595,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UnaryFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace UnaryFilter { @@ -5609,6 +6656,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Order + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Direction enum. */ @@ -5654,6 +6708,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Projection. */ @@ -5695,6 +6756,181 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Projection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a StructuredAggregationQuery. */ + interface IStructuredAggregationQuery { + + /** StructuredAggregationQuery structuredQuery */ + structuredQuery?: (google.firestore.v1.IStructuredQuery|null); + + /** StructuredAggregationQuery aggregations */ + aggregations?: (google.firestore.v1.StructuredAggregationQuery.IAggregation[]|null); + } + + /** Represents a StructuredAggregationQuery. */ + class StructuredAggregationQuery implements IStructuredAggregationQuery { + + /** + * Constructs a new StructuredAggregationQuery. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.v1.IStructuredAggregationQuery); + + /** StructuredAggregationQuery structuredQuery. */ + public structuredQuery?: (google.firestore.v1.IStructuredQuery|null); + + /** StructuredAggregationQuery aggregations. */ + public aggregations: google.firestore.v1.StructuredAggregationQuery.IAggregation[]; + + /** StructuredAggregationQuery queryType. */ + public queryType?: "structuredQuery"; + + /** + * Creates a StructuredAggregationQuery message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StructuredAggregationQuery + */ + public static fromObject(object: { [k: string]: any }): google.firestore.v1.StructuredAggregationQuery; + + /** + * Creates a plain object from a StructuredAggregationQuery message. Also converts values to other types if specified. + * @param message StructuredAggregationQuery + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.v1.StructuredAggregationQuery, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StructuredAggregationQuery to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StructuredAggregationQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StructuredAggregationQuery { + + /** Properties of an Aggregation. */ + interface IAggregation { + + /** Aggregation count */ + count?: (google.firestore.v1.StructuredAggregationQuery.Aggregation.ICount|null); + + /** Aggregation alias */ + alias?: (string|null); + } + + /** Represents an Aggregation. */ + class Aggregation implements IAggregation { + + /** + * Constructs a new Aggregation. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.v1.StructuredAggregationQuery.IAggregation); + + /** Aggregation count. */ + public count?: (google.firestore.v1.StructuredAggregationQuery.Aggregation.ICount|null); + + /** Aggregation alias. */ + public alias: string; + + /** Aggregation operator. */ + public operator?: "count"; + + /** + * Creates an Aggregation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Aggregation + */ + public static fromObject(object: { [k: string]: any }): google.firestore.v1.StructuredAggregationQuery.Aggregation; + + /** + * Creates a plain object from an Aggregation message. Also converts values to other types if specified. + * @param message Aggregation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.v1.StructuredAggregationQuery.Aggregation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Aggregation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Aggregation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Aggregation { + + /** Properties of a Count. */ + interface ICount { + + /** Count upTo */ + upTo?: (google.protobuf.IInt64Value|null); + } + + /** Represents a Count. */ + class Count implements ICount { + + /** + * Constructs a new Count. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.v1.StructuredAggregationQuery.Aggregation.ICount); + + /** Count upTo. */ + public upTo?: (google.protobuf.IInt64Value|null); + + /** + * Creates a Count message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Count + */ + public static fromObject(object: { [k: string]: any }): google.firestore.v1.StructuredAggregationQuery.Aggregation.Count; + + /** + * Creates a plain object from a Count message. Also converts values to other types if specified. + * @param message Count + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.v1.StructuredAggregationQuery.Aggregation.Count, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Count to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Count + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } @@ -5743,6 +6979,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Cursor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Write. */ @@ -5817,6 +7060,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Write + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DocumentTransform. */ @@ -5864,6 +7114,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentTransform + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DocumentTransform { @@ -5946,6 +7203,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldTransform + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldTransform { @@ -6001,6 +7265,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DocumentChange. */ @@ -6054,6 +7325,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DocumentDelete. */ @@ -6107,6 +7385,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentDelete + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DocumentRemove. */ @@ -6147,78 +7432,221 @@ export namespace google { */ public static fromObject(object: { [k: string]: any }): google.firestore.v1.DocumentRemove; - /** - * Creates a plain object from a DocumentRemove message. Also converts values to other types if specified. - * @param message DocumentRemove - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.v1.DocumentRemove, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a DocumentRemove message. Also converts values to other types if specified. + * @param message DocumentRemove + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.v1.DocumentRemove, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DocumentRemove to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentRemove + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExistenceFilter. */ + interface IExistenceFilter { + + /** ExistenceFilter targetId */ + targetId?: (number|null); + + /** ExistenceFilter count */ + count?: (number|null); + } + + /** Represents an ExistenceFilter. */ + class ExistenceFilter implements IExistenceFilter { + + /** + * Constructs a new ExistenceFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.v1.IExistenceFilter); + + /** ExistenceFilter targetId. */ + public targetId: number; + + /** ExistenceFilter count. */ + public count: number; + + /** + * Creates an ExistenceFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExistenceFilter + */ + public static fromObject(object: { [k: string]: any }): google.firestore.v1.ExistenceFilter; + + /** + * Creates a plain object from an ExistenceFilter message. Also converts values to other types if specified. + * @param message ExistenceFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.v1.ExistenceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExistenceFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExistenceFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of a LatLng. */ + interface ILatLng { + + /** LatLng latitude */ + latitude?: (number|null); + + /** LatLng longitude */ + longitude?: (number|null); + } + + /** Represents a LatLng. */ + class LatLng implements ILatLng { + + /** + * Constructs a new LatLng. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.ILatLng); + + /** LatLng latitude. */ + public latitude: number; + + /** LatLng longitude. */ + public longitude: number; + + /** + * Creates a LatLng message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LatLng + */ + public static fromObject(object: { [k: string]: any }): google.type.LatLng; + + /** + * Creates a plain object from a LatLng message. Also converts values to other types if specified. + * @param message LatLng + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.LatLng, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LatLng to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LatLng + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); - /** - * Converts this DocumentRemove to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Status message */ + message?: (string|null); - /** Properties of an ExistenceFilter. */ - interface IExistenceFilter { + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } - /** ExistenceFilter targetId */ - targetId?: (number|null); + /** Represents a Status. */ + class Status implements IStatus { - /** ExistenceFilter count */ - count?: (number|null); - } + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); - /** Represents an ExistenceFilter. */ - class ExistenceFilter implements IExistenceFilter { + /** Status code. */ + public code: number; - /** - * Constructs a new ExistenceFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.v1.IExistenceFilter); + /** Status message. */ + public message: string; - /** ExistenceFilter targetId. */ - public targetId: number; + /** Status details. */ + public details: google.protobuf.IAny[]; - /** ExistenceFilter count. */ - public count: number; + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; - /** - * Creates an ExistenceFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExistenceFilter - */ - public static fromObject(object: { [k: string]: any }): google.firestore.v1.ExistenceFilter; + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from an ExistenceFilter message. Also converts values to other types if specified. - * @param message ExistenceFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.v1.ExistenceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this ExistenceFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } /** Namespace api. */ namespace api { + /** FieldBehavior enum. */ + type FieldBehavior = + "FIELD_BEHAVIOR_UNSPECIFIED"| "OPTIONAL"| "REQUIRED"| "OUTPUT_ONLY"| "INPUT_ONLY"| "IMMUTABLE"| "UNORDERED_LIST"| "NON_EMPTY_DEFAULT"; + /** Properties of a Http. */ interface IHttp { /** Http rules */ rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); } /** Represents a Http. */ @@ -6233,6 +7661,9 @@ export namespace google { /** Http rules. */ public rules: google.api.IHttpRule[]; + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + /** * Creates a Http message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -6253,11 +7684,21 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HttpRule. */ interface IHttpRule { + /** HttpRule selector */ + selector?: (string|null); + /** HttpRule get */ get?: (string|null); @@ -6276,12 +7717,12 @@ export namespace google { /** HttpRule custom */ custom?: (google.api.ICustomHttpPattern|null); - /** HttpRule selector */ - selector?: (string|null); - /** HttpRule body */ body?: (string|null); + /** HttpRule responseBody */ + responseBody?: (string|null); + /** HttpRule additionalBindings */ additionalBindings?: (google.api.IHttpRule[]|null); } @@ -6295,6 +7736,9 @@ export namespace google { */ constructor(properties?: google.api.IHttpRule); + /** HttpRule selector. */ + public selector: string; + /** HttpRule get. */ public get?: (string|null); @@ -6313,12 +7757,12 @@ export namespace google { /** HttpRule custom. */ public custom?: (google.api.ICustomHttpPattern|null); - /** HttpRule selector. */ - public selector: string; - /** HttpRule body. */ public body: string; + /** HttpRule responseBody. */ + public responseBody: string; + /** HttpRule additionalBindings. */ public additionalBindings: google.api.IHttpRule[]; @@ -6345,6 +7789,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CustomHttpPattern. */ @@ -6392,11 +7843,14 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - /** FieldBehavior enum. */ - type FieldBehavior = - "FIELD_BEHAVIOR_UNSPECIFIED"| "OPTIONAL"| "REQUIRED"| "OUTPUT_ONLY"| "INPUT_ONLY"| "IMMUTABLE"| "UNORDERED_LIST"| "NON_EMPTY_DEFAULT"; + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } /** Properties of a ResourceDescriptor. */ interface IResourceDescriptor { @@ -6473,6 +7927,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ResourceDescriptor { @@ -6531,114 +7992,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - } - - /** Namespace type. */ - namespace type { - - /** Properties of a LatLng. */ - interface ILatLng { - - /** LatLng latitude */ - latitude?: (number|null); - - /** LatLng longitude */ - longitude?: (number|null); - } - - /** Represents a LatLng. */ - class LatLng implements ILatLng { - - /** - * Constructs a new LatLng. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.ILatLng); - - /** LatLng latitude. */ - public latitude: number; - - /** LatLng longitude. */ - public longitude: number; - - /** - * Creates a LatLng message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LatLng - */ - public static fromObject(object: { [k: string]: any }): google.type.LatLng; - - /** - * Creates a plain object from a LatLng message. Also converts values to other types if specified. - * @param message LatLng - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.LatLng, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LatLng to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Status to JSON. - * @returns JSON object + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public toJSON(): { [k: string]: any }; + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -6831,6 +8191,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetOperationRequest. */ @@ -6872,6 +8239,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsRequest. */ @@ -6931,6 +8305,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsResponse. */ @@ -6978,6 +8359,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CancelOperationRequest. */ @@ -7019,6 +8407,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteOperationRequest. */ @@ -7060,6 +8455,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WaitOperationRequest. */ @@ -7107,6 +8509,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationInfo. */ @@ -7154,6 +8563,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } diff --git a/dev/protos/firestore_v1_proto_api.js b/dev/protos/firestore_v1_proto_api.js index 81a2618f1..144dc4ea3 100644 --- a/dev/protos/firestore_v1_proto_api.js +++ b/dev/protos/firestore_v1_proto_api.js @@ -125,6 +125,12 @@ message.structuredQuery = $root.google.firestore.v1.StructuredQuery.fromObject(object.structuredQuery); } switch (object.limitType) { + default: + if (typeof object.limitType === "number") { + message.limitType = object.limitType; + break; + } + break; case "FIRST": case 0: message.limitType = 0; @@ -162,7 +168,7 @@ object.queryType = "structuredQuery"; } if (message.limitType != null && message.hasOwnProperty("limitType")) - object.limitType = options.enums === String ? $root.firestore.BundledQuery.LimitType[message.limitType] : message.limitType; + object.limitType = options.enums === String ? $root.firestore.BundledQuery.LimitType[message.limitType] === undefined ? message.limitType : $root.firestore.BundledQuery.LimitType[message.limitType] : message.limitType; return object; }; @@ -177,6 +183,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BundledQuery + * @function getTypeUrl + * @memberof firestore.BundledQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BundledQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/firestore.BundledQuery"; + }; + /** * LimitType enum. * @name firestore.BundledQuery.LimitType @@ -309,6 +330,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for NamedQuery + * @function getTypeUrl + * @memberof firestore.NamedQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamedQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/firestore.NamedQuery"; + }; + return NamedQuery; })(); @@ -448,6 +484,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BundledDocumentMetadata + * @function getTypeUrl + * @memberof firestore.BundledDocumentMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BundledDocumentMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/firestore.BundledDocumentMetadata"; + }; + return BundledDocumentMetadata; })(); @@ -605,6 +656,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BundleMetadata + * @function getTypeUrl + * @memberof firestore.BundleMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BundleMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/firestore.BundleMetadata"; + }; + return BundleMetadata; })(); @@ -763,6 +829,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BundleElement + * @function getTypeUrl + * @memberof firestore.BundleElement + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BundleElement.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/firestore.BundleElement"; + }; + return BundleElement; })(); @@ -896,6 +977,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + return Timestamp; })(); @@ -992,6 +1088,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Struct + * @function getTypeUrl + * @memberof google.protobuf.Struct + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Struct"; + }; + return Struct; })(); @@ -1099,6 +1210,12 @@ return object; var message = new $root.google.protobuf.Value(); switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } + break; case "NULL_VALUE": case 0: message.nullValue = 0; @@ -1137,7 +1254,7 @@ options = {}; var object = {}; if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; if (options.oneofs) object.kind = "nullValue"; } @@ -1180,6 +1297,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.protobuf.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Value"; + }; + return Value; })(); @@ -1287,28 +1419,41 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListValue + * @function getTypeUrl + * @memberof google.protobuf.ListValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ListValue"; + }; + return ListValue; })(); - protobuf.FileDescriptorSet = (function() { + protobuf.Empty = (function() { /** - * Properties of a FileDescriptorSet. + * Properties of an Empty. * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * @interface IEmpty */ /** - * Constructs a new FileDescriptorSet. + * Constructs a new Empty. * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet + * @classdesc Represents an Empty. + * @implements IEmpty * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - function FileDescriptorSet(properties) { - this.file = []; + function Empty(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1316,111 +1461,79 @@ } /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.Empty} Empty */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; + return new $root.google.protobuf.Empty(); }; /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * Creates a plain object from an Empty message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {google.protobuf.Empty} message Empty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; + Empty.toObject = function toObject() { + return {}; }; /** - * Converts this FileDescriptorSet to JSON. + * Converts this Empty to JSON. * @function toJSON - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.Empty * @instance * @returns {Object.} JSON object */ - FileDescriptorSet.prototype.toJSON = function toJSON() { + Empty.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FileDescriptorSet; + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; })(); - protobuf.FileDescriptorProto = (function() { + protobuf.DoubleValue = (function() { /** - * Properties of a FileDescriptorProto. + * Properties of a DoubleValue. * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value */ /** - * Constructs a new FileDescriptorProto. + * Constructs a new DoubleValue. * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; + function DoubleValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1428,319 +1541,195 @@ } /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue * @instance */ - FileDescriptorProto.prototype.name = ""; + DoubleValue.prototype.value = 0; /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DoubleValue} DoubleValue */ - FileDescriptorProto.prototype["package"] = ""; + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) + return object; + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; + DoubleValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto + * Converts this DoubleValue to JSON. + * @function toJSON + * @memberof google.protobuf.DoubleValue * @instance + * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + DoubleValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; + return DoubleValue; + })(); - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; + protobuf.FloatValue = (function() { /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Properties of a FloatValue. + * @memberof google.protobuf + * @interface IFloatValue + * @property {number|null} [value] FloatValue value */ - FileDescriptorProto.prototype.options = null; /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance + * Constructs a new FloatValue. + * @memberof google.protobuf + * @classdesc Represents a FloatValue. + * @implements IFloatValue + * @constructor + * @param {google.protobuf.IFloatValue=} [properties] Properties to set */ - FileDescriptorProto.prototype.sourceCodeInfo = null; + function FloatValue(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]]; + } /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue * @instance */ - FileDescriptorProto.prototype.syntax = ""; + FloatValue.prototype.value = 0; /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.FloatValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.FloatValue} FloatValue */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); return message; }; /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.FloatValue * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {google.protobuf.FloatValue} message FloatValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + FloatValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; /** - * Converts this FileDescriptorProto to JSON. + * Converts this FloatValue to JSON. * @function toJSON - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.FloatValue * @instance * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.toJSON = function toJSON() { + FloatValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FileDescriptorProto; + /** + * Gets the default type url for FloatValue + * @function getTypeUrl + * @memberof google.protobuf.FloatValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FloatValue"; + }; + + return FloatValue; })(); - protobuf.DescriptorProto = (function() { + protobuf.Int64Value = (function() { /** - * Properties of a DescriptorProto. + * Properties of an Int64Value. * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @interface IInt64Value + * @property {number|string|null} [value] Int64Value value */ /** - * Constructs a new DescriptorProto. + * Constructs a new Int64Value. * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto + * @classdesc Represents an Int64Value. + * @implements IInt64Value * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IInt64Value=} [properties] Properties to set */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; + function Int64Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1748,495 +1737,321 @@ } /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto + * Int64Value value. + * @member {number|string} value + * @memberof google.protobuf.Int64Value * @instance */ - DescriptorProto.prototype.name = ""; + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int64Value} Int64Value */ - DescriptorProto.prototype.field = $util.emptyArray; + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) + return object; + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + return message; + }; /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.Int64Value} message Int64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - DescriptorProto.prototype.extension = $util.emptyArray; + Int64Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + return object; + }; /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto + * Converts this Int64Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int64Value * @instance + * @returns {Object.} JSON object */ - DescriptorProto.prototype.nestedType = $util.emptyArray; + Int64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance + * Gets the default type url for Int64Value + * @function getTypeUrl + * @memberof google.protobuf.Int64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - DescriptorProto.prototype.enumType = $util.emptyArray; + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int64Value"; + }; + + return Int64Value; + })(); + + protobuf.UInt64Value = (function() { /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance + * Properties of a UInt64Value. + * @memberof google.protobuf + * @interface IUInt64Value + * @property {number|string|null} [value] UInt64Value value */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance + * Constructs a new UInt64Value. + * @memberof google.protobuf + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value + * @constructor + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; + function UInt64Value(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]]; + } /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto + * UInt64Value value. + * @member {number|string} value + * @memberof google.protobuf.UInt64Value * @instance */ - DescriptorProto.prototype.options = null; + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt64Value} UInt64Value */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) + return object; + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + return message; + }; /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt64Value + * @static + * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UInt64Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + return object; + }; + + /** + * Converts this UInt64Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt64Value * @instance + * @returns {Object.} JSON object */ - DescriptorProto.prototype.reservedName = $util.emptyArray; + UInt64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto + * Gets the default type url for UInt64Value + * @function getTypeUrl + * @memberof google.protobuf.UInt64Value * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.UInt64Value"; + }; + + return UInt64Value; + })(); + + protobuf.Int32Value = (function() { + + /** + * Properties of an Int32Value. + * @memberof google.protobuf + * @interface IInt32Value + * @property {number|null} [value] Int32Value value + */ + + /** + * Constructs a new Int32Value. + * @memberof google.protobuf + * @classdesc Represents an Int32Value. + * @implements IInt32Value + * @constructor + * @param {google.protobuf.IInt32Value=} [properties] Properties to set + */ + function Int32Value(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]]; + } + + /** + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value + * @instance + */ + Int32Value.prototype.value = 0; + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int32Value} Int32Value + */ + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) + return object; + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; return message; }; /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.Int32Value * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {google.protobuf.Int32Value} message Int32Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { + Int32Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this DescriptorProto to JSON. + * Converts this Int32Value to JSON. * @function toJSON - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.Int32Value * @instance * @returns {Object.} JSON object */ - DescriptorProto.prototype.toJSON = function toJSON() { + Int32Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(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]]; + /** + * Gets the default type url for Int32Value + * @function getTypeUrl + * @memberof google.protobuf.Int32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.Int32Value"; + }; - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; + return Int32Value; + })(); - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; + protobuf.UInt32Value = (function() { - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(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]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - */ + /** + * Properties of a UInt32Value. + * @memberof google.protobuf + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value + */ /** - * Constructs a new FieldDescriptorProto. + * Constructs a new UInt32Value. * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set */ - function FieldDescriptorProto(properties) { + function UInt32Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2244,350 +2059,195 @@ } /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value * @instance */ - FieldDescriptorProto.prototype.name = ""; + UInt32Value.prototype.value = 0; /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UInt32Value} UInt32Value */ - FieldDescriptorProto.prototype.number = 0; + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) + return object; + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; + return message; + }; /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UInt32Value + * @static + * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - FieldDescriptorProto.prototype.label = 1; + UInt32Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto + * Converts this UInt32Value to JSON. + * @function toJSON + * @memberof google.protobuf.UInt32Value * @instance + * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.type = 1; + UInt32Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Gets the default type url for UInt32Value + * @function getTypeUrl + * @memberof google.protobuf.UInt32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - FieldDescriptorProto.prototype.typeName = ""; + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt32Value"; + }; - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; + return UInt32Value; + })(); - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; + protobuf.BoolValue = (function() { /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Properties of a BoolValue. + * @memberof google.protobuf + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value */ - FieldDescriptorProto.prototype.oneofIndex = 0; /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Constructs a new BoolValue. + * @memberof google.protobuf + * @classdesc Represents a BoolValue. + * @implements IBoolValue + * @constructor + * @param {google.protobuf.IBoolValue=} [properties] Properties to set */ - FieldDescriptorProto.prototype.jsonName = ""; + function BoolValue(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]]; + } /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue * @instance */ - FieldDescriptorProto.prototype.options = null; + BoolValue.prototype.value = false; /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.BoolValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.BoolValue} BoolValue */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - } - switch (object.type) { - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); return message; }; /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.BoolValue * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {google.protobuf.BoolValue} message BoolValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options) { + BoolValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this FieldDescriptorProto to JSON. + * Converts this BoolValue to JSON. * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.BoolValue * @instance * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { + BoolValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {string} - * @property {string} TYPE_DOUBLE=TYPE_DOUBLE TYPE_DOUBLE value - * @property {string} TYPE_FLOAT=TYPE_FLOAT TYPE_FLOAT value - * @property {string} TYPE_INT64=TYPE_INT64 TYPE_INT64 value - * @property {string} TYPE_UINT64=TYPE_UINT64 TYPE_UINT64 value - * @property {string} TYPE_INT32=TYPE_INT32 TYPE_INT32 value - * @property {string} TYPE_FIXED64=TYPE_FIXED64 TYPE_FIXED64 value - * @property {string} TYPE_FIXED32=TYPE_FIXED32 TYPE_FIXED32 value - * @property {string} TYPE_BOOL=TYPE_BOOL TYPE_BOOL value - * @property {string} TYPE_STRING=TYPE_STRING TYPE_STRING value - * @property {string} TYPE_GROUP=TYPE_GROUP TYPE_GROUP value - * @property {string} TYPE_MESSAGE=TYPE_MESSAGE TYPE_MESSAGE value - * @property {string} TYPE_BYTES=TYPE_BYTES TYPE_BYTES value - * @property {string} TYPE_UINT32=TYPE_UINT32 TYPE_UINT32 value - * @property {string} TYPE_ENUM=TYPE_ENUM TYPE_ENUM value - * @property {string} TYPE_SFIXED32=TYPE_SFIXED32 TYPE_SFIXED32 value - * @property {string} TYPE_SFIXED64=TYPE_SFIXED64 TYPE_SFIXED64 value - * @property {string} TYPE_SINT32=TYPE_SINT32 TYPE_SINT32 value - * @property {string} TYPE_SINT64=TYPE_SINT64 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = "TYPE_DOUBLE"; - values[valuesById[2] = "TYPE_FLOAT"] = "TYPE_FLOAT"; - values[valuesById[3] = "TYPE_INT64"] = "TYPE_INT64"; - values[valuesById[4] = "TYPE_UINT64"] = "TYPE_UINT64"; - values[valuesById[5] = "TYPE_INT32"] = "TYPE_INT32"; - values[valuesById[6] = "TYPE_FIXED64"] = "TYPE_FIXED64"; - values[valuesById[7] = "TYPE_FIXED32"] = "TYPE_FIXED32"; - values[valuesById[8] = "TYPE_BOOL"] = "TYPE_BOOL"; - values[valuesById[9] = "TYPE_STRING"] = "TYPE_STRING"; - values[valuesById[10] = "TYPE_GROUP"] = "TYPE_GROUP"; - values[valuesById[11] = "TYPE_MESSAGE"] = "TYPE_MESSAGE"; - values[valuesById[12] = "TYPE_BYTES"] = "TYPE_BYTES"; - values[valuesById[13] = "TYPE_UINT32"] = "TYPE_UINT32"; - values[valuesById[14] = "TYPE_ENUM"] = "TYPE_ENUM"; - values[valuesById[15] = "TYPE_SFIXED32"] = "TYPE_SFIXED32"; - values[valuesById[16] = "TYPE_SFIXED64"] = "TYPE_SFIXED64"; - values[valuesById[17] = "TYPE_SINT32"] = "TYPE_SINT32"; - values[valuesById[18] = "TYPE_SINT64"] = "TYPE_SINT64"; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {string} - * @property {string} LABEL_OPTIONAL=LABEL_OPTIONAL LABEL_OPTIONAL value - * @property {string} LABEL_REQUIRED=LABEL_REQUIRED LABEL_REQUIRED value - * @property {string} LABEL_REPEATED=LABEL_REPEATED LABEL_REPEATED value + * Gets the default type url for BoolValue + * @function getTypeUrl + * @memberof google.protobuf.BoolValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = "LABEL_OPTIONAL"; - values[valuesById[2] = "LABEL_REQUIRED"] = "LABEL_REQUIRED"; - values[valuesById[3] = "LABEL_REPEATED"] = "LABEL_REPEATED"; - return values; - })(); + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BoolValue"; + }; - return FieldDescriptorProto; + return BoolValue; })(); - protobuf.OneofDescriptorProto = (function() { + protobuf.StringValue = (function() { /** - * Properties of an OneofDescriptorProto. + * Properties of a StringValue. * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + * @interface IStringValue + * @property {string|null} [value] StringValue value */ /** - * Constructs a new OneofDescriptorProto. + * Constructs a new StringValue. * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto + * @classdesc Represents a StringValue. + * @implements IStringValue * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IStringValue=} [properties] Properties to set */ - function OneofDescriptorProto(properties) { + function StringValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2595,102 +2255,97 @@ } /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue * @instance */ - OneofDescriptorProto.prototype.options = null; + StringValue.prototype.value = ""; /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.StringValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @returns {google.protobuf.StringValue} StringValue */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); return message; }; /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a StringValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.StringValue * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {google.protobuf.StringValue} message StringValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofDescriptorProto.toObject = function toObject(message, options) { + StringValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this OneofDescriptorProto to JSON. + * Converts this StringValue to JSON. * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.StringValue * @instance * @returns {Object.} JSON object */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { + StringValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OneofDescriptorProto; + /** + * Gets the default type url for StringValue + * @function getTypeUrl + * @memberof google.protobuf.StringValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.StringValue"; + }; + + return StringValue; })(); - protobuf.EnumDescriptorProto = (function() { + protobuf.BytesValue = (function() { /** - * Properties of an EnumDescriptorProto. + * Properties of a BytesValue. * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value */ /** - * Constructs a new EnumDescriptorProto. + * Constructs a new BytesValue. * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto + * @classdesc Represents a BytesValue. + * @implements IBytesValue * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IBytesValue=} [properties] Properties to set */ - function EnumDescriptorProto(properties) { - this.value = []; + function BytesValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2698,126 +2353,107 @@ } /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue * @instance */ - EnumDescriptorProto.prototype.options = null; + BytesValue.prototype.value = $util.newBuffer([]); /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.BytesValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.BytesValue} BytesValue */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } + var message = new $root.google.protobuf.BytesValue(); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; return message; }; /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.BytesValue * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {google.protobuf.BytesValue} message BytesValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options) { + BytesValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.value = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this EnumDescriptorProto to JSON. + * Converts this BytesValue to JSON. * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.BytesValue * @instance * @returns {Object.} JSON object */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { + BytesValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EnumDescriptorProto; + /** + * Gets the default type url for BytesValue + * @function getTypeUrl + * @memberof google.protobuf.BytesValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BytesValue"; + }; + + return BytesValue; })(); - protobuf.EnumValueDescriptorProto = (function() { + protobuf.Any = (function() { /** - * Properties of an EnumValueDescriptorProto. + * Properties of an Any. * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value */ /** - * Constructs a new EnumValueDescriptorProto. + * Constructs a new Any. * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto + * @classdesc Represents an Any. + * @implements IAny * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IAny=} [properties] Properties to set */ - function EnumValueDescriptorProto(properties) { + function Any(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2825,115 +2461,121 @@ } /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - EnumValueDescriptorProto.prototype.name = ""; + Any.prototype.type_url = ""; /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any * @instance */ - EnumValueDescriptorProto.prototype.number = 0; + Any.prototype.value = $util.newBuffer([]); /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.Any} Any */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; return message; }; /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { + Any.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this EnumValueDescriptorProto to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EnumValueDescriptorProto; + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; })(); - protobuf.ServiceDescriptorProto = (function() { + protobuf.FileDescriptorSet = (function() { /** - * Properties of a ServiceDescriptorProto. + * Properties of a FileDescriptorSet. * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file */ /** - * Constructs a new ServiceDescriptorProto. + * Constructs a new FileDescriptorSet. * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set */ - function ServiceDescriptorProto(properties) { - this.method = []; + function FileDescriptorSet(properties) { + this.file = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2941,129 +2583,127 @@ } /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet * @instance */ - ServiceDescriptorProto.prototype.options = null; + FileDescriptorSet.prototype.file = $util.emptyArray; /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); } } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } return message; }; /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + FileDescriptorSet.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); return object; }; /** - * Converts this ServiceDescriptorProto to JSON. + * Converts this FileDescriptorSet to JSON. * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.FileDescriptorSet * @instance * @returns {Object.} JSON object */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { + FileDescriptorSet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ServiceDescriptorProto; + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; })(); - protobuf.MethodDescriptorProto = (function() { + protobuf.FileDescriptorProto = (function() { /** - * Properties of a MethodDescriptorProto. + * Properties of a FileDescriptorProto. * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition */ /** - * Constructs a new MethodDescriptorProto. + * Constructs a new FileDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set */ - function MethodDescriptorProto(properties) { + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3071,168 +2711,347 @@ } /** - * MethodDescriptorProto name. + * FileDescriptorProto name. * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FileDescriptorProto * @instance */ - MethodDescriptorProto.prototype.name = ""; + FileDescriptorProto.prototype.name = ""; /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto * @instance */ - MethodDescriptorProto.prototype.inputType = ""; + FileDescriptorProto.prototype["package"] = ""; /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto * @instance */ - MethodDescriptorProto.prototype.outputType = ""; + FileDescriptorProto.prototype.dependency = $util.emptyArray; /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto * @instance */ - MethodDescriptorProto.prototype.options = null; + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto * @instance */ - MethodDescriptorProto.prototype.clientStreaming = false; + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto * @instance */ - MethodDescriptorProto.prototype.serverStreaming = false; + FileDescriptorProto.prototype.messageType = $util.emptyArray; /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = ""; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FileDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); + var message = new $root.google.protobuf.FileDescriptorProto(); if (object.name != null) message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } if (object.options != null) { if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + FileDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + } if (options.defaults) { object.name = ""; - object.inputType = ""; - object.outputType = ""; + object["package"] = ""; object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; return object; }; /** - * Converts this MethodDescriptorProto to JSON. + * Converts this FileDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.FileDescriptorProto * @instance * @returns {Object.} JSON object */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { + FileDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MethodDescriptorProto; + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; })(); - protobuf.FileOptions = (function() { + protobuf.DescriptorProto = (function() { /** - * Properties of a FileOptions. + * Properties of a DescriptorProto. * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName */ /** - * Constructs a new FileOptions. + * Constructs a new DescriptorProto. * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3240,510 +3059,668 @@ } /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto * @instance */ - FileOptions.prototype.goPackage = ""; + DescriptorProto.prototype.name = ""; /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto * @instance */ - FileOptions.prototype.ccGenericServices = false; + DescriptorProto.prototype.field = $util.emptyArray; /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto * @instance */ - FileOptions.prototype.javaGenericServices = false; + DescriptorProto.prototype.extension = $util.emptyArray; /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto * @instance */ - FileOptions.prototype.pyGenericServices = false; + DescriptorProto.prototype.nestedType = $util.emptyArray; /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto * @instance */ - FileOptions.prototype.deprecated = false; + DescriptorProto.prototype.enumType = $util.emptyArray; /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto * @instance */ - FileOptions.prototype.ccEnableArenas = false; + DescriptorProto.prototype.extensionRange = $util.emptyArray; /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto * @instance */ - FileOptions.prototype.objcClassPrefix = ""; + DescriptorProto.prototype.oneofDecl = $util.emptyArray; /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto * @instance */ - FileOptions.prototype.csharpNamespace = ""; + DescriptorProto.prototype.options = null; /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto * @instance */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; + DescriptorProto.prototype.reservedRange = $util.emptyArray; /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto * @instance */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + DescriptorProto.prototype.reservedName = $util.emptyArray; /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.DescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.DescriptorProto} DescriptorProto */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); } } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); } } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } return message; }; /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.FileOptions} message FileOptions + * @param {google.protobuf.DescriptorProto} message DescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options) { + DescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; } if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = false; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; + object.name = ""; + object.options = null; } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; } return object; }; /** - * Converts this FileOptions to JSON. + * Converts this DescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.DescriptorProto * @instance * @returns {Object.} JSON object */ - FileOptions.prototype.toJSON = function toJSON() { + DescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {string} - * @property {string} SPEED=SPEED SPEED value - * @property {string} CODE_SIZE=CODE_SIZE CODE_SIZE value - * @property {string} LITE_RUNTIME=LITE_RUNTIME LITE_RUNTIME value + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = "SPEED"; - values[valuesById[2] = "CODE_SIZE"] = "CODE_SIZE"; - values[valuesById[3] = "LITE_RUNTIME"] = "LITE_RUNTIME"; - return values; - })(); + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; - return FileOptions; - })(); + DescriptorProto.ExtensionRange = (function() { - protobuf.MessageOptions = (function() { + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(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]]; + } - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(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]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption */ - MessageOptions.prototype.mapEntry = false; /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions * @instance */ - MessageOptions.prototype[".google.api.resource"] = null; + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.ExtensionRangeOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); + var message = new $root.google.protobuf.ExtensionRangeOptions(); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } return message; }; /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageOptions.toObject = function toObject(message, options) { + ExtensionRangeOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); return object; }; /** - * Converts this MessageOptions to JSON. + * Converts this ExtensionRangeOptions to JSON. * @function toJSON - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.ExtensionRangeOptions * @instance * @returns {Object.} JSON object */ - MessageOptions.prototype.toJSON = function toJSON() { + ExtensionRangeOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MessageOptions; + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + return ExtensionRangeOptions; })(); - protobuf.FieldOptions = (function() { + protobuf.FieldDescriptorProto = (function() { /** - * Properties of a FieldOptions. + * Properties of a FieldDescriptorProto. * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional */ /** - * Constructs a new FieldOptions. + * Constructs a new FieldDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set */ - function FieldOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; + function FieldDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3751,302 +3728,512 @@ } /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - FieldOptions.prototype.ctype = 0; + FieldDescriptorProto.prototype.name = ""; /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - FieldOptions.prototype.packed = false; + FieldDescriptorProto.prototype.number = 0; /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - FieldOptions.prototype.jstype = 0; + FieldDescriptorProto.prototype.label = 1; /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - FieldOptions.prototype.lazy = false; + FieldDescriptorProto.prototype.type = 1; /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - FieldOptions.prototype.deprecated = false; + FieldDescriptorProto.prototype.typeName = ""; /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - FieldOptions.prototype.weak = false; + FieldDescriptorProto.prototype.extendee = ""; /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + FieldDescriptorProto.prototype.defaultValue = ""; /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + FieldDescriptorProto.prototype.oneofIndex = 0; /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + FieldDescriptorProto.prototype.jsonName = ""; /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - case "STRING": - case 0: - message.ctype = 0; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } break; - case "CORD": + case "LABEL_OPTIONAL": case 1: - message.ctype = 1; + message.label = 1; break; - case "STRING_PIECE": + case "LABEL_REQUIRED": case 2: - message.ctype = 2; + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; break; } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - case "JS_NORMAL": - case 0: - message.jstype = 0; + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } break; - case "JS_STRING": + case "TYPE_DOUBLE": case 1: - message.jstype = 1; + message.type = 1; break; - case "JS_NUMBER": + case "TYPE_FLOAT": case 2: - message.jstype = 2; + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; break; } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {string} + * @property {string} TYPE_DOUBLE=TYPE_DOUBLE TYPE_DOUBLE value + * @property {string} TYPE_FLOAT=TYPE_FLOAT TYPE_FLOAT value + * @property {string} TYPE_INT64=TYPE_INT64 TYPE_INT64 value + * @property {string} TYPE_UINT64=TYPE_UINT64 TYPE_UINT64 value + * @property {string} TYPE_INT32=TYPE_INT32 TYPE_INT32 value + * @property {string} TYPE_FIXED64=TYPE_FIXED64 TYPE_FIXED64 value + * @property {string} TYPE_FIXED32=TYPE_FIXED32 TYPE_FIXED32 value + * @property {string} TYPE_BOOL=TYPE_BOOL TYPE_BOOL value + * @property {string} TYPE_STRING=TYPE_STRING TYPE_STRING value + * @property {string} TYPE_GROUP=TYPE_GROUP TYPE_GROUP value + * @property {string} TYPE_MESSAGE=TYPE_MESSAGE TYPE_MESSAGE value + * @property {string} TYPE_BYTES=TYPE_BYTES TYPE_BYTES value + * @property {string} TYPE_UINT32=TYPE_UINT32 TYPE_UINT32 value + * @property {string} TYPE_ENUM=TYPE_ENUM TYPE_ENUM value + * @property {string} TYPE_SFIXED32=TYPE_SFIXED32 TYPE_SFIXED32 value + * @property {string} TYPE_SFIXED64=TYPE_SFIXED64 TYPE_SFIXED64 value + * @property {string} TYPE_SINT32=TYPE_SINT32 TYPE_SINT32 value + * @property {string} TYPE_SINT64=TYPE_SINT64 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = "TYPE_DOUBLE"; + values[valuesById[2] = "TYPE_FLOAT"] = "TYPE_FLOAT"; + values[valuesById[3] = "TYPE_INT64"] = "TYPE_INT64"; + values[valuesById[4] = "TYPE_UINT64"] = "TYPE_UINT64"; + values[valuesById[5] = "TYPE_INT32"] = "TYPE_INT32"; + values[valuesById[6] = "TYPE_FIXED64"] = "TYPE_FIXED64"; + values[valuesById[7] = "TYPE_FIXED32"] = "TYPE_FIXED32"; + values[valuesById[8] = "TYPE_BOOL"] = "TYPE_BOOL"; + values[valuesById[9] = "TYPE_STRING"] = "TYPE_STRING"; + values[valuesById[10] = "TYPE_GROUP"] = "TYPE_GROUP"; + values[valuesById[11] = "TYPE_MESSAGE"] = "TYPE_MESSAGE"; + values[valuesById[12] = "TYPE_BYTES"] = "TYPE_BYTES"; + values[valuesById[13] = "TYPE_UINT32"] = "TYPE_UINT32"; + values[valuesById[14] = "TYPE_ENUM"] = "TYPE_ENUM"; + values[valuesById[15] = "TYPE_SFIXED32"] = "TYPE_SFIXED32"; + values[valuesById[16] = "TYPE_SFIXED64"] = "TYPE_SFIXED64"; + values[valuesById[17] = "TYPE_SINT32"] = "TYPE_SINT32"; + values[valuesById[18] = "TYPE_SINT64"] = "TYPE_SINT64"; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {string} + * @property {string} LABEL_OPTIONAL=LABEL_OPTIONAL LABEL_OPTIONAL value + * @property {string} LABEL_REQUIRED=LABEL_REQUIRED LABEL_REQUIRED value + * @property {string} LABEL_REPEATED=LABEL_REPEATED LABEL_REPEATED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = "LABEL_OPTIONAL"; + values[valuesById[2] = "LABEL_REQUIRED"] = "LABEL_REQUIRED"; + values[valuesById[3] = "LABEL_REPEATED"] = "LABEL_REPEATED"; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(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]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); } return message; }; /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldOptions.toObject = function toObject(message, options) { + OneofDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + object.name = ""; + object.options = null; } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); return object; }; /** - * Converts this FieldOptions to JSON. + * Converts this OneofDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.FieldOptions + * @memberof google.protobuf.OneofDescriptorProto * @instance * @returns {Object.} JSON object */ - FieldOptions.prototype.toJSON = function toJSON() { + OneofDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {string} - * @property {string} STRING=STRING STRING value - * @property {string} CORD=CORD CORD value - * @property {string} STRING_PIECE=STRING_PIECE STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = "STRING"; - values[valuesById[1] = "CORD"] = "CORD"; - values[valuesById[2] = "STRING_PIECE"] = "STRING_PIECE"; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {string} - * @property {string} JS_NORMAL=JS_NORMAL JS_NORMAL value - * @property {string} JS_STRING=JS_STRING JS_STRING value - * @property {string} JS_NUMBER=JS_NUMBER JS_NUMBER value + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = "JS_NORMAL"; - values[valuesById[1] = "JS_STRING"] = "JS_STRING"; - values[valuesById[2] = "JS_NUMBER"] = "JS_NUMBER"; - return values; - })(); + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; - return FieldOptions; + return OneofDescriptorProto; })(); - protobuf.OneofOptions = (function() { + protobuf.EnumDescriptorProto = (function() { /** - * Properties of an OneofOptions. + * Properties of an EnumDescriptorProto. * @memberof google.protobuf - * @interface IOneofOptions - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName */ /** - * Constructs a new OneofOptions. + * Constructs a new EnumDescriptorProto. * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set */ - function OneofOptions(properties) { - this.uninterpretedOption = []; + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4054,96 +4241,300 @@ } /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + EnumDescriptorProto.prototype.name = ""; /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); } } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } return message; }; /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofOptions.toObject = function toObject(message, options) { + EnumDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; } return object; }; /** - * Converts this OneofOptions to JSON. + * Converts this EnumDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.OneofOptions + * @memberof google.protobuf.EnumDescriptorProto * @instance * @returns {Object.} JSON object */ - OneofOptions.prototype.toJSON = function toJSON() { + EnumDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OneofOptions; + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(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]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; })(); - protobuf.EnumOptions = (function() { + protobuf.EnumValueDescriptorProto = (function() { /** - * Properties of an EnumOptions. + * Properties of an EnumValueDescriptorProto. * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options */ /** - * Constructs a new EnumOptions. + * Constructs a new EnumValueDescriptorProto. * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set */ - function EnumOptions(properties) { - this.uninterpretedOption = []; + function EnumValueDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4151,123 +4542,130 @@ } /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ - EnumOptions.prototype.allowAlias = false; + EnumValueDescriptorProto.prototype.name = ""; /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ - EnumOptions.prototype.deprecated = false; + EnumValueDescriptorProto.prototype.number = 0; /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + EnumValueDescriptorProto.prototype.options = null; /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); } return message; }; /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @static - * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); return object; }; /** - * Converts this EnumOptions to JSON. + * Converts this EnumValueDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.EnumOptions + * @memberof google.protobuf.EnumValueDescriptorProto * @instance * @returns {Object.} JSON object */ - EnumOptions.prototype.toJSON = function toJSON() { + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EnumOptions; + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; })(); - protobuf.EnumValueOptions = (function() { + protobuf.ServiceDescriptorProto = (function() { /** - * Properties of an EnumValueOptions. + * Properties of a ServiceDescriptorProto. * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options */ /** - * Constructs a new EnumValueOptions. + * Constructs a new ServiceDescriptorProto. * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; + function ServiceDescriptorProto(properties) { + this.method = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4275,111 +4673,144 @@ } /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - EnumValueOptions.prototype.deprecated = false; + ServiceDescriptorProto.prototype.name = ""; /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto * @instance */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + ServiceDescriptorProto.prototype.method = $util.emptyArray; /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); } } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } return message; }; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueOptions.toObject = function toObject(message, options) { + ServiceDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); return object; }; /** - * Converts this EnumValueOptions to JSON. + * Converts this ServiceDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.EnumValueOptions + * @memberof google.protobuf.ServiceDescriptorProto * @instance * @returns {Object.} JSON object */ - EnumValueOptions.prototype.toJSON = function toJSON() { + ServiceDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EnumValueOptions; + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; })(); - protobuf.ServiceOptions = (function() { + protobuf.MethodDescriptorProto = (function() { /** - * Properties of a ServiceOptions. + * Properties of a MethodDescriptorProto. * @memberof google.protobuf - * @interface IServiceOptions - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming */ /** - * Constructs a new ServiceOptions. + * Constructs a new MethodDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; + function MethodDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4387,140 +4818,189 @@ } /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - ServiceOptions.prototype.deprecated = false; + MethodDescriptorProto.prototype.name = ""; /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + MethodDescriptorProto.prototype.inputType = ""; /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; + MethodDescriptorProto.prototype.outputType = ""; /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + MethodDescriptorProto.prototype.options = null; /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); return message; }; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + MethodDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; if (options.defaults) { - object.deprecated = false; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; return object; }; /** - * Converts this ServiceOptions to JSON. + * Converts this MethodDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.MethodDescriptorProto * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { + MethodDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ServiceOptions; + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; })(); - protobuf.MethodOptions = (function() { + protobuf.FileOptions = (function() { /** - * Properties of a MethodOptions. + * Properties of a FileOptions. * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition */ /** - * Constructs a new MethodOptions. + * Constructs a new FileOptions. * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions + * @classdesc Represents a FileOptions. + * @implements IFileOptions * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.IFileOptions=} [properties] Properties to set */ - function MethodOptions(properties) { + function FileOptions(properties) { this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; + this[".google.api.resourceDefinition"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4528,743 +5008,625 @@ } /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions * @instance */ - MethodOptions.prototype.deprecated = false; + FileOptions.prototype.javaPackage = ""; /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions * @instance */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + FileOptions.prototype.javaOuterClassname = ""; /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions * @instance */ - MethodOptions.prototype[".google.api.http"] = null; + FileOptions.prototype.javaMultipleFiles = false; /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions * @instance */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + FileOptions.prototype.javaGenerateEqualsAndHash = false; /** - * MethodOptions .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions * @instance */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + FileOptions.prototype.javaStringCheckUtf8 = false; /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); - } - return message; - }; + FileOptions.prototype.optimizeFor = 1; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object[".google.longrunning.operationInfo"] = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions * @instance - * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + FileOptions.prototype.javaGenericServices = false; - return MethodOptions; - })(); + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; - protobuf.UninterpretedOption = (function() { + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|string|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|string|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance */ + FileOptions.prototype.deprecated = false; /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance */ - function UninterpretedOption(properties) { - this.name = []; - 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]]; - } + FileOptions.prototype.ccEnableArenas = true; /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions * @instance */ - UninterpretedOption.prototype.name = $util.emptyArray; + FileOptions.prototype.objcClassPrefix = ""; /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions * @instance */ - UninterpretedOption.prototype.identifierValue = ""; + FileOptions.prototype.csharpNamespace = ""; /** - * UninterpretedOption positiveIntValue. - * @member {number|string} positiveIntValue - * @memberof google.protobuf.UninterpretedOption + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions * @instance */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + FileOptions.prototype.swiftPrefix = ""; /** - * UninterpretedOption negativeIntValue. - * @member {number|string} negativeIntValue - * @memberof google.protobuf.UninterpretedOption + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions * @instance */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + FileOptions.prototype.phpClassPrefix = ""; /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions * @instance */ - UninterpretedOption.prototype.doubleValue = 0; + FileOptions.prototype.phpNamespace = ""; /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions * @instance */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + FileOptions.prototype.phpMetadataNamespace = ""; /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions * @instance */ - UninterpretedOption.prototype.aggregateValue = ""; + FileOptions.prototype.rubyPackage = ""; /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.FileOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.FileOptions} FileOptions */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); } } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); return message; }; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {google.protobuf.FileOptions} message FileOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + FileOptions.toObject = function toObject(message, options) { if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; return object; }; /** - * Converts this UninterpretedOption to JSON. + * Converts this FileOptions to JSON. * @function toJSON - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.FileOptions * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { + FileOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(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]]; + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {string} + * @property {string} SPEED=SPEED SPEED value + * @property {string} CODE_SIZE=CODE_SIZE CODE_SIZE value + * @property {string} LITE_RUNTIME=LITE_RUNTIME LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = "SPEED"; + values[valuesById[2] = "CODE_SIZE"] = "CODE_SIZE"; + values[valuesById[3] = "LITE_RUNTIME"] = "LITE_RUNTIME"; + return values; + })(); - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; + return FileOptions; + })(); - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; + protobuf.MessageOptions = (function() { - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } - return NamePart; - })(); + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; - return UninterpretedOption; - })(); + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; - protobuf.SourceCodeInfo = (function() { + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance */ + MessageOptions.prototype.mapEntry = false; /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo - * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance */ - function SourceCodeInfo(properties) { - this.location = []; - 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]]; - } + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions * @instance */ - SourceCodeInfo.prototype.location = $util.emptyArray; + MessageOptions.prototype[".google.api.resource"] = null; /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.MessageOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.MessageOptions} MessageOptions */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } return message; }; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {google.protobuf.MessageOptions} message MessageOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + MessageOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - 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]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return Location; - })(); + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; - return SourceCodeInfo; + return MessageOptions; })(); - protobuf.GeneratedCodeInfo = (function() { + protobuf.FieldOptions = (function() { /** - * Properties of a GeneratedCodeInfo. + * Properties of a FieldOptions. * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference */ /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new FieldOptions. * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set */ - function GeneratedCodeInfo(properties) { - this.annotation = []; + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5272,228 +5634,458 @@ } /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions * @instance */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + FieldOptions.prototype.ctype = 0; /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.FieldOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.protobuf.FieldOptions} FieldOptions */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } return message; }; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {google.protobuf.FieldOptions} message FieldOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeneratedCodeInfo.toObject = function toObject(message, options) { + FieldOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); return object; }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this FieldOptions to JSON. * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.FieldOptions * @instance * @returns {Object.} JSON object */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { + FieldOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - GeneratedCodeInfo.Annotation = (function() { + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - */ + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {string} + * @property {string} STRING=STRING STRING value + * @property {string} CORD=CORD CORD value + * @property {string} STRING_PIECE=STRING_PIECE STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = "STRING"; + values[valuesById[1] = "CORD"] = "CORD"; + values[valuesById[2] = "STRING_PIECE"] = "STRING_PIECE"; + return values; + })(); - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - 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]]; - } + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {string} + * @property {string} JS_NORMAL=JS_NORMAL JS_NORMAL value + * @property {string} JS_STRING=JS_STRING JS_STRING value + * @property {string} JS_NUMBER=JS_NUMBER JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = "JS_NORMAL"; + values[valuesById[1] = "JS_STRING"] = "JS_STRING"; + values[valuesById[2] = "JS_NUMBER"] = "JS_NUMBER"; + return values; + })(); - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; + return FieldOptions; + })(); - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; + protobuf.OneofOptions = (function() { - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + 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 an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) return object; - }; + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; - return Annotation; - })(); + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return GeneratedCodeInfo; + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; })(); - protobuf.Empty = (function() { + protobuf.EnumOptions = (function() { /** - * Properties of an Empty. + * Properties of an EnumOptions. * @memberof google.protobuf - * @interface IEmpty + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption */ /** - * Constructs a new Empty. + * Constructs a new EnumOptions. * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set */ - function Empty(properties) { + function EnumOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5501,64 +6093,138 @@ } /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Empty + * @memberof google.protobuf.EnumOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty + * @returns {google.protobuf.EnumOptions} EnumOptions */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) return object; - return new $root.google.protobuf.Empty(); + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; }; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Empty + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.Empty} message Empty + * @param {google.protobuf.EnumOptions} message EnumOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Empty.toObject = function toObject() { - return {}; + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; }; /** - * Converts this Empty to JSON. + * Converts this EnumOptions to JSON. * @function toJSON - * @memberof google.protobuf.Empty + * @memberof google.protobuf.EnumOptions * @instance * @returns {Object.} JSON object */ - Empty.prototype.toJSON = function toJSON() { + EnumOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Empty; + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; })(); - protobuf.DoubleValue = (function() { + protobuf.EnumValueOptions = (function() { /** - * Properties of a DoubleValue. + * Properties of an EnumValueOptions. * @memberof google.protobuf - * @interface IDoubleValue - * @property {number|null} [value] DoubleValue value + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ /** - * Constructs a new DoubleValue. + * Constructs a new EnumValueOptions. * @memberof google.protobuf - * @classdesc Represents a DoubleValue. - * @implements IDoubleValue + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions * @constructor - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set */ - function DoubleValue(properties) { + function EnumValueOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5566,82 +6232,126 @@ } /** - * DoubleValue value. - * @member {number} value - * @memberof google.protobuf.DoubleValue + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions * @instance */ - DoubleValue.prototype.value = 0; + EnumValueOptions.prototype.deprecated = false; /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DoubleValue} DoubleValue + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ - DoubleValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DoubleValue) + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) return object; - var message = new $root.google.protobuf.DoubleValue(); - if (object.value != null) - message.value = Number(object.value); + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } return message; }; /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DoubleValue.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } return object; }; /** - * Converts this DoubleValue to JSON. + * Converts this EnumValueOptions to JSON. * @function toJSON - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.EnumValueOptions * @instance * @returns {Object.} JSON object */ - DoubleValue.prototype.toJSON = function toJSON() { + EnumValueOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DoubleValue; + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; })(); - protobuf.FloatValue = (function() { + protobuf.ServiceOptions = (function() { /** - * Properties of a FloatValue. + * Properties of a ServiceOptions. * @memberof google.protobuf - * @interface IFloatValue - * @property {number|null} [value] FloatValue value + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes */ /** - * Constructs a new FloatValue. + * Constructs a new ServiceOptions. * @memberof google.protobuf - * @classdesc Represents a FloatValue. - * @implements IFloatValue + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions * @constructor - * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set */ - function FloatValue(properties) { + function ServiceOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5649,82 +6359,156 @@ } /** - * FloatValue value. - * @member {number} value - * @memberof google.protobuf.FloatValue + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions * @instance */ - FloatValue.prototype.value = 0; + ServiceOptions.prototype.deprecated = false; /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FloatValue} FloatValue + * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - FloatValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FloatValue) + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) return object; - var message = new $root.google.protobuf.FloatValue(); - if (object.value != null) - message.value = Number(object.value); + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); return message; }; /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.FloatValue} message FloatValue + * @param {google.protobuf.ServiceOptions} message ServiceOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FloatValue.toObject = function toObject(message, options) { + ServiceOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; return object; }; /** - * Converts this FloatValue to JSON. + * Converts this ServiceOptions to JSON. * @function toJSON - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.ServiceOptions * @instance * @returns {Object.} JSON object */ - FloatValue.prototype.toJSON = function toJSON() { + ServiceOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FloatValue; + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; })(); - protobuf.Int64Value = (function() { + protobuf.MethodOptions = (function() { /** - * Properties of an Int64Value. + * Properties of a MethodOptions. * @memberof google.protobuf - * @interface IInt64Value - * @property {number|string|null} [value] Int64Value value + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo */ /** - * Constructs a new Int64Value. + * Constructs a new MethodOptions. * @memberof google.protobuf - * @classdesc Represents an Int64Value. - * @implements IInt64Value + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions * @constructor - * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set */ - function Int64Value(properties) { + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5732,193 +6516,231 @@ } /** - * Int64Value value. - * @member {number|string} value - * @memberof google.protobuf.Int64Value + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions * @instance */ - Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int64Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int64Value} Int64Value - */ - Int64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int64Value) - return object; - var message = new $root.google.protobuf.Int64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); - return message; - }; + MethodOptions.prototype.deprecated = false; /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int64Value - * @static - * @param {google.protobuf.Int64Value} message Int64Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance */ - Int64Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; - return object; - }; + MethodOptions.prototype.idempotencyLevel = 0; /** - * Converts this Int64Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int64Value + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions * @instance - * @returns {Object.} JSON object */ - Int64Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Int64Value; - })(); - - protobuf.UInt64Value = (function() { - - /** - * Properties of a UInt64Value. - * @memberof google.protobuf - * @interface IUInt64Value - * @property {number|string|null} [value] UInt64Value value + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance */ + MethodOptions.prototype[".google.api.http"] = null; /** - * Constructs a new UInt64Value. - * @memberof google.protobuf - * @classdesc Represents a UInt64Value. - * @implements IUInt64Value - * @constructor - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance */ - function UInt64Value(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]]; - } + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; /** - * UInt64Value value. - * @member {number|string} value - * @memberof google.protobuf.UInt64Value + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions * @instance */ - UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UInt64Value} UInt64Value + * @returns {google.protobuf.MethodOptions} MethodOptions */ - UInt64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt64Value) + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) return object; - var message = new $root.google.protobuf.UInt64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = true; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } return message; }; /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {google.protobuf.MethodOptions} message MethodOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UInt64Value.toObject = function toObject(message, options) { + MethodOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); return object; }; /** - * Converts this UInt64Value to JSON. + * Converts this MethodOptions to JSON. * @function toJSON - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.MethodOptions * @instance * @returns {Object.} JSON object */ - UInt64Value.prototype.toJSON = function toJSON() { + MethodOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UInt64Value; + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {string} + * @property {string} IDEMPOTENCY_UNKNOWN=IDEMPOTENCY_UNKNOWN IDEMPOTENCY_UNKNOWN value + * @property {string} NO_SIDE_EFFECTS=NO_SIDE_EFFECTS NO_SIDE_EFFECTS value + * @property {string} IDEMPOTENT=IDEMPOTENT IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = "IDEMPOTENCY_UNKNOWN"; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = "NO_SIDE_EFFECTS"; + values[valuesById[2] = "IDEMPOTENT"] = "IDEMPOTENT"; + return values; + })(); + + return MethodOptions; })(); - protobuf.Int32Value = (function() { + protobuf.UninterpretedOption = (function() { /** - * Properties of an Int32Value. + * Properties of an UninterpretedOption. * @memberof google.protobuf - * @interface IInt32Value - * @property {number|null} [value] Int32Value value + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|string|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|string|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue */ /** - * Constructs a new Int32Value. + * Constructs a new UninterpretedOption. * @memberof google.protobuf - * @classdesc Represents an Int32Value. - * @implements IInt32Value + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption * @constructor - * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set */ - function Int32Value(properties) { + function UninterpretedOption(properties) { + this.name = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5926,165 +6748,339 @@ } /** - * Int32Value value. - * @member {number} value - * @memberof google.protobuf.Int32Value + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption * @instance */ - Int32Value.prototype.value = 0; + UninterpretedOption.prototype.name = $util.emptyArray; /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Int32Value - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Int32Value} Int32Value + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance */ - Int32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int32Value) - return object; - var message = new $root.google.protobuf.Int32Value(); - if (object.value != null) - message.value = object.value | 0; - return message; - }; + UninterpretedOption.prototype.identifierValue = ""; /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Int32Value - * @static - * @param {google.protobuf.Int32Value} message Int32Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * UninterpretedOption positiveIntValue. + * @member {number|string} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance */ - Int32Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * Converts this Int32Value to JSON. - * @function toJSON - * @memberof google.protobuf.Int32Value + * UninterpretedOption negativeIntValue. + * @member {number|string} negativeIntValue + * @memberof google.protobuf.UninterpretedOption * @instance - * @returns {Object.} JSON object */ - Int32Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Int32Value; - })(); - - protobuf.UInt32Value = (function() { + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Properties of a UInt32Value. - * @memberof google.protobuf - * @interface IUInt32Value - * @property {number|null} [value] UInt32Value value + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance */ + UninterpretedOption.prototype.doubleValue = 0; /** - * Constructs a new UInt32Value. - * @memberof google.protobuf - * @classdesc Represents a UInt32Value. - * @implements IUInt32Value - * @constructor - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance */ - function UInt32Value(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]]; - } + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); /** - * UInt32Value value. - * @member {number} value - * @memberof google.protobuf.UInt32Value + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - UInt32Value.prototype.value = 0; + UninterpretedOption.prototype.aggregateValue = ""; /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UInt32Value} UInt32Value + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - UInt32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt32Value) + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) return object; - var message = new $root.google.protobuf.UInt32Value(); - if (object.value != null) - message.value = object.value >>> 0; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); return message; }; /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UInt32Value.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; return object; }; /** - * Converts this UInt32Value to JSON. + * Converts this UninterpretedOption to JSON. * @function toJSON - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.UninterpretedOption * @instance * @returns {Object.} JSON object */ - UInt32Value.prototype.toJSON = function toJSON() { + UninterpretedOption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UInt32Value; + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(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]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; })(); - protobuf.BoolValue = (function() { + protobuf.SourceCodeInfo = (function() { /** - * Properties of a BoolValue. + * Properties of a SourceCodeInfo. * @memberof google.protobuf - * @interface IBoolValue - * @property {boolean|null} [value] BoolValue value + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location */ /** - * Constructs a new BoolValue. + * Constructs a new SourceCodeInfo. * @memberof google.protobuf - * @classdesc Represents a BoolValue. - * @implements IBoolValue + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo * @constructor - * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set */ - function BoolValue(properties) { + function SourceCodeInfo(properties) { + this.location = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6092,82 +7088,293 @@ } /** - * BoolValue value. - * @member {boolean} value - * @memberof google.protobuf.BoolValue + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo * @instance */ - BoolValue.prototype.value = false; + SourceCodeInfo.prototype.location = $util.emptyArray; /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.BoolValue} BoolValue + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - BoolValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BoolValue) + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; - var message = new $root.google.protobuf.BoolValue(); - if (object.value != null) - message.value = Boolean(object.value); + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } return message; }; /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.BoolValue + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.BoolValue} message BoolValue + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BoolValue.toObject = function toObject(message, options) { + SourceCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = false; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } return object; }; - /** - * Converts this BoolValue to JSON. - * @function toJSON - * @memberof google.protobuf.BoolValue - * @instance - * @returns {Object.} JSON object - */ - BoolValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + 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]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); - return BoolValue; + return SourceCodeInfo; })(); - protobuf.StringValue = (function() { + protobuf.GeneratedCodeInfo = (function() { /** - * Properties of a StringValue. + * Properties of a GeneratedCodeInfo. * @memberof google.protobuf - * @interface IStringValue - * @property {string|null} [value] StringValue value + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation */ /** - * Constructs a new StringValue. + * Constructs a new GeneratedCodeInfo. * @memberof google.protobuf - * @classdesc Represents a StringValue. - * @implements IStringValue + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo * @constructor - * @param {google.protobuf.IStringValue=} [properties] Properties to set + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set */ - function StringValue(properties) { + function GeneratedCodeInfo(properties) { + this.annotation = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6175,261 +7382,287 @@ } /** - * StringValue value. - * @member {string} value - * @memberof google.protobuf.StringValue + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo * @instance */ - StringValue.prototype.value = ""; + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.StringValue} StringValue + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo */ - StringValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.StringValue) + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) return object; - var message = new $root.google.protobuf.StringValue(); - if (object.value != null) - message.value = String(object.value); + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } return message; }; /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.StringValue} message StringValue + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StringValue.toObject = function toObject(message, options) { + GeneratedCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } return object; }; /** - * Converts this StringValue to JSON. + * Converts this GeneratedCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.GeneratedCodeInfo * @instance * @returns {Object.} JSON object */ - StringValue.prototype.toJSON = function toJSON() { + GeneratedCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StringValue; - })(); - - protobuf.BytesValue = (function() { - - /** - * Properties of a BytesValue. - * @memberof google.protobuf - * @interface IBytesValue - * @property {Uint8Array|null} [value] BytesValue value - */ - - /** - * Constructs a new BytesValue. - * @memberof google.protobuf - * @classdesc Represents a BytesValue. - * @implements IBytesValue - * @constructor - * @param {google.protobuf.IBytesValue=} [properties] Properties to set - */ - function BytesValue(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]]; - } - - /** - * BytesValue value. - * @member {Uint8Array} value - * @memberof google.protobuf.BytesValue - * @instance - */ - BytesValue.prototype.value = $util.newBuffer([]); - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.BytesValue + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.BytesValue} BytesValue + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - BytesValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BytesValue) - return object; - var message = new $root.google.protobuf.BytesValue(); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - return message; + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; }; - /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.BytesValue - * @static - * @param {google.protobuf.BytesValue} message BytesValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BytesValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; + GeneratedCodeInfo.Annotation = (function() { - /** - * Converts this BytesValue to JSON. - * @function toJSON - * @memberof google.protobuf.BytesValue - * @instance - * @returns {Object.} JSON object - */ - BytesValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ - return BytesValue; - })(); + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + 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]]; + } - protobuf.Any = (function() { + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(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]]; - } + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; - return message; - }; + }; - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {string} + * @property {string} NONE=NONE NONE value + * @property {string} SET=SET SET value + * @property {string} ALIAS=ALIAS ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = "NONE"; + values[valuesById[1] = "SET"] = "SET"; + values[valuesById[2] = "ALIAS"] = "ALIAS"; + return values; + })(); - return Any; + return Annotation; + })(); + + return GeneratedCodeInfo; })(); protobuf.FieldMask = (function() { @@ -6521,6 +7754,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + return FieldMask; })(); @@ -6633,6 +7881,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + return Duration; })(); @@ -6650,12 +7913,123 @@ firestore.v1 = (function() { - /** - * Namespace v1. - * @memberof google.firestore - * @namespace - */ - var v1 = {}; + /** + * Namespace v1. + * @memberof google.firestore + * @namespace + */ + var v1 = {}; + + v1.AggregationResult = (function() { + + /** + * Properties of an AggregationResult. + * @memberof google.firestore.v1 + * @interface IAggregationResult + * @property {Object.|null} [aggregateFields] AggregationResult aggregateFields + */ + + /** + * Constructs a new AggregationResult. + * @memberof google.firestore.v1 + * @classdesc Represents an AggregationResult. + * @implements IAggregationResult + * @constructor + * @param {google.firestore.v1.IAggregationResult=} [properties] Properties to set + */ + function AggregationResult(properties) { + this.aggregateFields = {}; + 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]]; + } + + /** + * AggregationResult aggregateFields. + * @member {Object.} aggregateFields + * @memberof google.firestore.v1.AggregationResult + * @instance + */ + AggregationResult.prototype.aggregateFields = $util.emptyObject; + + /** + * Creates an AggregationResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.v1.AggregationResult + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.v1.AggregationResult} AggregationResult + */ + AggregationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.AggregationResult) + return object; + var message = new $root.google.firestore.v1.AggregationResult(); + if (object.aggregateFields) { + if (typeof object.aggregateFields !== "object") + throw TypeError(".google.firestore.v1.AggregationResult.aggregateFields: object expected"); + message.aggregateFields = {}; + for (var keys = Object.keys(object.aggregateFields), i = 0; i < keys.length; ++i) { + if (typeof object.aggregateFields[keys[i]] !== "object") + throw TypeError(".google.firestore.v1.AggregationResult.aggregateFields: object expected"); + message.aggregateFields[keys[i]] = $root.google.firestore.v1.Value.fromObject(object.aggregateFields[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from an AggregationResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.v1.AggregationResult + * @static + * @param {google.firestore.v1.AggregationResult} message AggregationResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AggregationResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.aggregateFields = {}; + var keys2; + if (message.aggregateFields && (keys2 = Object.keys(message.aggregateFields)).length) { + object.aggregateFields = {}; + for (var j = 0; j < keys2.length; ++j) + object.aggregateFields[keys2[j]] = $root.google.firestore.v1.Value.toObject(message.aggregateFields[keys2[j]], options); + } + return object; + }; + + /** + * Converts this AggregationResult to JSON. + * @function toJSON + * @memberof google.firestore.v1.AggregationResult + * @instance + * @returns {Object.} JSON object + */ + AggregationResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AggregationResult + * @function getTypeUrl + * @memberof google.firestore.v1.AggregationResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AggregationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.AggregationResult"; + }; + + return AggregationResult; + })(); v1.DocumentMask = (function() { @@ -6746,6 +8120,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DocumentMask + * @function getTypeUrl + * @memberof google.firestore.v1.DocumentMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.DocumentMask"; + }; + return DocumentMask; })(); @@ -6863,6 +8252,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Precondition + * @function getTypeUrl + * @memberof google.firestore.v1.Precondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Precondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.Precondition"; + }; + return Precondition; })(); @@ -6983,6 +8387,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TransactionOptions + * @function getTypeUrl + * @memberof google.firestore.v1.TransactionOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransactionOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.TransactionOptions"; + }; + TransactionOptions.ReadWrite = (function() { /** @@ -7030,7 +8449,7 @@ if (object.retryTransaction != null) if (typeof object.retryTransaction === "string") $util.base64.decode(object.retryTransaction, message.retryTransaction = $util.newBuffer($util.base64.length(object.retryTransaction)), 0); - else if (object.retryTransaction.length) + else if (object.retryTransaction.length >= 0) message.retryTransaction = object.retryTransaction; return message; }; @@ -7072,6 +8491,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReadWrite + * @function getTypeUrl + * @memberof google.firestore.v1.TransactionOptions.ReadWrite + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadWrite.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.TransactionOptions.ReadWrite"; + }; + return ReadWrite; })(); @@ -7173,6 +8607,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReadOnly + * @function getTypeUrl + * @memberof google.firestore.v1.TransactionOptions.ReadOnly + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadOnly.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.TransactionOptions.ReadOnly"; + }; + return ReadOnly; })(); @@ -7322,6 +8771,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Document + * @function getTypeUrl + * @memberof google.firestore.v1.Document + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Document.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.Document"; + }; + return Document; })(); @@ -7474,6 +8938,12 @@ return object; var message = new $root.google.firestore.v1.Value(); switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } + break; case "NULL_VALUE": case 0: message.nullValue = 0; @@ -7502,7 +8972,7 @@ if (object.bytesValue != null) if (typeof object.bytesValue === "string") $util.base64.decode(object.bytesValue, message.bytesValue = $util.newBuffer($util.base64.length(object.bytesValue)), 0); - else if (object.bytesValue.length) + else if (object.bytesValue.length >= 0) message.bytesValue = object.bytesValue; if (object.referenceValue != null) message.referenceValue = String(object.referenceValue); @@ -7581,7 +9051,7 @@ object.valueType = "timestampValue"; } if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; if (options.oneofs) object.valueType = "nullValue"; } @@ -7609,6 +9079,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.firestore.v1.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.Value"; + }; + return Value; })(); @@ -7704,6 +9189,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ArrayValue + * @function getTypeUrl + * @memberof google.firestore.v1.ArrayValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ArrayValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.ArrayValue"; + }; + return ArrayValue; })(); @@ -7800,6 +9300,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MapValue + * @function getTypeUrl + * @memberof google.firestore.v1.MapValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MapValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.MapValue"; + }; + return MapValue; })(); @@ -8118,6 +9633,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.firestore.v1.Firestore#runAggregationQuery}. + * @memberof google.firestore.v1.Firestore + * @typedef RunAggregationQueryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.firestore.v1.RunAggregationQueryResponse} [response] RunAggregationQueryResponse + */ + + /** + * Calls RunAggregationQuery. + * @function runAggregationQuery + * @memberof google.firestore.v1.Firestore + * @instance + * @param {google.firestore.v1.IRunAggregationQueryRequest} request RunAggregationQueryRequest message or plain object + * @param {google.firestore.v1.Firestore.RunAggregationQueryCallback} callback Node-style callback called with the error, if any, and RunAggregationQueryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Firestore.prototype.runAggregationQuery = function runAggregationQuery(request, callback) { + return this.rpcCall(runAggregationQuery, $root.google.firestore.v1.RunAggregationQueryRequest, $root.google.firestore.v1.RunAggregationQueryResponse, request, callback); + }, "name", { value: "RunAggregationQuery" }); + + /** + * Calls RunAggregationQuery. + * @function runAggregationQuery + * @memberof google.firestore.v1.Firestore + * @instance + * @param {google.firestore.v1.IRunAggregationQueryRequest} request RunAggregationQueryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.firestore.v1.Firestore#partitionQuery}. * @memberof google.firestore.v1.Firestore @@ -8339,7 +9887,180 @@ * @constructor * @param {google.firestore.v1.IGetDocumentRequest=} [properties] Properties to set */ - function GetDocumentRequest(properties) { + function GetDocumentRequest(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]]; + } + + /** + * GetDocumentRequest name. + * @member {string} name + * @memberof google.firestore.v1.GetDocumentRequest + * @instance + */ + GetDocumentRequest.prototype.name = ""; + + /** + * GetDocumentRequest mask. + * @member {google.firestore.v1.IDocumentMask|null|undefined} mask + * @memberof google.firestore.v1.GetDocumentRequest + * @instance + */ + GetDocumentRequest.prototype.mask = null; + + /** + * GetDocumentRequest transaction. + * @member {Uint8Array|null|undefined} transaction + * @memberof google.firestore.v1.GetDocumentRequest + * @instance + */ + GetDocumentRequest.prototype.transaction = null; + + /** + * GetDocumentRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.firestore.v1.GetDocumentRequest + * @instance + */ + GetDocumentRequest.prototype.readTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetDocumentRequest consistencySelector. + * @member {"transaction"|"readTime"|undefined} consistencySelector + * @memberof google.firestore.v1.GetDocumentRequest + * @instance + */ + Object.defineProperty(GetDocumentRequest.prototype, "consistencySelector", { + get: $util.oneOfGetter($oneOfFields = ["transaction", "readTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a GetDocumentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.v1.GetDocumentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.v1.GetDocumentRequest} GetDocumentRequest + */ + GetDocumentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.GetDocumentRequest) + return object; + var message = new $root.google.firestore.v1.GetDocumentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.mask != null) { + if (typeof object.mask !== "object") + throw TypeError(".google.firestore.v1.GetDocumentRequest.mask: object expected"); + message.mask = $root.google.firestore.v1.DocumentMask.fromObject(object.mask); + } + if (object.transaction != null) + if (typeof object.transaction === "string") + $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); + else if (object.transaction.length >= 0) + message.transaction = object.transaction; + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.firestore.v1.GetDocumentRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + } + return message; + }; + + /** + * Creates a plain object from a GetDocumentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.v1.GetDocumentRequest + * @static + * @param {google.firestore.v1.GetDocumentRequest} message GetDocumentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDocumentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.mask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.mask != null && message.hasOwnProperty("mask")) + object.mask = $root.google.firestore.v1.DocumentMask.toObject(message.mask, options); + if (message.transaction != null && message.hasOwnProperty("transaction")) { + object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction; + if (options.oneofs) + object.consistencySelector = "transaction"; + } + if (message.readTime != null && message.hasOwnProperty("readTime")) { + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (options.oneofs) + object.consistencySelector = "readTime"; + } + return object; + }; + + /** + * Converts this GetDocumentRequest to JSON. + * @function toJSON + * @memberof google.firestore.v1.GetDocumentRequest + * @instance + * @returns {Object.} JSON object + */ + GetDocumentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDocumentRequest + * @function getTypeUrl + * @memberof google.firestore.v1.GetDocumentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.GetDocumentRequest"; + }; + + return GetDocumentRequest; + })(); + + v1.ListDocumentsRequest = (function() { + + /** + * Properties of a ListDocumentsRequest. + * @memberof google.firestore.v1 + * @interface IListDocumentsRequest + * @property {string|null} [parent] ListDocumentsRequest parent + * @property {string|null} [collectionId] ListDocumentsRequest collectionId + * @property {number|null} [pageSize] ListDocumentsRequest pageSize + * @property {string|null} [pageToken] ListDocumentsRequest pageToken + * @property {string|null} [orderBy] ListDocumentsRequest orderBy + * @property {google.firestore.v1.IDocumentMask|null} [mask] ListDocumentsRequest mask + * @property {Uint8Array|null} [transaction] ListDocumentsRequest transaction + * @property {google.protobuf.ITimestamp|null} [readTime] ListDocumentsRequest readTime + * @property {boolean|null} [showMissing] ListDocumentsRequest showMissing + */ + + /** + * Constructs a new ListDocumentsRequest. + * @memberof google.firestore.v1 + * @classdesc Represents a ListDocumentsRequest. + * @implements IListDocumentsRequest + * @constructor + * @param {google.firestore.v1.IListDocumentsRequest=} [properties] Properties to set + */ + function ListDocumentsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8347,102 +10068,165 @@ } /** - * GetDocumentRequest name. - * @member {string} name - * @memberof google.firestore.v1.GetDocumentRequest + * ListDocumentsRequest parent. + * @member {string} parent + * @memberof google.firestore.v1.ListDocumentsRequest * @instance */ - GetDocumentRequest.prototype.name = ""; + ListDocumentsRequest.prototype.parent = ""; /** - * GetDocumentRequest mask. + * ListDocumentsRequest collectionId. + * @member {string} collectionId + * @memberof google.firestore.v1.ListDocumentsRequest + * @instance + */ + ListDocumentsRequest.prototype.collectionId = ""; + + /** + * ListDocumentsRequest pageSize. + * @member {number} pageSize + * @memberof google.firestore.v1.ListDocumentsRequest + * @instance + */ + ListDocumentsRequest.prototype.pageSize = 0; + + /** + * ListDocumentsRequest pageToken. + * @member {string} pageToken + * @memberof google.firestore.v1.ListDocumentsRequest + * @instance + */ + ListDocumentsRequest.prototype.pageToken = ""; + + /** + * ListDocumentsRequest orderBy. + * @member {string} orderBy + * @memberof google.firestore.v1.ListDocumentsRequest + * @instance + */ + ListDocumentsRequest.prototype.orderBy = ""; + + /** + * ListDocumentsRequest mask. * @member {google.firestore.v1.IDocumentMask|null|undefined} mask - * @memberof google.firestore.v1.GetDocumentRequest + * @memberof google.firestore.v1.ListDocumentsRequest * @instance */ - GetDocumentRequest.prototype.mask = null; + ListDocumentsRequest.prototype.mask = null; /** - * GetDocumentRequest transaction. + * ListDocumentsRequest transaction. * @member {Uint8Array|null|undefined} transaction - * @memberof google.firestore.v1.GetDocumentRequest + * @memberof google.firestore.v1.ListDocumentsRequest * @instance */ - GetDocumentRequest.prototype.transaction = null; + ListDocumentsRequest.prototype.transaction = null; /** - * GetDocumentRequest readTime. + * ListDocumentsRequest readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.firestore.v1.GetDocumentRequest + * @memberof google.firestore.v1.ListDocumentsRequest * @instance */ - GetDocumentRequest.prototype.readTime = null; + ListDocumentsRequest.prototype.readTime = null; + + /** + * ListDocumentsRequest showMissing. + * @member {boolean} showMissing + * @memberof google.firestore.v1.ListDocumentsRequest + * @instance + */ + ListDocumentsRequest.prototype.showMissing = false; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * GetDocumentRequest consistencySelector. + * ListDocumentsRequest consistencySelector. * @member {"transaction"|"readTime"|undefined} consistencySelector - * @memberof google.firestore.v1.GetDocumentRequest + * @memberof google.firestore.v1.ListDocumentsRequest * @instance */ - Object.defineProperty(GetDocumentRequest.prototype, "consistencySelector", { + Object.defineProperty(ListDocumentsRequest.prototype, "consistencySelector", { get: $util.oneOfGetter($oneOfFields = ["transaction", "readTime"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a GetDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListDocumentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.firestore.v1.GetDocumentRequest + * @memberof google.firestore.v1.ListDocumentsRequest * @static * @param {Object.} object Plain object - * @returns {google.firestore.v1.GetDocumentRequest} GetDocumentRequest + * @returns {google.firestore.v1.ListDocumentsRequest} ListDocumentsRequest */ - GetDocumentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.v1.GetDocumentRequest) + ListDocumentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.ListDocumentsRequest) return object; - var message = new $root.google.firestore.v1.GetDocumentRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.firestore.v1.ListDocumentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.collectionId != null) + message.collectionId = String(object.collectionId); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); if (object.mask != null) { if (typeof object.mask !== "object") - throw TypeError(".google.firestore.v1.GetDocumentRequest.mask: object expected"); + throw TypeError(".google.firestore.v1.ListDocumentsRequest.mask: object expected"); message.mask = $root.google.firestore.v1.DocumentMask.fromObject(object.mask); } if (object.transaction != null) if (typeof object.transaction === "string") $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) + else if (object.transaction.length >= 0) message.transaction = object.transaction; if (object.readTime != null) { if (typeof object.readTime !== "object") - throw TypeError(".google.firestore.v1.GetDocumentRequest.readTime: object expected"); + throw TypeError(".google.firestore.v1.ListDocumentsRequest.readTime: object expected"); message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } + if (object.showMissing != null) + message.showMissing = Boolean(object.showMissing); return message; }; /** - * Creates a plain object from a GetDocumentRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListDocumentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.firestore.v1.GetDocumentRequest + * @memberof google.firestore.v1.ListDocumentsRequest * @static - * @param {google.firestore.v1.GetDocumentRequest} message GetDocumentRequest + * @param {google.firestore.v1.ListDocumentsRequest} message ListDocumentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetDocumentRequest.toObject = function toObject(message, options) { + ListDocumentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; + object.parent = ""; + object.collectionId = ""; + object.pageSize = 0; + object.pageToken = ""; + object.orderBy = ""; object.mask = null; + object.showMissing = false; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.collectionId != null && message.hasOwnProperty("collectionId")) + object.collectionId = message.collectionId; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; if (message.mask != null && message.hasOwnProperty("mask")) object.mask = $root.google.firestore.v1.DocumentMask.toObject(message.mask, options); if (message.transaction != null && message.hasOwnProperty("transaction")) { @@ -8455,49 +10239,187 @@ if (options.oneofs) object.consistencySelector = "readTime"; } + if (message.showMissing != null && message.hasOwnProperty("showMissing")) + object.showMissing = message.showMissing; return object; }; /** - * Converts this GetDocumentRequest to JSON. + * Converts this ListDocumentsRequest to JSON. * @function toJSON - * @memberof google.firestore.v1.GetDocumentRequest + * @memberof google.firestore.v1.ListDocumentsRequest * @instance * @returns {Object.} JSON object */ - GetDocumentRequest.prototype.toJSON = function toJSON() { + ListDocumentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDocumentsRequest + * @function getTypeUrl + * @memberof google.firestore.v1.ListDocumentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.ListDocumentsRequest"; + }; + + return ListDocumentsRequest; + })(); + + v1.ListDocumentsResponse = (function() { + + /** + * Properties of a ListDocumentsResponse. + * @memberof google.firestore.v1 + * @interface IListDocumentsResponse + * @property {Array.|null} [documents] ListDocumentsResponse documents + * @property {string|null} [nextPageToken] ListDocumentsResponse nextPageToken + */ + + /** + * Constructs a new ListDocumentsResponse. + * @memberof google.firestore.v1 + * @classdesc Represents a ListDocumentsResponse. + * @implements IListDocumentsResponse + * @constructor + * @param {google.firestore.v1.IListDocumentsResponse=} [properties] Properties to set + */ + function ListDocumentsResponse(properties) { + this.documents = []; + 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]]; + } + + /** + * ListDocumentsResponse documents. + * @member {Array.} documents + * @memberof google.firestore.v1.ListDocumentsResponse + * @instance + */ + ListDocumentsResponse.prototype.documents = $util.emptyArray; + + /** + * ListDocumentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.firestore.v1.ListDocumentsResponse + * @instance + */ + ListDocumentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a ListDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.v1.ListDocumentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.v1.ListDocumentsResponse} ListDocumentsResponse + */ + ListDocumentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.ListDocumentsResponse) + return object; + var message = new $root.google.firestore.v1.ListDocumentsResponse(); + if (object.documents) { + if (!Array.isArray(object.documents)) + throw TypeError(".google.firestore.v1.ListDocumentsResponse.documents: array expected"); + message.documents = []; + for (var i = 0; i < object.documents.length; ++i) { + if (typeof object.documents[i] !== "object") + throw TypeError(".google.firestore.v1.ListDocumentsResponse.documents: object expected"); + message.documents[i] = $root.google.firestore.v1.Document.fromObject(object.documents[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDocumentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.v1.ListDocumentsResponse + * @static + * @param {google.firestore.v1.ListDocumentsResponse} message ListDocumentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDocumentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.documents = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.documents && message.documents.length) { + object.documents = []; + for (var j = 0; j < message.documents.length; ++j) + object.documents[j] = $root.google.firestore.v1.Document.toObject(message.documents[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDocumentsResponse to JSON. + * @function toJSON + * @memberof google.firestore.v1.ListDocumentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDocumentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetDocumentRequest; + /** + * Gets the default type url for ListDocumentsResponse + * @function getTypeUrl + * @memberof google.firestore.v1.ListDocumentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.ListDocumentsResponse"; + }; + + return ListDocumentsResponse; })(); - v1.ListDocumentsRequest = (function() { + v1.CreateDocumentRequest = (function() { /** - * Properties of a ListDocumentsRequest. + * Properties of a CreateDocumentRequest. * @memberof google.firestore.v1 - * @interface IListDocumentsRequest - * @property {string|null} [parent] ListDocumentsRequest parent - * @property {string|null} [collectionId] ListDocumentsRequest collectionId - * @property {number|null} [pageSize] ListDocumentsRequest pageSize - * @property {string|null} [pageToken] ListDocumentsRequest pageToken - * @property {string|null} [orderBy] ListDocumentsRequest orderBy - * @property {google.firestore.v1.IDocumentMask|null} [mask] ListDocumentsRequest mask - * @property {Uint8Array|null} [transaction] ListDocumentsRequest transaction - * @property {google.protobuf.ITimestamp|null} [readTime] ListDocumentsRequest readTime - * @property {boolean|null} [showMissing] ListDocumentsRequest showMissing + * @interface ICreateDocumentRequest + * @property {string|null} [parent] CreateDocumentRequest parent + * @property {string|null} [collectionId] CreateDocumentRequest collectionId + * @property {string|null} [documentId] CreateDocumentRequest documentId + * @property {google.firestore.v1.IDocument|null} [document] CreateDocumentRequest document + * @property {google.firestore.v1.IDocumentMask|null} [mask] CreateDocumentRequest mask */ /** - * Constructs a new ListDocumentsRequest. + * Constructs a new CreateDocumentRequest. * @memberof google.firestore.v1 - * @classdesc Represents a ListDocumentsRequest. - * @implements IListDocumentsRequest + * @classdesc Represents a CreateDocumentRequest. + * @implements ICreateDocumentRequest * @constructor - * @param {google.firestore.v1.IListDocumentsRequest=} [properties] Properties to set + * @param {google.firestore.v1.ICreateDocumentRequest=} [properties] Properties to set */ - function ListDocumentsRequest(properties) { + function CreateDocumentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8505,216 +10427,159 @@ } /** - * ListDocumentsRequest parent. + * CreateDocumentRequest parent. * @member {string} parent - * @memberof google.firestore.v1.ListDocumentsRequest + * @memberof google.firestore.v1.CreateDocumentRequest * @instance */ - ListDocumentsRequest.prototype.parent = ""; + CreateDocumentRequest.prototype.parent = ""; /** - * ListDocumentsRequest collectionId. + * CreateDocumentRequest collectionId. * @member {string} collectionId - * @memberof google.firestore.v1.ListDocumentsRequest - * @instance - */ - ListDocumentsRequest.prototype.collectionId = ""; - - /** - * ListDocumentsRequest pageSize. - * @member {number} pageSize - * @memberof google.firestore.v1.ListDocumentsRequest + * @memberof google.firestore.v1.CreateDocumentRequest * @instance */ - ListDocumentsRequest.prototype.pageSize = 0; + CreateDocumentRequest.prototype.collectionId = ""; /** - * ListDocumentsRequest pageToken. - * @member {string} pageToken - * @memberof google.firestore.v1.ListDocumentsRequest + * CreateDocumentRequest documentId. + * @member {string} documentId + * @memberof google.firestore.v1.CreateDocumentRequest * @instance */ - ListDocumentsRequest.prototype.pageToken = ""; + CreateDocumentRequest.prototype.documentId = ""; /** - * ListDocumentsRequest orderBy. - * @member {string} orderBy - * @memberof google.firestore.v1.ListDocumentsRequest + * CreateDocumentRequest document. + * @member {google.firestore.v1.IDocument|null|undefined} document + * @memberof google.firestore.v1.CreateDocumentRequest * @instance */ - ListDocumentsRequest.prototype.orderBy = ""; + CreateDocumentRequest.prototype.document = null; /** - * ListDocumentsRequest mask. + * CreateDocumentRequest mask. * @member {google.firestore.v1.IDocumentMask|null|undefined} mask - * @memberof google.firestore.v1.ListDocumentsRequest - * @instance - */ - ListDocumentsRequest.prototype.mask = null; - - /** - * ListDocumentsRequest transaction. - * @member {Uint8Array|null|undefined} transaction - * @memberof google.firestore.v1.ListDocumentsRequest - * @instance - */ - ListDocumentsRequest.prototype.transaction = null; - - /** - * ListDocumentsRequest readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.firestore.v1.ListDocumentsRequest - * @instance - */ - ListDocumentsRequest.prototype.readTime = null; - - /** - * ListDocumentsRequest showMissing. - * @member {boolean} showMissing - * @memberof google.firestore.v1.ListDocumentsRequest - * @instance - */ - ListDocumentsRequest.prototype.showMissing = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ListDocumentsRequest consistencySelector. - * @member {"transaction"|"readTime"|undefined} consistencySelector - * @memberof google.firestore.v1.ListDocumentsRequest + * @memberof google.firestore.v1.CreateDocumentRequest * @instance */ - Object.defineProperty(ListDocumentsRequest.prototype, "consistencySelector", { - get: $util.oneOfGetter($oneOfFields = ["transaction", "readTime"]), - set: $util.oneOfSetter($oneOfFields) - }); + CreateDocumentRequest.prototype.mask = null; /** - * Creates a ListDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateDocumentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.firestore.v1.ListDocumentsRequest + * @memberof google.firestore.v1.CreateDocumentRequest * @static * @param {Object.} object Plain object - * @returns {google.firestore.v1.ListDocumentsRequest} ListDocumentsRequest + * @returns {google.firestore.v1.CreateDocumentRequest} CreateDocumentRequest */ - ListDocumentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.v1.ListDocumentsRequest) + CreateDocumentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.CreateDocumentRequest) return object; - var message = new $root.google.firestore.v1.ListDocumentsRequest(); + var message = new $root.google.firestore.v1.CreateDocumentRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.collectionId != null) message.collectionId = String(object.collectionId); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + if (object.documentId != null) + message.documentId = String(object.documentId); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.firestore.v1.CreateDocumentRequest.document: object expected"); + message.document = $root.google.firestore.v1.Document.fromObject(object.document); + } if (object.mask != null) { if (typeof object.mask !== "object") - throw TypeError(".google.firestore.v1.ListDocumentsRequest.mask: object expected"); + throw TypeError(".google.firestore.v1.CreateDocumentRequest.mask: object expected"); message.mask = $root.google.firestore.v1.DocumentMask.fromObject(object.mask); } - if (object.transaction != null) - if (typeof object.transaction === "string") - $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) - message.transaction = object.transaction; - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.firestore.v1.ListDocumentsRequest.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } - if (object.showMissing != null) - message.showMissing = Boolean(object.showMissing); return message; }; /** - * Creates a plain object from a ListDocumentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateDocumentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.firestore.v1.ListDocumentsRequest + * @memberof google.firestore.v1.CreateDocumentRequest * @static - * @param {google.firestore.v1.ListDocumentsRequest} message ListDocumentsRequest + * @param {google.firestore.v1.CreateDocumentRequest} message CreateDocumentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDocumentsRequest.toObject = function toObject(message, options) { + CreateDocumentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; object.collectionId = ""; - object.pageSize = 0; - object.pageToken = ""; - object.orderBy = ""; + object.documentId = ""; + object.document = null; object.mask = null; - object.showMissing = false; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; if (message.collectionId != null && message.hasOwnProperty("collectionId")) object.collectionId = message.collectionId; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (message.documentId != null && message.hasOwnProperty("documentId")) + object.documentId = message.documentId; + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.firestore.v1.Document.toObject(message.document, options); if (message.mask != null && message.hasOwnProperty("mask")) object.mask = $root.google.firestore.v1.DocumentMask.toObject(message.mask, options); - if (message.transaction != null && message.hasOwnProperty("transaction")) { - object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction; - if (options.oneofs) - object.consistencySelector = "transaction"; - } - if (message.readTime != null && message.hasOwnProperty("readTime")) { - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (options.oneofs) - object.consistencySelector = "readTime"; - } - if (message.showMissing != null && message.hasOwnProperty("showMissing")) - object.showMissing = message.showMissing; return object; }; /** - * Converts this ListDocumentsRequest to JSON. + * Converts this CreateDocumentRequest to JSON. * @function toJSON - * @memberof google.firestore.v1.ListDocumentsRequest + * @memberof google.firestore.v1.CreateDocumentRequest * @instance * @returns {Object.} JSON object */ - ListDocumentsRequest.prototype.toJSON = function toJSON() { + CreateDocumentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDocumentsRequest; + /** + * Gets the default type url for CreateDocumentRequest + * @function getTypeUrl + * @memberof google.firestore.v1.CreateDocumentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.CreateDocumentRequest"; + }; + + return CreateDocumentRequest; })(); - v1.ListDocumentsResponse = (function() { + v1.UpdateDocumentRequest = (function() { /** - * Properties of a ListDocumentsResponse. + * Properties of an UpdateDocumentRequest. * @memberof google.firestore.v1 - * @interface IListDocumentsResponse - * @property {Array.|null} [documents] ListDocumentsResponse documents - * @property {string|null} [nextPageToken] ListDocumentsResponse nextPageToken + * @interface IUpdateDocumentRequest + * @property {google.firestore.v1.IDocument|null} [document] UpdateDocumentRequest document + * @property {google.firestore.v1.IDocumentMask|null} [updateMask] UpdateDocumentRequest updateMask + * @property {google.firestore.v1.IDocumentMask|null} [mask] UpdateDocumentRequest mask + * @property {google.firestore.v1.IPrecondition|null} [currentDocument] UpdateDocumentRequest currentDocument */ /** - * Constructs a new ListDocumentsResponse. + * Constructs a new UpdateDocumentRequest. * @memberof google.firestore.v1 - * @classdesc Represents a ListDocumentsResponse. - * @implements IListDocumentsResponse + * @classdesc Represents an UpdateDocumentRequest. + * @implements IUpdateDocumentRequest * @constructor - * @param {google.firestore.v1.IListDocumentsResponse=} [properties] Properties to set + * @param {google.firestore.v1.IUpdateDocumentRequest=} [properties] Properties to set */ - function ListDocumentsResponse(properties) { - this.documents = []; + function UpdateDocumentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8722,111 +10587,150 @@ } /** - * ListDocumentsResponse documents. - * @member {Array.} documents - * @memberof google.firestore.v1.ListDocumentsResponse + * UpdateDocumentRequest document. + * @member {google.firestore.v1.IDocument|null|undefined} document + * @memberof google.firestore.v1.UpdateDocumentRequest * @instance */ - ListDocumentsResponse.prototype.documents = $util.emptyArray; + UpdateDocumentRequest.prototype.document = null; /** - * ListDocumentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.firestore.v1.ListDocumentsResponse + * UpdateDocumentRequest updateMask. + * @member {google.firestore.v1.IDocumentMask|null|undefined} updateMask + * @memberof google.firestore.v1.UpdateDocumentRequest + * @instance + */ + UpdateDocumentRequest.prototype.updateMask = null; + + /** + * UpdateDocumentRequest mask. + * @member {google.firestore.v1.IDocumentMask|null|undefined} mask + * @memberof google.firestore.v1.UpdateDocumentRequest + * @instance + */ + UpdateDocumentRequest.prototype.mask = null; + + /** + * UpdateDocumentRequest currentDocument. + * @member {google.firestore.v1.IPrecondition|null|undefined} currentDocument + * @memberof google.firestore.v1.UpdateDocumentRequest * @instance */ - ListDocumentsResponse.prototype.nextPageToken = ""; + UpdateDocumentRequest.prototype.currentDocument = null; /** - * Creates a ListDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateDocumentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.firestore.v1.ListDocumentsResponse + * @memberof google.firestore.v1.UpdateDocumentRequest * @static * @param {Object.} object Plain object - * @returns {google.firestore.v1.ListDocumentsResponse} ListDocumentsResponse + * @returns {google.firestore.v1.UpdateDocumentRequest} UpdateDocumentRequest */ - ListDocumentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.v1.ListDocumentsResponse) + UpdateDocumentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.UpdateDocumentRequest) return object; - var message = new $root.google.firestore.v1.ListDocumentsResponse(); - if (object.documents) { - if (!Array.isArray(object.documents)) - throw TypeError(".google.firestore.v1.ListDocumentsResponse.documents: array expected"); - message.documents = []; - for (var i = 0; i < object.documents.length; ++i) { - if (typeof object.documents[i] !== "object") - throw TypeError(".google.firestore.v1.ListDocumentsResponse.documents: object expected"); - message.documents[i] = $root.google.firestore.v1.Document.fromObject(object.documents[i]); - } + var message = new $root.google.firestore.v1.UpdateDocumentRequest(); + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.firestore.v1.UpdateDocumentRequest.document: object expected"); + message.document = $root.google.firestore.v1.Document.fromObject(object.document); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.firestore.v1.UpdateDocumentRequest.updateMask: object expected"); + message.updateMask = $root.google.firestore.v1.DocumentMask.fromObject(object.updateMask); + } + if (object.mask != null) { + if (typeof object.mask !== "object") + throw TypeError(".google.firestore.v1.UpdateDocumentRequest.mask: object expected"); + message.mask = $root.google.firestore.v1.DocumentMask.fromObject(object.mask); + } + if (object.currentDocument != null) { + if (typeof object.currentDocument !== "object") + throw TypeError(".google.firestore.v1.UpdateDocumentRequest.currentDocument: object expected"); + message.currentDocument = $root.google.firestore.v1.Precondition.fromObject(object.currentDocument); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListDocumentsResponse message. Also converts values to other types if specified. + * Creates a plain object from an UpdateDocumentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.firestore.v1.ListDocumentsResponse + * @memberof google.firestore.v1.UpdateDocumentRequest * @static - * @param {google.firestore.v1.ListDocumentsResponse} message ListDocumentsResponse + * @param {google.firestore.v1.UpdateDocumentRequest} message UpdateDocumentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListDocumentsResponse.toObject = function toObject(message, options) { + UpdateDocumentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.documents = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.documents && message.documents.length) { - object.documents = []; - for (var j = 0; j < message.documents.length; ++j) - object.documents[j] = $root.google.firestore.v1.Document.toObject(message.documents[j], options); + if (options.defaults) { + object.document = null; + object.updateMask = null; + object.mask = null; + object.currentDocument = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.firestore.v1.Document.toObject(message.document, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.firestore.v1.DocumentMask.toObject(message.updateMask, options); + if (message.mask != null && message.hasOwnProperty("mask")) + object.mask = $root.google.firestore.v1.DocumentMask.toObject(message.mask, options); + if (message.currentDocument != null && message.hasOwnProperty("currentDocument")) + object.currentDocument = $root.google.firestore.v1.Precondition.toObject(message.currentDocument, options); return object; }; /** - * Converts this ListDocumentsResponse to JSON. + * Converts this UpdateDocumentRequest to JSON. * @function toJSON - * @memberof google.firestore.v1.ListDocumentsResponse + * @memberof google.firestore.v1.UpdateDocumentRequest * @instance * @returns {Object.} JSON object */ - ListDocumentsResponse.prototype.toJSON = function toJSON() { + UpdateDocumentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListDocumentsResponse; + /** + * Gets the default type url for UpdateDocumentRequest + * @function getTypeUrl + * @memberof google.firestore.v1.UpdateDocumentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.UpdateDocumentRequest"; + }; + + return UpdateDocumentRequest; })(); - v1.CreateDocumentRequest = (function() { + v1.DeleteDocumentRequest = (function() { /** - * Properties of a CreateDocumentRequest. + * Properties of a DeleteDocumentRequest. * @memberof google.firestore.v1 - * @interface ICreateDocumentRequest - * @property {string|null} [parent] CreateDocumentRequest parent - * @property {string|null} [collectionId] CreateDocumentRequest collectionId - * @property {string|null} [documentId] CreateDocumentRequest documentId - * @property {google.firestore.v1.IDocument|null} [document] CreateDocumentRequest document - * @property {google.firestore.v1.IDocumentMask|null} [mask] CreateDocumentRequest mask + * @interface IDeleteDocumentRequest + * @property {string|null} [name] DeleteDocumentRequest name + * @property {google.firestore.v1.IPrecondition|null} [currentDocument] DeleteDocumentRequest currentDocument */ /** - * Constructs a new CreateDocumentRequest. + * Constructs a new DeleteDocumentRequest. * @memberof google.firestore.v1 - * @classdesc Represents a CreateDocumentRequest. - * @implements ICreateDocumentRequest + * @classdesc Represents a DeleteDocumentRequest. + * @implements IDeleteDocumentRequest * @constructor - * @param {google.firestore.v1.ICreateDocumentRequest=} [properties] Properties to set + * @param {google.firestore.v1.IDeleteDocumentRequest=} [properties] Properties to set */ - function CreateDocumentRequest(properties) { + function DeleteDocumentRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8834,144 +10738,120 @@ } /** - * CreateDocumentRequest parent. - * @member {string} parent - * @memberof google.firestore.v1.CreateDocumentRequest - * @instance - */ - CreateDocumentRequest.prototype.parent = ""; - - /** - * CreateDocumentRequest collectionId. - * @member {string} collectionId - * @memberof google.firestore.v1.CreateDocumentRequest - * @instance - */ - CreateDocumentRequest.prototype.collectionId = ""; - - /** - * CreateDocumentRequest documentId. - * @member {string} documentId - * @memberof google.firestore.v1.CreateDocumentRequest - * @instance - */ - CreateDocumentRequest.prototype.documentId = ""; - - /** - * CreateDocumentRequest document. - * @member {google.firestore.v1.IDocument|null|undefined} document - * @memberof google.firestore.v1.CreateDocumentRequest + * DeleteDocumentRequest name. + * @member {string} name + * @memberof google.firestore.v1.DeleteDocumentRequest * @instance */ - CreateDocumentRequest.prototype.document = null; + DeleteDocumentRequest.prototype.name = ""; /** - * CreateDocumentRequest mask. - * @member {google.firestore.v1.IDocumentMask|null|undefined} mask - * @memberof google.firestore.v1.CreateDocumentRequest + * DeleteDocumentRequest currentDocument. + * @member {google.firestore.v1.IPrecondition|null|undefined} currentDocument + * @memberof google.firestore.v1.DeleteDocumentRequest * @instance */ - CreateDocumentRequest.prototype.mask = null; + DeleteDocumentRequest.prototype.currentDocument = null; /** - * Creates a CreateDocumentRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteDocumentRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.firestore.v1.CreateDocumentRequest + * @memberof google.firestore.v1.DeleteDocumentRequest * @static * @param {Object.} object Plain object - * @returns {google.firestore.v1.CreateDocumentRequest} CreateDocumentRequest + * @returns {google.firestore.v1.DeleteDocumentRequest} DeleteDocumentRequest */ - CreateDocumentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.v1.CreateDocumentRequest) + DeleteDocumentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.DeleteDocumentRequest) return object; - var message = new $root.google.firestore.v1.CreateDocumentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.collectionId != null) - message.collectionId = String(object.collectionId); - if (object.documentId != null) - message.documentId = String(object.documentId); - if (object.document != null) { - if (typeof object.document !== "object") - throw TypeError(".google.firestore.v1.CreateDocumentRequest.document: object expected"); - message.document = $root.google.firestore.v1.Document.fromObject(object.document); - } - if (object.mask != null) { - if (typeof object.mask !== "object") - throw TypeError(".google.firestore.v1.CreateDocumentRequest.mask: object expected"); - message.mask = $root.google.firestore.v1.DocumentMask.fromObject(object.mask); + var message = new $root.google.firestore.v1.DeleteDocumentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.currentDocument != null) { + if (typeof object.currentDocument !== "object") + throw TypeError(".google.firestore.v1.DeleteDocumentRequest.currentDocument: object expected"); + message.currentDocument = $root.google.firestore.v1.Precondition.fromObject(object.currentDocument); } return message; }; /** - * Creates a plain object from a CreateDocumentRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteDocumentRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.firestore.v1.CreateDocumentRequest + * @memberof google.firestore.v1.DeleteDocumentRequest * @static - * @param {google.firestore.v1.CreateDocumentRequest} message CreateDocumentRequest + * @param {google.firestore.v1.DeleteDocumentRequest} message DeleteDocumentRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateDocumentRequest.toObject = function toObject(message, options) { + DeleteDocumentRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.collectionId = ""; - object.documentId = ""; - object.document = null; - object.mask = null; + object.name = ""; + object.currentDocument = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.collectionId != null && message.hasOwnProperty("collectionId")) - object.collectionId = message.collectionId; - if (message.documentId != null && message.hasOwnProperty("documentId")) - object.documentId = message.documentId; - if (message.document != null && message.hasOwnProperty("document")) - object.document = $root.google.firestore.v1.Document.toObject(message.document, options); - if (message.mask != null && message.hasOwnProperty("mask")) - object.mask = $root.google.firestore.v1.DocumentMask.toObject(message.mask, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.currentDocument != null && message.hasOwnProperty("currentDocument")) + object.currentDocument = $root.google.firestore.v1.Precondition.toObject(message.currentDocument, options); return object; }; /** - * Converts this CreateDocumentRequest to JSON. + * Converts this DeleteDocumentRequest to JSON. * @function toJSON - * @memberof google.firestore.v1.CreateDocumentRequest + * @memberof google.firestore.v1.DeleteDocumentRequest * @instance * @returns {Object.} JSON object */ - CreateDocumentRequest.prototype.toJSON = function toJSON() { + DeleteDocumentRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateDocumentRequest; + /** + * Gets the default type url for DeleteDocumentRequest + * @function getTypeUrl + * @memberof google.firestore.v1.DeleteDocumentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.DeleteDocumentRequest"; + }; + + return DeleteDocumentRequest; })(); - v1.UpdateDocumentRequest = (function() { + v1.BatchGetDocumentsRequest = (function() { /** - * Properties of an UpdateDocumentRequest. + * Properties of a BatchGetDocumentsRequest. * @memberof google.firestore.v1 - * @interface IUpdateDocumentRequest - * @property {google.firestore.v1.IDocument|null} [document] UpdateDocumentRequest document - * @property {google.firestore.v1.IDocumentMask|null} [updateMask] UpdateDocumentRequest updateMask - * @property {google.firestore.v1.IDocumentMask|null} [mask] UpdateDocumentRequest mask - * @property {google.firestore.v1.IPrecondition|null} [currentDocument] UpdateDocumentRequest currentDocument + * @interface IBatchGetDocumentsRequest + * @property {string|null} [database] BatchGetDocumentsRequest database + * @property {Array.|null} [documents] BatchGetDocumentsRequest documents + * @property {google.firestore.v1.IDocumentMask|null} [mask] BatchGetDocumentsRequest mask + * @property {Uint8Array|null} [transaction] BatchGetDocumentsRequest transaction + * @property {google.firestore.v1.ITransactionOptions|null} [newTransaction] BatchGetDocumentsRequest newTransaction + * @property {google.protobuf.ITimestamp|null} [readTime] BatchGetDocumentsRequest readTime */ /** - * Constructs a new UpdateDocumentRequest. + * Constructs a new BatchGetDocumentsRequest. * @memberof google.firestore.v1 - * @classdesc Represents an UpdateDocumentRequest. - * @implements IUpdateDocumentRequest + * @classdesc Represents a BatchGetDocumentsRequest. + * @implements IBatchGetDocumentsRequest * @constructor - * @param {google.firestore.v1.IUpdateDocumentRequest=} [properties] Properties to set + * @param {google.firestore.v1.IBatchGetDocumentsRequest=} [properties] Properties to set */ - function UpdateDocumentRequest(properties) { + function BatchGetDocumentsRequest(properties) { + this.documents = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8979,135 +10859,207 @@ } /** - * UpdateDocumentRequest document. - * @member {google.firestore.v1.IDocument|null|undefined} document - * @memberof google.firestore.v1.UpdateDocumentRequest + * BatchGetDocumentsRequest database. + * @member {string} database + * @memberof google.firestore.v1.BatchGetDocumentsRequest * @instance */ - UpdateDocumentRequest.prototype.document = null; + BatchGetDocumentsRequest.prototype.database = ""; /** - * UpdateDocumentRequest updateMask. - * @member {google.firestore.v1.IDocumentMask|null|undefined} updateMask - * @memberof google.firestore.v1.UpdateDocumentRequest + * BatchGetDocumentsRequest documents. + * @member {Array.} documents + * @memberof google.firestore.v1.BatchGetDocumentsRequest * @instance */ - UpdateDocumentRequest.prototype.updateMask = null; + BatchGetDocumentsRequest.prototype.documents = $util.emptyArray; /** - * UpdateDocumentRequest mask. + * BatchGetDocumentsRequest mask. * @member {google.firestore.v1.IDocumentMask|null|undefined} mask - * @memberof google.firestore.v1.UpdateDocumentRequest + * @memberof google.firestore.v1.BatchGetDocumentsRequest * @instance */ - UpdateDocumentRequest.prototype.mask = null; + BatchGetDocumentsRequest.prototype.mask = null; /** - * UpdateDocumentRequest currentDocument. - * @member {google.firestore.v1.IPrecondition|null|undefined} currentDocument - * @memberof google.firestore.v1.UpdateDocumentRequest + * BatchGetDocumentsRequest transaction. + * @member {Uint8Array|null|undefined} transaction + * @memberof google.firestore.v1.BatchGetDocumentsRequest * @instance */ - UpdateDocumentRequest.prototype.currentDocument = null; + BatchGetDocumentsRequest.prototype.transaction = null; /** - * Creates an UpdateDocumentRequest message from a plain object. Also converts values to their respective internal types. + * BatchGetDocumentsRequest newTransaction. + * @member {google.firestore.v1.ITransactionOptions|null|undefined} newTransaction + * @memberof google.firestore.v1.BatchGetDocumentsRequest + * @instance + */ + BatchGetDocumentsRequest.prototype.newTransaction = null; + + /** + * BatchGetDocumentsRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.firestore.v1.BatchGetDocumentsRequest + * @instance + */ + BatchGetDocumentsRequest.prototype.readTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BatchGetDocumentsRequest consistencySelector. + * @member {"transaction"|"newTransaction"|"readTime"|undefined} consistencySelector + * @memberof google.firestore.v1.BatchGetDocumentsRequest + * @instance + */ + Object.defineProperty(BatchGetDocumentsRequest.prototype, "consistencySelector", { + get: $util.oneOfGetter($oneOfFields = ["transaction", "newTransaction", "readTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a BatchGetDocumentsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.firestore.v1.UpdateDocumentRequest + * @memberof google.firestore.v1.BatchGetDocumentsRequest * @static * @param {Object.} object Plain object - * @returns {google.firestore.v1.UpdateDocumentRequest} UpdateDocumentRequest + * @returns {google.firestore.v1.BatchGetDocumentsRequest} BatchGetDocumentsRequest */ - UpdateDocumentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.v1.UpdateDocumentRequest) + BatchGetDocumentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.BatchGetDocumentsRequest) return object; - var message = new $root.google.firestore.v1.UpdateDocumentRequest(); - if (object.document != null) { - if (typeof object.document !== "object") - throw TypeError(".google.firestore.v1.UpdateDocumentRequest.document: object expected"); - message.document = $root.google.firestore.v1.Document.fromObject(object.document); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.firestore.v1.UpdateDocumentRequest.updateMask: object expected"); - message.updateMask = $root.google.firestore.v1.DocumentMask.fromObject(object.updateMask); + var message = new $root.google.firestore.v1.BatchGetDocumentsRequest(); + if (object.database != null) + message.database = String(object.database); + if (object.documents) { + if (!Array.isArray(object.documents)) + throw TypeError(".google.firestore.v1.BatchGetDocumentsRequest.documents: array expected"); + message.documents = []; + for (var i = 0; i < object.documents.length; ++i) + message.documents[i] = String(object.documents[i]); } if (object.mask != null) { if (typeof object.mask !== "object") - throw TypeError(".google.firestore.v1.UpdateDocumentRequest.mask: object expected"); + throw TypeError(".google.firestore.v1.BatchGetDocumentsRequest.mask: object expected"); message.mask = $root.google.firestore.v1.DocumentMask.fromObject(object.mask); } - if (object.currentDocument != null) { - if (typeof object.currentDocument !== "object") - throw TypeError(".google.firestore.v1.UpdateDocumentRequest.currentDocument: object expected"); - message.currentDocument = $root.google.firestore.v1.Precondition.fromObject(object.currentDocument); + if (object.transaction != null) + if (typeof object.transaction === "string") + $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); + else if (object.transaction.length >= 0) + message.transaction = object.transaction; + if (object.newTransaction != null) { + if (typeof object.newTransaction !== "object") + throw TypeError(".google.firestore.v1.BatchGetDocumentsRequest.newTransaction: object expected"); + message.newTransaction = $root.google.firestore.v1.TransactionOptions.fromObject(object.newTransaction); + } + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.firestore.v1.BatchGetDocumentsRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } return message; }; /** - * Creates a plain object from an UpdateDocumentRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchGetDocumentsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.firestore.v1.UpdateDocumentRequest + * @memberof google.firestore.v1.BatchGetDocumentsRequest * @static - * @param {google.firestore.v1.UpdateDocumentRequest} message UpdateDocumentRequest + * @param {google.firestore.v1.BatchGetDocumentsRequest} message BatchGetDocumentsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateDocumentRequest.toObject = function toObject(message, options) { + BatchGetDocumentsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.documents = []; if (options.defaults) { - object.document = null; - object.updateMask = null; + object.database = ""; object.mask = null; - object.currentDocument = null; } - if (message.document != null && message.hasOwnProperty("document")) - object.document = $root.google.firestore.v1.Document.toObject(message.document, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.firestore.v1.DocumentMask.toObject(message.updateMask, options); + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + if (message.documents && message.documents.length) { + object.documents = []; + for (var j = 0; j < message.documents.length; ++j) + object.documents[j] = message.documents[j]; + } if (message.mask != null && message.hasOwnProperty("mask")) object.mask = $root.google.firestore.v1.DocumentMask.toObject(message.mask, options); - if (message.currentDocument != null && message.hasOwnProperty("currentDocument")) - object.currentDocument = $root.google.firestore.v1.Precondition.toObject(message.currentDocument, options); + if (message.transaction != null && message.hasOwnProperty("transaction")) { + object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction; + if (options.oneofs) + object.consistencySelector = "transaction"; + } + if (message.newTransaction != null && message.hasOwnProperty("newTransaction")) { + object.newTransaction = $root.google.firestore.v1.TransactionOptions.toObject(message.newTransaction, options); + if (options.oneofs) + object.consistencySelector = "newTransaction"; + } + if (message.readTime != null && message.hasOwnProperty("readTime")) { + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (options.oneofs) + object.consistencySelector = "readTime"; + } return object; }; /** - * Converts this UpdateDocumentRequest to JSON. + * Converts this BatchGetDocumentsRequest to JSON. * @function toJSON - * @memberof google.firestore.v1.UpdateDocumentRequest + * @memberof google.firestore.v1.BatchGetDocumentsRequest * @instance * @returns {Object.} JSON object */ - UpdateDocumentRequest.prototype.toJSON = function toJSON() { + BatchGetDocumentsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateDocumentRequest; + /** + * Gets the default type url for BatchGetDocumentsRequest + * @function getTypeUrl + * @memberof google.firestore.v1.BatchGetDocumentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchGetDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.BatchGetDocumentsRequest"; + }; + + return BatchGetDocumentsRequest; })(); - v1.DeleteDocumentRequest = (function() { + v1.BatchGetDocumentsResponse = (function() { /** - * Properties of a DeleteDocumentRequest. + * Properties of a BatchGetDocumentsResponse. * @memberof google.firestore.v1 - * @interface IDeleteDocumentRequest - * @property {string|null} [name] DeleteDocumentRequest name - * @property {google.firestore.v1.IPrecondition|null} [currentDocument] DeleteDocumentRequest currentDocument + * @interface IBatchGetDocumentsResponse + * @property {google.firestore.v1.IDocument|null} [found] BatchGetDocumentsResponse found + * @property {string|null} [missing] BatchGetDocumentsResponse missing + * @property {Uint8Array|null} [transaction] BatchGetDocumentsResponse transaction + * @property {google.protobuf.ITimestamp|null} [readTime] BatchGetDocumentsResponse readTime */ /** - * Constructs a new DeleteDocumentRequest. + * Constructs a new BatchGetDocumentsResponse. * @memberof google.firestore.v1 - * @classdesc Represents a DeleteDocumentRequest. - * @implements IDeleteDocumentRequest + * @classdesc Represents a BatchGetDocumentsResponse. + * @implements IBatchGetDocumentsResponse * @constructor - * @param {google.firestore.v1.IDeleteDocumentRequest=} [properties] Properties to set + * @param {google.firestore.v1.IBatchGetDocumentsResponse=} [properties] Properties to set */ - function DeleteDocumentRequest(properties) { + function BatchGetDocumentsResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9115,105 +11067,171 @@ } /** - * DeleteDocumentRequest name. - * @member {string} name - * @memberof google.firestore.v1.DeleteDocumentRequest + * BatchGetDocumentsResponse found. + * @member {google.firestore.v1.IDocument|null|undefined} found + * @memberof google.firestore.v1.BatchGetDocumentsResponse * @instance */ - DeleteDocumentRequest.prototype.name = ""; + BatchGetDocumentsResponse.prototype.found = null; /** - * DeleteDocumentRequest currentDocument. - * @member {google.firestore.v1.IPrecondition|null|undefined} currentDocument - * @memberof google.firestore.v1.DeleteDocumentRequest + * BatchGetDocumentsResponse missing. + * @member {string|null|undefined} missing + * @memberof google.firestore.v1.BatchGetDocumentsResponse * @instance */ - DeleteDocumentRequest.prototype.currentDocument = null; + BatchGetDocumentsResponse.prototype.missing = null; /** - * Creates a DeleteDocumentRequest message from a plain object. Also converts values to their respective internal types. + * BatchGetDocumentsResponse transaction. + * @member {Uint8Array} transaction + * @memberof google.firestore.v1.BatchGetDocumentsResponse + * @instance + */ + BatchGetDocumentsResponse.prototype.transaction = $util.newBuffer([]); + + /** + * BatchGetDocumentsResponse readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.firestore.v1.BatchGetDocumentsResponse + * @instance + */ + BatchGetDocumentsResponse.prototype.readTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BatchGetDocumentsResponse result. + * @member {"found"|"missing"|undefined} result + * @memberof google.firestore.v1.BatchGetDocumentsResponse + * @instance + */ + Object.defineProperty(BatchGetDocumentsResponse.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["found", "missing"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a BatchGetDocumentsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.firestore.v1.DeleteDocumentRequest + * @memberof google.firestore.v1.BatchGetDocumentsResponse * @static * @param {Object.} object Plain object - * @returns {google.firestore.v1.DeleteDocumentRequest} DeleteDocumentRequest + * @returns {google.firestore.v1.BatchGetDocumentsResponse} BatchGetDocumentsResponse */ - DeleteDocumentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.v1.DeleteDocumentRequest) - return object; - var message = new $root.google.firestore.v1.DeleteDocumentRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.currentDocument != null) { - if (typeof object.currentDocument !== "object") - throw TypeError(".google.firestore.v1.DeleteDocumentRequest.currentDocument: object expected"); - message.currentDocument = $root.google.firestore.v1.Precondition.fromObject(object.currentDocument); + BatchGetDocumentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.BatchGetDocumentsResponse) + return object; + var message = new $root.google.firestore.v1.BatchGetDocumentsResponse(); + if (object.found != null) { + if (typeof object.found !== "object") + throw TypeError(".google.firestore.v1.BatchGetDocumentsResponse.found: object expected"); + message.found = $root.google.firestore.v1.Document.fromObject(object.found); + } + if (object.missing != null) + message.missing = String(object.missing); + if (object.transaction != null) + if (typeof object.transaction === "string") + $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); + else if (object.transaction.length >= 0) + message.transaction = object.transaction; + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.firestore.v1.BatchGetDocumentsResponse.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } return message; }; /** - * Creates a plain object from a DeleteDocumentRequest message. Also converts values to other types if specified. + * Creates a plain object from a BatchGetDocumentsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.firestore.v1.DeleteDocumentRequest + * @memberof google.firestore.v1.BatchGetDocumentsResponse * @static - * @param {google.firestore.v1.DeleteDocumentRequest} message DeleteDocumentRequest + * @param {google.firestore.v1.BatchGetDocumentsResponse} message BatchGetDocumentsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteDocumentRequest.toObject = function toObject(message, options) { + BatchGetDocumentsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.currentDocument = null; + if (options.bytes === String) + object.transaction = ""; + else { + object.transaction = []; + if (options.bytes !== Array) + object.transaction = $util.newBuffer(object.transaction); + } + object.readTime = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.currentDocument != null && message.hasOwnProperty("currentDocument")) - object.currentDocument = $root.google.firestore.v1.Precondition.toObject(message.currentDocument, options); + if (message.found != null && message.hasOwnProperty("found")) { + object.found = $root.google.firestore.v1.Document.toObject(message.found, options); + if (options.oneofs) + object.result = "found"; + } + if (message.missing != null && message.hasOwnProperty("missing")) { + object.missing = message.missing; + if (options.oneofs) + object.result = "missing"; + } + if (message.transaction != null && message.hasOwnProperty("transaction")) + object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction; + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); return object; }; /** - * Converts this DeleteDocumentRequest to JSON. + * Converts this BatchGetDocumentsResponse to JSON. * @function toJSON - * @memberof google.firestore.v1.DeleteDocumentRequest + * @memberof google.firestore.v1.BatchGetDocumentsResponse * @instance * @returns {Object.} JSON object */ - DeleteDocumentRequest.prototype.toJSON = function toJSON() { + BatchGetDocumentsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteDocumentRequest; + /** + * Gets the default type url for BatchGetDocumentsResponse + * @function getTypeUrl + * @memberof google.firestore.v1.BatchGetDocumentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchGetDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.BatchGetDocumentsResponse"; + }; + + return BatchGetDocumentsResponse; })(); - v1.BatchGetDocumentsRequest = (function() { + v1.BeginTransactionRequest = (function() { /** - * Properties of a BatchGetDocumentsRequest. + * Properties of a BeginTransactionRequest. * @memberof google.firestore.v1 - * @interface IBatchGetDocumentsRequest - * @property {string|null} [database] BatchGetDocumentsRequest database - * @property {Array.|null} [documents] BatchGetDocumentsRequest documents - * @property {google.firestore.v1.IDocumentMask|null} [mask] BatchGetDocumentsRequest mask - * @property {Uint8Array|null} [transaction] BatchGetDocumentsRequest transaction - * @property {google.firestore.v1.ITransactionOptions|null} [newTransaction] BatchGetDocumentsRequest newTransaction - * @property {google.protobuf.ITimestamp|null} [readTime] BatchGetDocumentsRequest readTime + * @interface IBeginTransactionRequest + * @property {string|null} [database] BeginTransactionRequest database + * @property {google.firestore.v1.ITransactionOptions|null} [options] BeginTransactionRequest options */ /** - * Constructs a new BatchGetDocumentsRequest. + * Constructs a new BeginTransactionRequest. * @memberof google.firestore.v1 - * @classdesc Represents a BatchGetDocumentsRequest. - * @implements IBatchGetDocumentsRequest + * @classdesc Represents a BeginTransactionRequest. + * @implements IBeginTransactionRequest * @constructor - * @param {google.firestore.v1.IBatchGetDocumentsRequest=} [properties] Properties to set + * @param {google.firestore.v1.IBeginTransactionRequest=} [properties] Properties to set */ - function BatchGetDocumentsRequest(properties) { - this.documents = []; + function BeginTransactionRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9221,192 +11239,114 @@ } /** - * BatchGetDocumentsRequest database. + * BeginTransactionRequest database. * @member {string} database - * @memberof google.firestore.v1.BatchGetDocumentsRequest - * @instance - */ - BatchGetDocumentsRequest.prototype.database = ""; - - /** - * BatchGetDocumentsRequest documents. - * @member {Array.} documents - * @memberof google.firestore.v1.BatchGetDocumentsRequest - * @instance - */ - BatchGetDocumentsRequest.prototype.documents = $util.emptyArray; - - /** - * BatchGetDocumentsRequest mask. - * @member {google.firestore.v1.IDocumentMask|null|undefined} mask - * @memberof google.firestore.v1.BatchGetDocumentsRequest - * @instance - */ - BatchGetDocumentsRequest.prototype.mask = null; - - /** - * BatchGetDocumentsRequest transaction. - * @member {Uint8Array|null|undefined} transaction - * @memberof google.firestore.v1.BatchGetDocumentsRequest - * @instance - */ - BatchGetDocumentsRequest.prototype.transaction = null; - - /** - * BatchGetDocumentsRequest newTransaction. - * @member {google.firestore.v1.ITransactionOptions|null|undefined} newTransaction - * @memberof google.firestore.v1.BatchGetDocumentsRequest - * @instance - */ - BatchGetDocumentsRequest.prototype.newTransaction = null; - - /** - * BatchGetDocumentsRequest readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.firestore.v1.BatchGetDocumentsRequest + * @memberof google.firestore.v1.BeginTransactionRequest * @instance */ - BatchGetDocumentsRequest.prototype.readTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + BeginTransactionRequest.prototype.database = ""; /** - * BatchGetDocumentsRequest consistencySelector. - * @member {"transaction"|"newTransaction"|"readTime"|undefined} consistencySelector - * @memberof google.firestore.v1.BatchGetDocumentsRequest + * BeginTransactionRequest options. + * @member {google.firestore.v1.ITransactionOptions|null|undefined} options + * @memberof google.firestore.v1.BeginTransactionRequest * @instance */ - Object.defineProperty(BatchGetDocumentsRequest.prototype, "consistencySelector", { - get: $util.oneOfGetter($oneOfFields = ["transaction", "newTransaction", "readTime"]), - set: $util.oneOfSetter($oneOfFields) - }); + BeginTransactionRequest.prototype.options = null; /** - * Creates a BatchGetDocumentsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BeginTransactionRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.firestore.v1.BatchGetDocumentsRequest + * @memberof google.firestore.v1.BeginTransactionRequest * @static * @param {Object.} object Plain object - * @returns {google.firestore.v1.BatchGetDocumentsRequest} BatchGetDocumentsRequest + * @returns {google.firestore.v1.BeginTransactionRequest} BeginTransactionRequest */ - BatchGetDocumentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.v1.BatchGetDocumentsRequest) + BeginTransactionRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.BeginTransactionRequest) return object; - var message = new $root.google.firestore.v1.BatchGetDocumentsRequest(); + var message = new $root.google.firestore.v1.BeginTransactionRequest(); if (object.database != null) message.database = String(object.database); - if (object.documents) { - if (!Array.isArray(object.documents)) - throw TypeError(".google.firestore.v1.BatchGetDocumentsRequest.documents: array expected"); - message.documents = []; - for (var i = 0; i < object.documents.length; ++i) - message.documents[i] = String(object.documents[i]); - } - if (object.mask != null) { - if (typeof object.mask !== "object") - throw TypeError(".google.firestore.v1.BatchGetDocumentsRequest.mask: object expected"); - message.mask = $root.google.firestore.v1.DocumentMask.fromObject(object.mask); - } - if (object.transaction != null) - if (typeof object.transaction === "string") - $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) - message.transaction = object.transaction; - if (object.newTransaction != null) { - if (typeof object.newTransaction !== "object") - throw TypeError(".google.firestore.v1.BatchGetDocumentsRequest.newTransaction: object expected"); - message.newTransaction = $root.google.firestore.v1.TransactionOptions.fromObject(object.newTransaction); - } - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.firestore.v1.BatchGetDocumentsRequest.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.firestore.v1.BeginTransactionRequest.options: object expected"); + message.options = $root.google.firestore.v1.TransactionOptions.fromObject(object.options); } return message; }; /** - * Creates a plain object from a BatchGetDocumentsRequest message. Also converts values to other types if specified. + * Creates a plain object from a BeginTransactionRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.firestore.v1.BatchGetDocumentsRequest + * @memberof google.firestore.v1.BeginTransactionRequest * @static - * @param {google.firestore.v1.BatchGetDocumentsRequest} message BatchGetDocumentsRequest + * @param {google.firestore.v1.BeginTransactionRequest} message BeginTransactionRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchGetDocumentsRequest.toObject = function toObject(message, options) { + BeginTransactionRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.documents = []; if (options.defaults) { object.database = ""; - object.mask = null; + object.options = null; } if (message.database != null && message.hasOwnProperty("database")) object.database = message.database; - if (message.documents && message.documents.length) { - object.documents = []; - for (var j = 0; j < message.documents.length; ++j) - object.documents[j] = message.documents[j]; - } - if (message.mask != null && message.hasOwnProperty("mask")) - object.mask = $root.google.firestore.v1.DocumentMask.toObject(message.mask, options); - if (message.transaction != null && message.hasOwnProperty("transaction")) { - object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction; - if (options.oneofs) - object.consistencySelector = "transaction"; - } - if (message.newTransaction != null && message.hasOwnProperty("newTransaction")) { - object.newTransaction = $root.google.firestore.v1.TransactionOptions.toObject(message.newTransaction, options); - if (options.oneofs) - object.consistencySelector = "newTransaction"; - } - if (message.readTime != null && message.hasOwnProperty("readTime")) { - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (options.oneofs) - object.consistencySelector = "readTime"; - } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.firestore.v1.TransactionOptions.toObject(message.options, options); return object; }; /** - * Converts this BatchGetDocumentsRequest to JSON. + * Converts this BeginTransactionRequest to JSON. * @function toJSON - * @memberof google.firestore.v1.BatchGetDocumentsRequest + * @memberof google.firestore.v1.BeginTransactionRequest * @instance * @returns {Object.} JSON object */ - BatchGetDocumentsRequest.prototype.toJSON = function toJSON() { + BeginTransactionRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchGetDocumentsRequest; + /** + * Gets the default type url for BeginTransactionRequest + * @function getTypeUrl + * @memberof google.firestore.v1.BeginTransactionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BeginTransactionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.BeginTransactionRequest"; + }; + + return BeginTransactionRequest; })(); - v1.BatchGetDocumentsResponse = (function() { + v1.BeginTransactionResponse = (function() { /** - * Properties of a BatchGetDocumentsResponse. + * Properties of a BeginTransactionResponse. * @memberof google.firestore.v1 - * @interface IBatchGetDocumentsResponse - * @property {google.firestore.v1.IDocument|null} [found] BatchGetDocumentsResponse found - * @property {string|null} [missing] BatchGetDocumentsResponse missing - * @property {Uint8Array|null} [transaction] BatchGetDocumentsResponse transaction - * @property {google.protobuf.ITimestamp|null} [readTime] BatchGetDocumentsResponse readTime + * @interface IBeginTransactionResponse + * @property {Uint8Array|null} [transaction] BeginTransactionResponse transaction */ /** - * Constructs a new BatchGetDocumentsResponse. + * Constructs a new BeginTransactionResponse. * @memberof google.firestore.v1 - * @classdesc Represents a BatchGetDocumentsResponse. - * @implements IBatchGetDocumentsResponse + * @classdesc Represents a BeginTransactionResponse. + * @implements IBeginTransactionResponse * @constructor - * @param {google.firestore.v1.IBatchGetDocumentsResponse=} [properties] Properties to set + * @param {google.firestore.v1.IBeginTransactionResponse=} [properties] Properties to set */ - function BatchGetDocumentsResponse(properties) { + function BeginTransactionResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9414,97 +11354,47 @@ } /** - * BatchGetDocumentsResponse found. - * @member {google.firestore.v1.IDocument|null|undefined} found - * @memberof google.firestore.v1.BatchGetDocumentsResponse - * @instance - */ - BatchGetDocumentsResponse.prototype.found = null; - - /** - * BatchGetDocumentsResponse missing. - * @member {string|null|undefined} missing - * @memberof google.firestore.v1.BatchGetDocumentsResponse - * @instance - */ - BatchGetDocumentsResponse.prototype.missing = null; - - /** - * BatchGetDocumentsResponse transaction. + * BeginTransactionResponse transaction. * @member {Uint8Array} transaction - * @memberof google.firestore.v1.BatchGetDocumentsResponse - * @instance - */ - BatchGetDocumentsResponse.prototype.transaction = $util.newBuffer([]); - - /** - * BatchGetDocumentsResponse readTime. - * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.firestore.v1.BatchGetDocumentsResponse - * @instance - */ - BatchGetDocumentsResponse.prototype.readTime = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BatchGetDocumentsResponse result. - * @member {"found"|"missing"|undefined} result - * @memberof google.firestore.v1.BatchGetDocumentsResponse + * @memberof google.firestore.v1.BeginTransactionResponse * @instance */ - Object.defineProperty(BatchGetDocumentsResponse.prototype, "result", { - get: $util.oneOfGetter($oneOfFields = ["found", "missing"]), - set: $util.oneOfSetter($oneOfFields) - }); + BeginTransactionResponse.prototype.transaction = $util.newBuffer([]); /** - * Creates a BatchGetDocumentsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BeginTransactionResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.firestore.v1.BatchGetDocumentsResponse + * @memberof google.firestore.v1.BeginTransactionResponse * @static * @param {Object.} object Plain object - * @returns {google.firestore.v1.BatchGetDocumentsResponse} BatchGetDocumentsResponse + * @returns {google.firestore.v1.BeginTransactionResponse} BeginTransactionResponse */ - BatchGetDocumentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.v1.BatchGetDocumentsResponse) + BeginTransactionResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.BeginTransactionResponse) return object; - var message = new $root.google.firestore.v1.BatchGetDocumentsResponse(); - if (object.found != null) { - if (typeof object.found !== "object") - throw TypeError(".google.firestore.v1.BatchGetDocumentsResponse.found: object expected"); - message.found = $root.google.firestore.v1.Document.fromObject(object.found); - } - if (object.missing != null) - message.missing = String(object.missing); + var message = new $root.google.firestore.v1.BeginTransactionResponse(); if (object.transaction != null) if (typeof object.transaction === "string") $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) + else if (object.transaction.length >= 0) message.transaction = object.transaction; - if (object.readTime != null) { - if (typeof object.readTime !== "object") - throw TypeError(".google.firestore.v1.BatchGetDocumentsResponse.readTime: object expected"); - message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); - } return message; }; /** - * Creates a plain object from a BatchGetDocumentsResponse message. Also converts values to other types if specified. + * Creates a plain object from a BeginTransactionResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.firestore.v1.BatchGetDocumentsResponse + * @memberof google.firestore.v1.BeginTransactionResponse * @static - * @param {google.firestore.v1.BatchGetDocumentsResponse} message BatchGetDocumentsResponse + * @param {google.firestore.v1.BeginTransactionResponse} message BeginTransactionResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BatchGetDocumentsResponse.toObject = function toObject(message, options) { + BeginTransactionResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { + if (options.defaults) if (options.bytes === String) object.transaction = ""; else { @@ -9512,58 +11402,61 @@ if (options.bytes !== Array) object.transaction = $util.newBuffer(object.transaction); } - object.readTime = null; - } - if (message.found != null && message.hasOwnProperty("found")) { - object.found = $root.google.firestore.v1.Document.toObject(message.found, options); - if (options.oneofs) - object.result = "found"; - } - if (message.missing != null && message.hasOwnProperty("missing")) { - object.missing = message.missing; - if (options.oneofs) - object.result = "missing"; - } if (message.transaction != null && message.hasOwnProperty("transaction")) object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction; - if (message.readTime != null && message.hasOwnProperty("readTime")) - object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); return object; }; /** - * Converts this BatchGetDocumentsResponse to JSON. + * Converts this BeginTransactionResponse to JSON. * @function toJSON - * @memberof google.firestore.v1.BatchGetDocumentsResponse + * @memberof google.firestore.v1.BeginTransactionResponse * @instance * @returns {Object.} JSON object */ - BatchGetDocumentsResponse.prototype.toJSON = function toJSON() { + BeginTransactionResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BatchGetDocumentsResponse; + /** + * Gets the default type url for BeginTransactionResponse + * @function getTypeUrl + * @memberof google.firestore.v1.BeginTransactionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BeginTransactionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.BeginTransactionResponse"; + }; + + return BeginTransactionResponse; })(); - v1.BeginTransactionRequest = (function() { + v1.CommitRequest = (function() { /** - * Properties of a BeginTransactionRequest. + * Properties of a CommitRequest. * @memberof google.firestore.v1 - * @interface IBeginTransactionRequest - * @property {string|null} [database] BeginTransactionRequest database - * @property {google.firestore.v1.ITransactionOptions|null} [options] BeginTransactionRequest options + * @interface ICommitRequest + * @property {string|null} [database] CommitRequest database + * @property {Array.|null} [writes] CommitRequest writes + * @property {Uint8Array|null} [transaction] CommitRequest transaction */ /** - * Constructs a new BeginTransactionRequest. + * Constructs a new CommitRequest. * @memberof google.firestore.v1 - * @classdesc Represents a BeginTransactionRequest. - * @implements IBeginTransactionRequest + * @classdesc Represents a CommitRequest. + * @implements ICommitRequest * @constructor - * @param {google.firestore.v1.IBeginTransactionRequest=} [properties] Properties to set + * @param {google.firestore.v1.ICommitRequest=} [properties] Properties to set */ - function BeginTransactionRequest(properties) { + function CommitRequest(properties) { + this.writes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9571,99 +11464,147 @@ } /** - * BeginTransactionRequest database. + * CommitRequest database. * @member {string} database - * @memberof google.firestore.v1.BeginTransactionRequest + * @memberof google.firestore.v1.CommitRequest * @instance */ - BeginTransactionRequest.prototype.database = ""; + CommitRequest.prototype.database = ""; /** - * BeginTransactionRequest options. - * @member {google.firestore.v1.ITransactionOptions|null|undefined} options - * @memberof google.firestore.v1.BeginTransactionRequest + * CommitRequest writes. + * @member {Array.} writes + * @memberof google.firestore.v1.CommitRequest * @instance */ - BeginTransactionRequest.prototype.options = null; + CommitRequest.prototype.writes = $util.emptyArray; /** - * Creates a BeginTransactionRequest message from a plain object. Also converts values to their respective internal types. + * CommitRequest transaction. + * @member {Uint8Array} transaction + * @memberof google.firestore.v1.CommitRequest + * @instance + */ + CommitRequest.prototype.transaction = $util.newBuffer([]); + + /** + * Creates a CommitRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.firestore.v1.BeginTransactionRequest + * @memberof google.firestore.v1.CommitRequest * @static * @param {Object.} object Plain object - * @returns {google.firestore.v1.BeginTransactionRequest} BeginTransactionRequest + * @returns {google.firestore.v1.CommitRequest} CommitRequest */ - BeginTransactionRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.v1.BeginTransactionRequest) + CommitRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.CommitRequest) return object; - var message = new $root.google.firestore.v1.BeginTransactionRequest(); + var message = new $root.google.firestore.v1.CommitRequest(); if (object.database != null) message.database = String(object.database); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.firestore.v1.BeginTransactionRequest.options: object expected"); - message.options = $root.google.firestore.v1.TransactionOptions.fromObject(object.options); + if (object.writes) { + if (!Array.isArray(object.writes)) + throw TypeError(".google.firestore.v1.CommitRequest.writes: array expected"); + message.writes = []; + for (var i = 0; i < object.writes.length; ++i) { + if (typeof object.writes[i] !== "object") + throw TypeError(".google.firestore.v1.CommitRequest.writes: object expected"); + message.writes[i] = $root.google.firestore.v1.Write.fromObject(object.writes[i]); + } } + if (object.transaction != null) + if (typeof object.transaction === "string") + $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); + else if (object.transaction.length >= 0) + message.transaction = object.transaction; return message; }; /** - * Creates a plain object from a BeginTransactionRequest message. Also converts values to other types if specified. + * Creates a plain object from a CommitRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.firestore.v1.BeginTransactionRequest + * @memberof google.firestore.v1.CommitRequest * @static - * @param {google.firestore.v1.BeginTransactionRequest} message BeginTransactionRequest + * @param {google.firestore.v1.CommitRequest} message CommitRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BeginTransactionRequest.toObject = function toObject(message, options) { + CommitRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.writes = []; if (options.defaults) { object.database = ""; - object.options = null; + if (options.bytes === String) + object.transaction = ""; + else { + object.transaction = []; + if (options.bytes !== Array) + object.transaction = $util.newBuffer(object.transaction); + } } if (message.database != null && message.hasOwnProperty("database")) object.database = message.database; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.firestore.v1.TransactionOptions.toObject(message.options, options); + if (message.writes && message.writes.length) { + object.writes = []; + for (var j = 0; j < message.writes.length; ++j) + object.writes[j] = $root.google.firestore.v1.Write.toObject(message.writes[j], options); + } + if (message.transaction != null && message.hasOwnProperty("transaction")) + object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction; return object; }; /** - * Converts this BeginTransactionRequest to JSON. + * Converts this CommitRequest to JSON. * @function toJSON - * @memberof google.firestore.v1.BeginTransactionRequest + * @memberof google.firestore.v1.CommitRequest * @instance * @returns {Object.} JSON object */ - BeginTransactionRequest.prototype.toJSON = function toJSON() { + CommitRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BeginTransactionRequest; + /** + * Gets the default type url for CommitRequest + * @function getTypeUrl + * @memberof google.firestore.v1.CommitRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommitRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.CommitRequest"; + }; + + return CommitRequest; })(); - v1.BeginTransactionResponse = (function() { + v1.CommitResponse = (function() { /** - * Properties of a BeginTransactionResponse. + * Properties of a CommitResponse. * @memberof google.firestore.v1 - * @interface IBeginTransactionResponse - * @property {Uint8Array|null} [transaction] BeginTransactionResponse transaction + * @interface ICommitResponse + * @property {Array.|null} [writeResults] CommitResponse writeResults + * @property {google.protobuf.ITimestamp|null} [commitTime] CommitResponse commitTime */ /** - * Constructs a new BeginTransactionResponse. + * Constructs a new CommitResponse. * @memberof google.firestore.v1 - * @classdesc Represents a BeginTransactionResponse. - * @implements IBeginTransactionResponse + * @classdesc Represents a CommitResponse. + * @implements ICommitResponse * @constructor - * @param {google.firestore.v1.IBeginTransactionResponse=} [properties] Properties to set + * @param {google.firestore.v1.ICommitResponse=} [properties] Properties to set */ - function BeginTransactionResponse(properties) { + function CommitResponse(properties) { + this.writeResults = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9671,94 +11612,126 @@ } /** - * BeginTransactionResponse transaction. - * @member {Uint8Array} transaction - * @memberof google.firestore.v1.BeginTransactionResponse + * CommitResponse writeResults. + * @member {Array.} writeResults + * @memberof google.firestore.v1.CommitResponse + * @instance + */ + CommitResponse.prototype.writeResults = $util.emptyArray; + + /** + * CommitResponse commitTime. + * @member {google.protobuf.ITimestamp|null|undefined} commitTime + * @memberof google.firestore.v1.CommitResponse * @instance */ - BeginTransactionResponse.prototype.transaction = $util.newBuffer([]); + CommitResponse.prototype.commitTime = null; /** - * Creates a BeginTransactionResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CommitResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.firestore.v1.BeginTransactionResponse + * @memberof google.firestore.v1.CommitResponse * @static * @param {Object.} object Plain object - * @returns {google.firestore.v1.BeginTransactionResponse} BeginTransactionResponse + * @returns {google.firestore.v1.CommitResponse} CommitResponse */ - BeginTransactionResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.v1.BeginTransactionResponse) + CommitResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.CommitResponse) return object; - var message = new $root.google.firestore.v1.BeginTransactionResponse(); - if (object.transaction != null) - if (typeof object.transaction === "string") - $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) - message.transaction = object.transaction; + var message = new $root.google.firestore.v1.CommitResponse(); + if (object.writeResults) { + if (!Array.isArray(object.writeResults)) + throw TypeError(".google.firestore.v1.CommitResponse.writeResults: array expected"); + message.writeResults = []; + for (var i = 0; i < object.writeResults.length; ++i) { + if (typeof object.writeResults[i] !== "object") + throw TypeError(".google.firestore.v1.CommitResponse.writeResults: object expected"); + message.writeResults[i] = $root.google.firestore.v1.WriteResult.fromObject(object.writeResults[i]); + } + } + if (object.commitTime != null) { + if (typeof object.commitTime !== "object") + throw TypeError(".google.firestore.v1.CommitResponse.commitTime: object expected"); + message.commitTime = $root.google.protobuf.Timestamp.fromObject(object.commitTime); + } return message; }; /** - * Creates a plain object from a BeginTransactionResponse message. Also converts values to other types if specified. + * Creates a plain object from a CommitResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.firestore.v1.BeginTransactionResponse + * @memberof google.firestore.v1.CommitResponse * @static - * @param {google.firestore.v1.BeginTransactionResponse} message BeginTransactionResponse + * @param {google.firestore.v1.CommitResponse} message CommitResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BeginTransactionResponse.toObject = function toObject(message, options) { + CommitResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.writeResults = []; if (options.defaults) - if (options.bytes === String) - object.transaction = ""; - else { - object.transaction = []; - if (options.bytes !== Array) - object.transaction = $util.newBuffer(object.transaction); - } - if (message.transaction != null && message.hasOwnProperty("transaction")) - object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction; + object.commitTime = null; + if (message.writeResults && message.writeResults.length) { + object.writeResults = []; + for (var j = 0; j < message.writeResults.length; ++j) + object.writeResults[j] = $root.google.firestore.v1.WriteResult.toObject(message.writeResults[j], options); + } + if (message.commitTime != null && message.hasOwnProperty("commitTime")) + object.commitTime = $root.google.protobuf.Timestamp.toObject(message.commitTime, options); return object; }; /** - * Converts this BeginTransactionResponse to JSON. + * Converts this CommitResponse to JSON. * @function toJSON - * @memberof google.firestore.v1.BeginTransactionResponse + * @memberof google.firestore.v1.CommitResponse * @instance * @returns {Object.} JSON object */ - BeginTransactionResponse.prototype.toJSON = function toJSON() { + CommitResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BeginTransactionResponse; + /** + * Gets the default type url for CommitResponse + * @function getTypeUrl + * @memberof google.firestore.v1.CommitResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommitResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.CommitResponse"; + }; + + return CommitResponse; })(); - v1.CommitRequest = (function() { + v1.RollbackRequest = (function() { /** - * Properties of a CommitRequest. + * Properties of a RollbackRequest. * @memberof google.firestore.v1 - * @interface ICommitRequest - * @property {string|null} [database] CommitRequest database - * @property {Array.|null} [writes] CommitRequest writes - * @property {Uint8Array|null} [transaction] CommitRequest transaction + * @interface IRollbackRequest + * @property {string|null} [database] RollbackRequest database + * @property {Uint8Array|null} [transaction] RollbackRequest transaction */ /** - * Constructs a new CommitRequest. + * Constructs a new RollbackRequest. * @memberof google.firestore.v1 - * @classdesc Represents a CommitRequest. - * @implements ICommitRequest + * @classdesc Represents a RollbackRequest. + * @implements IRollbackRequest * @constructor - * @param {google.firestore.v1.ICommitRequest=} [properties] Properties to set + * @param {google.firestore.v1.IRollbackRequest=} [properties] Properties to set */ - function CommitRequest(properties) { - this.writes = []; + function RollbackRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9766,76 +11739,56 @@ } /** - * CommitRequest database. + * RollbackRequest database. * @member {string} database - * @memberof google.firestore.v1.CommitRequest - * @instance - */ - CommitRequest.prototype.database = ""; - - /** - * CommitRequest writes. - * @member {Array.} writes - * @memberof google.firestore.v1.CommitRequest + * @memberof google.firestore.v1.RollbackRequest * @instance */ - CommitRequest.prototype.writes = $util.emptyArray; + RollbackRequest.prototype.database = ""; /** - * CommitRequest transaction. + * RollbackRequest transaction. * @member {Uint8Array} transaction - * @memberof google.firestore.v1.CommitRequest + * @memberof google.firestore.v1.RollbackRequest * @instance */ - CommitRequest.prototype.transaction = $util.newBuffer([]); + RollbackRequest.prototype.transaction = $util.newBuffer([]); /** - * Creates a CommitRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RollbackRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.firestore.v1.CommitRequest + * @memberof google.firestore.v1.RollbackRequest * @static * @param {Object.} object Plain object - * @returns {google.firestore.v1.CommitRequest} CommitRequest + * @returns {google.firestore.v1.RollbackRequest} RollbackRequest */ - CommitRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.v1.CommitRequest) + RollbackRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.RollbackRequest) return object; - var message = new $root.google.firestore.v1.CommitRequest(); + var message = new $root.google.firestore.v1.RollbackRequest(); if (object.database != null) message.database = String(object.database); - if (object.writes) { - if (!Array.isArray(object.writes)) - throw TypeError(".google.firestore.v1.CommitRequest.writes: array expected"); - message.writes = []; - for (var i = 0; i < object.writes.length; ++i) { - if (typeof object.writes[i] !== "object") - throw TypeError(".google.firestore.v1.CommitRequest.writes: object expected"); - message.writes[i] = $root.google.firestore.v1.Write.fromObject(object.writes[i]); - } - } if (object.transaction != null) if (typeof object.transaction === "string") $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) + else if (object.transaction.length >= 0) message.transaction = object.transaction; return message; }; /** - * Creates a plain object from a CommitRequest message. Also converts values to other types if specified. + * Creates a plain object from a RollbackRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.firestore.v1.CommitRequest + * @memberof google.firestore.v1.RollbackRequest * @static - * @param {google.firestore.v1.CommitRequest} message CommitRequest + * @param {google.firestore.v1.RollbackRequest} message RollbackRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CommitRequest.toObject = function toObject(message, options) { + RollbackRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.writes = []; if (options.defaults) { object.database = ""; if (options.bytes === String) @@ -9848,50 +11801,62 @@ } if (message.database != null && message.hasOwnProperty("database")) object.database = message.database; - if (message.writes && message.writes.length) { - object.writes = []; - for (var j = 0; j < message.writes.length; ++j) - object.writes[j] = $root.google.firestore.v1.Write.toObject(message.writes[j], options); - } if (message.transaction != null && message.hasOwnProperty("transaction")) object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction; return object; }; /** - * Converts this CommitRequest to JSON. + * Converts this RollbackRequest to JSON. * @function toJSON - * @memberof google.firestore.v1.CommitRequest + * @memberof google.firestore.v1.RollbackRequest * @instance * @returns {Object.} JSON object */ - CommitRequest.prototype.toJSON = function toJSON() { + RollbackRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CommitRequest; + /** + * Gets the default type url for RollbackRequest + * @function getTypeUrl + * @memberof google.firestore.v1.RollbackRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RollbackRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.RollbackRequest"; + }; + + return RollbackRequest; })(); - v1.CommitResponse = (function() { + v1.RunQueryRequest = (function() { /** - * Properties of a CommitResponse. + * Properties of a RunQueryRequest. * @memberof google.firestore.v1 - * @interface ICommitResponse - * @property {Array.|null} [writeResults] CommitResponse writeResults - * @property {google.protobuf.ITimestamp|null} [commitTime] CommitResponse commitTime + * @interface IRunQueryRequest + * @property {string|null} [parent] RunQueryRequest parent + * @property {google.firestore.v1.IStructuredQuery|null} [structuredQuery] RunQueryRequest structuredQuery + * @property {Uint8Array|null} [transaction] RunQueryRequest transaction + * @property {google.firestore.v1.ITransactionOptions|null} [newTransaction] RunQueryRequest newTransaction + * @property {google.protobuf.ITimestamp|null} [readTime] RunQueryRequest readTime */ /** - * Constructs a new CommitResponse. + * Constructs a new RunQueryRequest. * @memberof google.firestore.v1 - * @classdesc Represents a CommitResponse. - * @implements ICommitResponse + * @classdesc Represents a RunQueryRequest. + * @implements IRunQueryRequest * @constructor - * @param {google.firestore.v1.ICommitResponse=} [properties] Properties to set + * @param {google.firestore.v1.IRunQueryRequest=} [properties] Properties to set */ - function CommitResponse(properties) { - this.writeResults = []; + function RunQueryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9899,111 +11864,198 @@ } /** - * CommitResponse writeResults. - * @member {Array.} writeResults - * @memberof google.firestore.v1.CommitResponse + * RunQueryRequest parent. + * @member {string} parent + * @memberof google.firestore.v1.RunQueryRequest * @instance */ - CommitResponse.prototype.writeResults = $util.emptyArray; + RunQueryRequest.prototype.parent = ""; + + /** + * RunQueryRequest structuredQuery. + * @member {google.firestore.v1.IStructuredQuery|null|undefined} structuredQuery + * @memberof google.firestore.v1.RunQueryRequest + * @instance + */ + RunQueryRequest.prototype.structuredQuery = null; + + /** + * RunQueryRequest transaction. + * @member {Uint8Array|null|undefined} transaction + * @memberof google.firestore.v1.RunQueryRequest + * @instance + */ + RunQueryRequest.prototype.transaction = null; + + /** + * RunQueryRequest newTransaction. + * @member {google.firestore.v1.ITransactionOptions|null|undefined} newTransaction + * @memberof google.firestore.v1.RunQueryRequest + * @instance + */ + RunQueryRequest.prototype.newTransaction = null; + + /** + * RunQueryRequest readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.firestore.v1.RunQueryRequest + * @instance + */ + RunQueryRequest.prototype.readTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RunQueryRequest queryType. + * @member {"structuredQuery"|undefined} queryType + * @memberof google.firestore.v1.RunQueryRequest + * @instance + */ + Object.defineProperty(RunQueryRequest.prototype, "queryType", { + get: $util.oneOfGetter($oneOfFields = ["structuredQuery"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * CommitResponse commitTime. - * @member {google.protobuf.ITimestamp|null|undefined} commitTime - * @memberof google.firestore.v1.CommitResponse + * RunQueryRequest consistencySelector. + * @member {"transaction"|"newTransaction"|"readTime"|undefined} consistencySelector + * @memberof google.firestore.v1.RunQueryRequest * @instance */ - CommitResponse.prototype.commitTime = null; + Object.defineProperty(RunQueryRequest.prototype, "consistencySelector", { + get: $util.oneOfGetter($oneOfFields = ["transaction", "newTransaction", "readTime"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a CommitResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RunQueryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.firestore.v1.CommitResponse + * @memberof google.firestore.v1.RunQueryRequest * @static * @param {Object.} object Plain object - * @returns {google.firestore.v1.CommitResponse} CommitResponse + * @returns {google.firestore.v1.RunQueryRequest} RunQueryRequest */ - CommitResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.v1.CommitResponse) + RunQueryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.RunQueryRequest) return object; - var message = new $root.google.firestore.v1.CommitResponse(); - if (object.writeResults) { - if (!Array.isArray(object.writeResults)) - throw TypeError(".google.firestore.v1.CommitResponse.writeResults: array expected"); - message.writeResults = []; - for (var i = 0; i < object.writeResults.length; ++i) { - if (typeof object.writeResults[i] !== "object") - throw TypeError(".google.firestore.v1.CommitResponse.writeResults: object expected"); - message.writeResults[i] = $root.google.firestore.v1.WriteResult.fromObject(object.writeResults[i]); - } + var message = new $root.google.firestore.v1.RunQueryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.structuredQuery != null) { + if (typeof object.structuredQuery !== "object") + throw TypeError(".google.firestore.v1.RunQueryRequest.structuredQuery: object expected"); + message.structuredQuery = $root.google.firestore.v1.StructuredQuery.fromObject(object.structuredQuery); } - if (object.commitTime != null) { - if (typeof object.commitTime !== "object") - throw TypeError(".google.firestore.v1.CommitResponse.commitTime: object expected"); - message.commitTime = $root.google.protobuf.Timestamp.fromObject(object.commitTime); + if (object.transaction != null) + if (typeof object.transaction === "string") + $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); + else if (object.transaction.length >= 0) + message.transaction = object.transaction; + if (object.newTransaction != null) { + if (typeof object.newTransaction !== "object") + throw TypeError(".google.firestore.v1.RunQueryRequest.newTransaction: object expected"); + message.newTransaction = $root.google.firestore.v1.TransactionOptions.fromObject(object.newTransaction); + } + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.firestore.v1.RunQueryRequest.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } return message; }; /** - * Creates a plain object from a CommitResponse message. Also converts values to other types if specified. + * Creates a plain object from a RunQueryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.firestore.v1.CommitResponse + * @memberof google.firestore.v1.RunQueryRequest * @static - * @param {google.firestore.v1.CommitResponse} message CommitResponse + * @param {google.firestore.v1.RunQueryRequest} message RunQueryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CommitResponse.toObject = function toObject(message, options) { + RunQueryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.writeResults = []; if (options.defaults) - object.commitTime = null; - if (message.writeResults && message.writeResults.length) { - object.writeResults = []; - for (var j = 0; j < message.writeResults.length; ++j) - object.writeResults[j] = $root.google.firestore.v1.WriteResult.toObject(message.writeResults[j], options); + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.structuredQuery != null && message.hasOwnProperty("structuredQuery")) { + object.structuredQuery = $root.google.firestore.v1.StructuredQuery.toObject(message.structuredQuery, options); + if (options.oneofs) + object.queryType = "structuredQuery"; + } + if (message.transaction != null && message.hasOwnProperty("transaction")) { + object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction; + if (options.oneofs) + object.consistencySelector = "transaction"; + } + if (message.newTransaction != null && message.hasOwnProperty("newTransaction")) { + object.newTransaction = $root.google.firestore.v1.TransactionOptions.toObject(message.newTransaction, options); + if (options.oneofs) + object.consistencySelector = "newTransaction"; + } + if (message.readTime != null && message.hasOwnProperty("readTime")) { + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (options.oneofs) + object.consistencySelector = "readTime"; } - if (message.commitTime != null && message.hasOwnProperty("commitTime")) - object.commitTime = $root.google.protobuf.Timestamp.toObject(message.commitTime, options); return object; }; /** - * Converts this CommitResponse to JSON. + * Converts this RunQueryRequest to JSON. * @function toJSON - * @memberof google.firestore.v1.CommitResponse + * @memberof google.firestore.v1.RunQueryRequest * @instance * @returns {Object.} JSON object */ - CommitResponse.prototype.toJSON = function toJSON() { + RunQueryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CommitResponse; + /** + * Gets the default type url for RunQueryRequest + * @function getTypeUrl + * @memberof google.firestore.v1.RunQueryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.RunQueryRequest"; + }; + + return RunQueryRequest; })(); - v1.RollbackRequest = (function() { + v1.RunQueryResponse = (function() { /** - * Properties of a RollbackRequest. + * Properties of a RunQueryResponse. * @memberof google.firestore.v1 - * @interface IRollbackRequest - * @property {string|null} [database] RollbackRequest database - * @property {Uint8Array|null} [transaction] RollbackRequest transaction + * @interface IRunQueryResponse + * @property {Uint8Array|null} [transaction] RunQueryResponse transaction + * @property {google.firestore.v1.IDocument|null} [document] RunQueryResponse document + * @property {google.protobuf.ITimestamp|null} [readTime] RunQueryResponse readTime + * @property {number|null} [skippedResults] RunQueryResponse skippedResults + * @property {boolean|null} [done] RunQueryResponse done */ /** - * Constructs a new RollbackRequest. + * Constructs a new RunQueryResponse. * @memberof google.firestore.v1 - * @classdesc Represents a RollbackRequest. - * @implements IRollbackRequest + * @classdesc Represents a RunQueryResponse. + * @implements IRunQueryResponse * @constructor - * @param {google.firestore.v1.IRollbackRequest=} [properties] Properties to set + * @param {google.firestore.v1.IRunQueryResponse=} [properties] Properties to set */ - function RollbackRequest(properties) { + function RunQueryResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10011,58 +12063,108 @@ } /** - * RollbackRequest database. - * @member {string} database - * @memberof google.firestore.v1.RollbackRequest + * RunQueryResponse transaction. + * @member {Uint8Array} transaction + * @memberof google.firestore.v1.RunQueryResponse * @instance */ - RollbackRequest.prototype.database = ""; + RunQueryResponse.prototype.transaction = $util.newBuffer([]); /** - * RollbackRequest transaction. - * @member {Uint8Array} transaction - * @memberof google.firestore.v1.RollbackRequest + * RunQueryResponse document. + * @member {google.firestore.v1.IDocument|null|undefined} document + * @memberof google.firestore.v1.RunQueryResponse * @instance */ - RollbackRequest.prototype.transaction = $util.newBuffer([]); + RunQueryResponse.prototype.document = null; /** - * Creates a RollbackRequest message from a plain object. Also converts values to their respective internal types. + * RunQueryResponse readTime. + * @member {google.protobuf.ITimestamp|null|undefined} readTime + * @memberof google.firestore.v1.RunQueryResponse + * @instance + */ + RunQueryResponse.prototype.readTime = null; + + /** + * RunQueryResponse skippedResults. + * @member {number} skippedResults + * @memberof google.firestore.v1.RunQueryResponse + * @instance + */ + RunQueryResponse.prototype.skippedResults = 0; + + /** + * RunQueryResponse done. + * @member {boolean|null|undefined} done + * @memberof google.firestore.v1.RunQueryResponse + * @instance + */ + RunQueryResponse.prototype.done = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RunQueryResponse continuationSelector. + * @member {"done"|undefined} continuationSelector + * @memberof google.firestore.v1.RunQueryResponse + * @instance + */ + Object.defineProperty(RunQueryResponse.prototype, "continuationSelector", { + get: $util.oneOfGetter($oneOfFields = ["done"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a RunQueryResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.firestore.v1.RollbackRequest + * @memberof google.firestore.v1.RunQueryResponse * @static * @param {Object.} object Plain object - * @returns {google.firestore.v1.RollbackRequest} RollbackRequest + * @returns {google.firestore.v1.RunQueryResponse} RunQueryResponse */ - RollbackRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.v1.RollbackRequest) + RunQueryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.RunQueryResponse) return object; - var message = new $root.google.firestore.v1.RollbackRequest(); - if (object.database != null) - message.database = String(object.database); + var message = new $root.google.firestore.v1.RunQueryResponse(); if (object.transaction != null) if (typeof object.transaction === "string") $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) + else if (object.transaction.length >= 0) message.transaction = object.transaction; + if (object.document != null) { + if (typeof object.document !== "object") + throw TypeError(".google.firestore.v1.RunQueryResponse.document: object expected"); + message.document = $root.google.firestore.v1.Document.fromObject(object.document); + } + if (object.readTime != null) { + if (typeof object.readTime !== "object") + throw TypeError(".google.firestore.v1.RunQueryResponse.readTime: object expected"); + message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); + } + if (object.skippedResults != null) + message.skippedResults = object.skippedResults | 0; + if (object.done != null) + message.done = Boolean(object.done); return message; }; /** - * Creates a plain object from a RollbackRequest message. Also converts values to other types if specified. + * Creates a plain object from a RunQueryResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.firestore.v1.RollbackRequest + * @memberof google.firestore.v1.RunQueryResponse * @static - * @param {google.firestore.v1.RollbackRequest} message RollbackRequest + * @param {google.firestore.v1.RunQueryResponse} message RunQueryResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RollbackRequest.toObject = function toObject(message, options) { + RunQueryResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.database = ""; + object.document = null; if (options.bytes === String) object.transaction = ""; else { @@ -10070,50 +12172,76 @@ if (options.bytes !== Array) object.transaction = $util.newBuffer(object.transaction); } + object.readTime = null; + object.skippedResults = 0; } - if (message.database != null && message.hasOwnProperty("database")) - object.database = message.database; + if (message.document != null && message.hasOwnProperty("document")) + object.document = $root.google.firestore.v1.Document.toObject(message.document, options); if (message.transaction != null && message.hasOwnProperty("transaction")) object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction; + if (message.readTime != null && message.hasOwnProperty("readTime")) + object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); + if (message.skippedResults != null && message.hasOwnProperty("skippedResults")) + object.skippedResults = message.skippedResults; + if (message.done != null && message.hasOwnProperty("done")) { + object.done = message.done; + if (options.oneofs) + object.continuationSelector = "done"; + } return object; }; /** - * Converts this RollbackRequest to JSON. + * Converts this RunQueryResponse to JSON. * @function toJSON - * @memberof google.firestore.v1.RollbackRequest + * @memberof google.firestore.v1.RunQueryResponse * @instance * @returns {Object.} JSON object */ - RollbackRequest.prototype.toJSON = function toJSON() { + RunQueryResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RollbackRequest; + /** + * Gets the default type url for RunQueryResponse + * @function getTypeUrl + * @memberof google.firestore.v1.RunQueryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.RunQueryResponse"; + }; + + return RunQueryResponse; })(); - v1.RunQueryRequest = (function() { + v1.RunAggregationQueryRequest = (function() { /** - * Properties of a RunQueryRequest. + * Properties of a RunAggregationQueryRequest. * @memberof google.firestore.v1 - * @interface IRunQueryRequest - * @property {string|null} [parent] RunQueryRequest parent - * @property {google.firestore.v1.IStructuredQuery|null} [structuredQuery] RunQueryRequest structuredQuery - * @property {Uint8Array|null} [transaction] RunQueryRequest transaction - * @property {google.firestore.v1.ITransactionOptions|null} [newTransaction] RunQueryRequest newTransaction - * @property {google.protobuf.ITimestamp|null} [readTime] RunQueryRequest readTime + * @interface IRunAggregationQueryRequest + * @property {string|null} [parent] RunAggregationQueryRequest parent + * @property {google.firestore.v1.IStructuredAggregationQuery|null} [structuredAggregationQuery] RunAggregationQueryRequest structuredAggregationQuery + * @property {Uint8Array|null} [transaction] RunAggregationQueryRequest transaction + * @property {google.firestore.v1.ITransactionOptions|null} [newTransaction] RunAggregationQueryRequest newTransaction + * @property {google.protobuf.ITimestamp|null} [readTime] RunAggregationQueryRequest readTime */ /** - * Constructs a new RunQueryRequest. + * Constructs a new RunAggregationQueryRequest. * @memberof google.firestore.v1 - * @classdesc Represents a RunQueryRequest. - * @implements IRunQueryRequest + * @classdesc Represents a RunAggregationQueryRequest. + * @implements IRunAggregationQueryRequest * @constructor - * @param {google.firestore.v1.IRunQueryRequest=} [properties] Properties to set + * @param {google.firestore.v1.IRunAggregationQueryRequest=} [properties] Properties to set */ - function RunQueryRequest(properties) { + function RunAggregationQueryRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10121,117 +12249,117 @@ } /** - * RunQueryRequest parent. + * RunAggregationQueryRequest parent. * @member {string} parent - * @memberof google.firestore.v1.RunQueryRequest + * @memberof google.firestore.v1.RunAggregationQueryRequest * @instance */ - RunQueryRequest.prototype.parent = ""; + RunAggregationQueryRequest.prototype.parent = ""; /** - * RunQueryRequest structuredQuery. - * @member {google.firestore.v1.IStructuredQuery|null|undefined} structuredQuery - * @memberof google.firestore.v1.RunQueryRequest + * RunAggregationQueryRequest structuredAggregationQuery. + * @member {google.firestore.v1.IStructuredAggregationQuery|null|undefined} structuredAggregationQuery + * @memberof google.firestore.v1.RunAggregationQueryRequest * @instance */ - RunQueryRequest.prototype.structuredQuery = null; + RunAggregationQueryRequest.prototype.structuredAggregationQuery = null; /** - * RunQueryRequest transaction. + * RunAggregationQueryRequest transaction. * @member {Uint8Array|null|undefined} transaction - * @memberof google.firestore.v1.RunQueryRequest + * @memberof google.firestore.v1.RunAggregationQueryRequest * @instance */ - RunQueryRequest.prototype.transaction = null; + RunAggregationQueryRequest.prototype.transaction = null; /** - * RunQueryRequest newTransaction. + * RunAggregationQueryRequest newTransaction. * @member {google.firestore.v1.ITransactionOptions|null|undefined} newTransaction - * @memberof google.firestore.v1.RunQueryRequest + * @memberof google.firestore.v1.RunAggregationQueryRequest * @instance */ - RunQueryRequest.prototype.newTransaction = null; + RunAggregationQueryRequest.prototype.newTransaction = null; /** - * RunQueryRequest readTime. + * RunAggregationQueryRequest readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.firestore.v1.RunQueryRequest + * @memberof google.firestore.v1.RunAggregationQueryRequest * @instance */ - RunQueryRequest.prototype.readTime = null; + RunAggregationQueryRequest.prototype.readTime = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * RunQueryRequest queryType. - * @member {"structuredQuery"|undefined} queryType - * @memberof google.firestore.v1.RunQueryRequest + * RunAggregationQueryRequest queryType. + * @member {"structuredAggregationQuery"|undefined} queryType + * @memberof google.firestore.v1.RunAggregationQueryRequest * @instance */ - Object.defineProperty(RunQueryRequest.prototype, "queryType", { - get: $util.oneOfGetter($oneOfFields = ["structuredQuery"]), + Object.defineProperty(RunAggregationQueryRequest.prototype, "queryType", { + get: $util.oneOfGetter($oneOfFields = ["structuredAggregationQuery"]), set: $util.oneOfSetter($oneOfFields) }); /** - * RunQueryRequest consistencySelector. + * RunAggregationQueryRequest consistencySelector. * @member {"transaction"|"newTransaction"|"readTime"|undefined} consistencySelector - * @memberof google.firestore.v1.RunQueryRequest + * @memberof google.firestore.v1.RunAggregationQueryRequest * @instance */ - Object.defineProperty(RunQueryRequest.prototype, "consistencySelector", { + Object.defineProperty(RunAggregationQueryRequest.prototype, "consistencySelector", { get: $util.oneOfGetter($oneOfFields = ["transaction", "newTransaction", "readTime"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a RunQueryRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RunAggregationQueryRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.firestore.v1.RunQueryRequest + * @memberof google.firestore.v1.RunAggregationQueryRequest * @static * @param {Object.} object Plain object - * @returns {google.firestore.v1.RunQueryRequest} RunQueryRequest + * @returns {google.firestore.v1.RunAggregationQueryRequest} RunAggregationQueryRequest */ - RunQueryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.v1.RunQueryRequest) + RunAggregationQueryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.RunAggregationQueryRequest) return object; - var message = new $root.google.firestore.v1.RunQueryRequest(); + var message = new $root.google.firestore.v1.RunAggregationQueryRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.structuredQuery != null) { - if (typeof object.structuredQuery !== "object") - throw TypeError(".google.firestore.v1.RunQueryRequest.structuredQuery: object expected"); - message.structuredQuery = $root.google.firestore.v1.StructuredQuery.fromObject(object.structuredQuery); + if (object.structuredAggregationQuery != null) { + if (typeof object.structuredAggregationQuery !== "object") + throw TypeError(".google.firestore.v1.RunAggregationQueryRequest.structuredAggregationQuery: object expected"); + message.structuredAggregationQuery = $root.google.firestore.v1.StructuredAggregationQuery.fromObject(object.structuredAggregationQuery); } if (object.transaction != null) if (typeof object.transaction === "string") $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) + else if (object.transaction.length >= 0) message.transaction = object.transaction; if (object.newTransaction != null) { if (typeof object.newTransaction !== "object") - throw TypeError(".google.firestore.v1.RunQueryRequest.newTransaction: object expected"); + throw TypeError(".google.firestore.v1.RunAggregationQueryRequest.newTransaction: object expected"); message.newTransaction = $root.google.firestore.v1.TransactionOptions.fromObject(object.newTransaction); } if (object.readTime != null) { if (typeof object.readTime !== "object") - throw TypeError(".google.firestore.v1.RunQueryRequest.readTime: object expected"); + throw TypeError(".google.firestore.v1.RunAggregationQueryRequest.readTime: object expected"); message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } return message; }; /** - * Creates a plain object from a RunQueryRequest message. Also converts values to other types if specified. + * Creates a plain object from a RunAggregationQueryRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.firestore.v1.RunQueryRequest + * @memberof google.firestore.v1.RunAggregationQueryRequest * @static - * @param {google.firestore.v1.RunQueryRequest} message RunQueryRequest + * @param {google.firestore.v1.RunAggregationQueryRequest} message RunAggregationQueryRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunQueryRequest.toObject = function toObject(message, options) { + RunAggregationQueryRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -10239,10 +12367,10 @@ object.parent = ""; if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.structuredQuery != null && message.hasOwnProperty("structuredQuery")) { - object.structuredQuery = $root.google.firestore.v1.StructuredQuery.toObject(message.structuredQuery, options); + if (message.structuredAggregationQuery != null && message.hasOwnProperty("structuredAggregationQuery")) { + object.structuredAggregationQuery = $root.google.firestore.v1.StructuredAggregationQuery.toObject(message.structuredAggregationQuery, options); if (options.oneofs) - object.queryType = "structuredQuery"; + object.queryType = "structuredAggregationQuery"; } if (message.transaction != null && message.hasOwnProperty("transaction")) { object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction; @@ -10263,41 +12391,54 @@ }; /** - * Converts this RunQueryRequest to JSON. + * Converts this RunAggregationQueryRequest to JSON. * @function toJSON - * @memberof google.firestore.v1.RunQueryRequest + * @memberof google.firestore.v1.RunAggregationQueryRequest * @instance * @returns {Object.} JSON object */ - RunQueryRequest.prototype.toJSON = function toJSON() { + RunAggregationQueryRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RunQueryRequest; + /** + * Gets the default type url for RunAggregationQueryRequest + * @function getTypeUrl + * @memberof google.firestore.v1.RunAggregationQueryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunAggregationQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.RunAggregationQueryRequest"; + }; + + return RunAggregationQueryRequest; })(); - v1.RunQueryResponse = (function() { + v1.RunAggregationQueryResponse = (function() { /** - * Properties of a RunQueryResponse. + * Properties of a RunAggregationQueryResponse. * @memberof google.firestore.v1 - * @interface IRunQueryResponse - * @property {Uint8Array|null} [transaction] RunQueryResponse transaction - * @property {google.firestore.v1.IDocument|null} [document] RunQueryResponse document - * @property {google.protobuf.ITimestamp|null} [readTime] RunQueryResponse readTime - * @property {number|null} [skippedResults] RunQueryResponse skippedResults - * @property {boolean|null} [done] RunQueryResponse done + * @interface IRunAggregationQueryResponse + * @property {google.firestore.v1.IAggregationResult|null} [result] RunAggregationQueryResponse result + * @property {Uint8Array|null} [transaction] RunAggregationQueryResponse transaction + * @property {google.protobuf.ITimestamp|null} [readTime] RunAggregationQueryResponse readTime */ /** - * Constructs a new RunQueryResponse. + * Constructs a new RunAggregationQueryResponse. * @memberof google.firestore.v1 - * @classdesc Represents a RunQueryResponse. - * @implements IRunQueryResponse + * @classdesc Represents a RunAggregationQueryResponse. + * @implements IRunAggregationQueryResponse * @constructor - * @param {google.firestore.v1.IRunQueryResponse=} [properties] Properties to set + * @param {google.firestore.v1.IRunAggregationQueryResponse=} [properties] Properties to set */ - function RunQueryResponse(properties) { + function RunAggregationQueryResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10305,108 +12446,74 @@ } /** - * RunQueryResponse transaction. - * @member {Uint8Array} transaction - * @memberof google.firestore.v1.RunQueryResponse + * RunAggregationQueryResponse result. + * @member {google.firestore.v1.IAggregationResult|null|undefined} result + * @memberof google.firestore.v1.RunAggregationQueryResponse * @instance */ - RunQueryResponse.prototype.transaction = $util.newBuffer([]); + RunAggregationQueryResponse.prototype.result = null; /** - * RunQueryResponse document. - * @member {google.firestore.v1.IDocument|null|undefined} document - * @memberof google.firestore.v1.RunQueryResponse + * RunAggregationQueryResponse transaction. + * @member {Uint8Array} transaction + * @memberof google.firestore.v1.RunAggregationQueryResponse * @instance */ - RunQueryResponse.prototype.document = null; + RunAggregationQueryResponse.prototype.transaction = $util.newBuffer([]); /** - * RunQueryResponse readTime. + * RunAggregationQueryResponse readTime. * @member {google.protobuf.ITimestamp|null|undefined} readTime - * @memberof google.firestore.v1.RunQueryResponse - * @instance - */ - RunQueryResponse.prototype.readTime = null; - - /** - * RunQueryResponse skippedResults. - * @member {number} skippedResults - * @memberof google.firestore.v1.RunQueryResponse - * @instance - */ - RunQueryResponse.prototype.skippedResults = 0; - - /** - * RunQueryResponse done. - * @member {boolean|null|undefined} done - * @memberof google.firestore.v1.RunQueryResponse - * @instance - */ - RunQueryResponse.prototype.done = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * RunQueryResponse continuationSelector. - * @member {"done"|undefined} continuationSelector - * @memberof google.firestore.v1.RunQueryResponse + * @memberof google.firestore.v1.RunAggregationQueryResponse * @instance */ - Object.defineProperty(RunQueryResponse.prototype, "continuationSelector", { - get: $util.oneOfGetter($oneOfFields = ["done"]), - set: $util.oneOfSetter($oneOfFields) - }); + RunAggregationQueryResponse.prototype.readTime = null; /** - * Creates a RunQueryResponse message from a plain object. Also converts values to their respective internal types. + * Creates a RunAggregationQueryResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.firestore.v1.RunQueryResponse + * @memberof google.firestore.v1.RunAggregationQueryResponse * @static * @param {Object.} object Plain object - * @returns {google.firestore.v1.RunQueryResponse} RunQueryResponse + * @returns {google.firestore.v1.RunAggregationQueryResponse} RunAggregationQueryResponse */ - RunQueryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.v1.RunQueryResponse) + RunAggregationQueryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.RunAggregationQueryResponse) return object; - var message = new $root.google.firestore.v1.RunQueryResponse(); + var message = new $root.google.firestore.v1.RunAggregationQueryResponse(); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.firestore.v1.RunAggregationQueryResponse.result: object expected"); + message.result = $root.google.firestore.v1.AggregationResult.fromObject(object.result); + } if (object.transaction != null) if (typeof object.transaction === "string") $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) + else if (object.transaction.length >= 0) message.transaction = object.transaction; - if (object.document != null) { - if (typeof object.document !== "object") - throw TypeError(".google.firestore.v1.RunQueryResponse.document: object expected"); - message.document = $root.google.firestore.v1.Document.fromObject(object.document); - } if (object.readTime != null) { if (typeof object.readTime !== "object") - throw TypeError(".google.firestore.v1.RunQueryResponse.readTime: object expected"); + throw TypeError(".google.firestore.v1.RunAggregationQueryResponse.readTime: object expected"); message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime); } - if (object.skippedResults != null) - message.skippedResults = object.skippedResults | 0; - if (object.done != null) - message.done = Boolean(object.done); return message; }; /** - * Creates a plain object from a RunQueryResponse message. Also converts values to other types if specified. + * Creates a plain object from a RunAggregationQueryResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.firestore.v1.RunQueryResponse + * @memberof google.firestore.v1.RunAggregationQueryResponse * @static - * @param {google.firestore.v1.RunQueryResponse} message RunQueryResponse + * @param {google.firestore.v1.RunAggregationQueryResponse} message RunAggregationQueryResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RunQueryResponse.toObject = function toObject(message, options) { + RunAggregationQueryResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.document = null; + object.result = null; if (options.bytes === String) object.transaction = ""; else { @@ -10415,36 +12522,43 @@ object.transaction = $util.newBuffer(object.transaction); } object.readTime = null; - object.skippedResults = 0; } - if (message.document != null && message.hasOwnProperty("document")) - object.document = $root.google.firestore.v1.Document.toObject(message.document, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.google.firestore.v1.AggregationResult.toObject(message.result, options); if (message.transaction != null && message.hasOwnProperty("transaction")) object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction; if (message.readTime != null && message.hasOwnProperty("readTime")) object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options); - if (message.skippedResults != null && message.hasOwnProperty("skippedResults")) - object.skippedResults = message.skippedResults; - if (message.done != null && message.hasOwnProperty("done")) { - object.done = message.done; - if (options.oneofs) - object.continuationSelector = "done"; - } return object; }; /** - * Converts this RunQueryResponse to JSON. + * Converts this RunAggregationQueryResponse to JSON. * @function toJSON - * @memberof google.firestore.v1.RunQueryResponse + * @memberof google.firestore.v1.RunAggregationQueryResponse * @instance * @returns {Object.} JSON object */ - RunQueryResponse.prototype.toJSON = function toJSON() { + RunAggregationQueryResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return RunQueryResponse; + /** + * Gets the default type url for RunAggregationQueryResponse + * @function getTypeUrl + * @memberof google.firestore.v1.RunAggregationQueryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunAggregationQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.RunAggregationQueryResponse"; + }; + + return RunAggregationQueryResponse; })(); v1.PartitionQueryRequest = (function() { @@ -10647,6 +12761,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PartitionQueryRequest + * @function getTypeUrl + * @memberof google.firestore.v1.PartitionQueryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartitionQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.PartitionQueryRequest"; + }; + return PartitionQueryRequest; })(); @@ -10757,6 +12886,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PartitionQueryResponse + * @function getTypeUrl + * @memberof google.firestore.v1.PartitionQueryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartitionQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.PartitionQueryResponse"; + }; + return PartitionQueryResponse; })(); @@ -10859,7 +13003,7 @@ if (object.streamToken != null) if (typeof object.streamToken === "string") $util.base64.decode(object.streamToken, message.streamToken = $util.newBuffer($util.base64.length(object.streamToken)), 0); - else if (object.streamToken.length) + else if (object.streamToken.length >= 0) message.streamToken = object.streamToken; if (object.labels) { if (typeof object.labels !== "object") @@ -10930,6 +13074,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WriteRequest + * @function getTypeUrl + * @memberof google.firestore.v1.WriteRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.WriteRequest"; + }; + return WriteRequest; })(); @@ -11010,7 +13169,7 @@ if (object.streamToken != null) if (typeof object.streamToken === "string") $util.base64.decode(object.streamToken, message.streamToken = $util.newBuffer($util.base64.length(object.streamToken)), 0); - else if (object.streamToken.length) + else if (object.streamToken.length >= 0) message.streamToken = object.streamToken; if (object.writeResults) { if (!Array.isArray(object.writeResults)) @@ -11081,6 +13240,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WriteResponse + * @function getTypeUrl + * @memberof google.firestore.v1.WriteResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.WriteResponse"; + }; + return WriteResponse; })(); @@ -11238,6 +13412,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListenRequest + * @function getTypeUrl + * @memberof google.firestore.v1.ListenRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListenRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.ListenRequest"; + }; + return ListenRequest; })(); @@ -11415,6 +13604,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListenResponse + * @function getTypeUrl + * @memberof google.firestore.v1.ListenResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListenResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.ListenResponse"; + }; + return ListenResponse; })(); @@ -11545,7 +13749,7 @@ if (object.resumeToken != null) if (typeof object.resumeToken === "string") $util.base64.decode(object.resumeToken, message.resumeToken = $util.newBuffer($util.base64.length(object.resumeToken)), 0); - else if (object.resumeToken.length) + else if (object.resumeToken.length >= 0) message.resumeToken = object.resumeToken; if (object.readTime != null) { if (typeof object.readTime !== "object") @@ -11614,6 +13818,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Target + * @function getTypeUrl + * @memberof google.firestore.v1.Target + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Target.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.Target"; + }; + Target.DocumentsTarget = (function() { /** @@ -11703,6 +13922,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DocumentsTarget + * @function getTypeUrl + * @memberof google.firestore.v1.Target.DocumentsTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentsTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.Target.DocumentsTarget"; + }; + return DocumentsTarget; })(); @@ -11819,6 +14053,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryTarget + * @function getTypeUrl + * @memberof google.firestore.v1.Target.QueryTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.Target.QueryTarget"; + }; + return QueryTarget; })(); @@ -11907,6 +14156,12 @@ return object; var message = new $root.google.firestore.v1.TargetChange(); switch (object.targetChangeType) { + default: + if (typeof object.targetChangeType === "number") { + message.targetChangeType = object.targetChangeType; + break; + } + break; case "NO_CHANGE": case 0: message.targetChangeType = 0; @@ -11943,7 +14198,7 @@ if (object.resumeToken != null) if (typeof object.resumeToken === "string") $util.base64.decode(object.resumeToken, message.resumeToken = $util.newBuffer($util.base64.length(object.resumeToken)), 0); - else if (object.resumeToken.length) + else if (object.resumeToken.length >= 0) message.resumeToken = object.resumeToken; if (object.readTime != null) { if (typeof object.readTime !== "object") @@ -11981,7 +14236,7 @@ object.readTime = null; } if (message.targetChangeType != null && message.hasOwnProperty("targetChangeType")) - object.targetChangeType = options.enums === String ? $root.google.firestore.v1.TargetChange.TargetChangeType[message.targetChangeType] : message.targetChangeType; + object.targetChangeType = options.enums === String ? $root.google.firestore.v1.TargetChange.TargetChangeType[message.targetChangeType] === undefined ? message.targetChangeType : $root.google.firestore.v1.TargetChange.TargetChangeType[message.targetChangeType] : message.targetChangeType; if (message.targetIds && message.targetIds.length) { object.targetIds = []; for (var j = 0; j < message.targetIds.length; ++j) @@ -12007,6 +14262,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TargetChange + * @function getTypeUrl + * @memberof google.firestore.v1.TargetChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.TargetChange"; + }; + /** * TargetChangeType enum. * @name google.firestore.v1.TargetChange.TargetChangeType @@ -12172,6 +14442,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCollectionIdsRequest + * @function getTypeUrl + * @memberof google.firestore.v1.ListCollectionIdsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCollectionIdsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.ListCollectionIdsRequest"; + }; + return ListCollectionIdsRequest; })(); @@ -12279,6 +14564,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCollectionIdsResponse + * @function getTypeUrl + * @memberof google.firestore.v1.ListCollectionIdsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCollectionIdsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.ListCollectionIdsResponse"; + }; + return ListCollectionIdsResponse; })(); @@ -12410,8 +14710,23 @@ * @instance * @returns {Object.} JSON object */ - BatchWriteRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + BatchWriteRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchWriteRequest + * @function getTypeUrl + * @memberof google.firestore.v1.BatchWriteRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchWriteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.BatchWriteRequest"; }; return BatchWriteRequest; @@ -12536,6 +14851,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BatchWriteResponse + * @function getTypeUrl + * @memberof google.firestore.v1.BatchWriteResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchWriteResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.BatchWriteResponse"; + }; + return BatchWriteResponse; })(); @@ -12759,6 +15089,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StructuredQuery + * @function getTypeUrl + * @memberof google.firestore.v1.StructuredQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StructuredQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.StructuredQuery"; + }; + StructuredQuery.CollectionSelector = (function() { /** @@ -12854,6 +15199,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CollectionSelector + * @function getTypeUrl + * @memberof google.firestore.v1.StructuredQuery.CollectionSelector + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CollectionSelector.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.StructuredQuery.CollectionSelector"; + }; + return CollectionSelector; })(); @@ -12993,6 +15353,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Filter + * @function getTypeUrl + * @memberof google.firestore.v1.StructuredQuery.Filter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.StructuredQuery.Filter"; + }; + return Filter; })(); @@ -13051,6 +15426,12 @@ return object; var message = new $root.google.firestore.v1.StructuredQuery.CompositeFilter(); switch (object.op) { + default: + if (typeof object.op === "number") { + message.op = object.op; + break; + } + break; case "OPERATOR_UNSPECIFIED": case 0: message.op = 0; @@ -13059,6 +15440,10 @@ case 1: message.op = 1; break; + case "OR": + case 2: + message.op = 2; + break; } if (object.filters) { if (!Array.isArray(object.filters)) @@ -13091,7 +15476,7 @@ if (options.defaults) object.op = options.enums === String ? "OPERATOR_UNSPECIFIED" : 0; if (message.op != null && message.hasOwnProperty("op")) - object.op = options.enums === String ? $root.google.firestore.v1.StructuredQuery.CompositeFilter.Operator[message.op] : message.op; + object.op = options.enums === String ? $root.google.firestore.v1.StructuredQuery.CompositeFilter.Operator[message.op] === undefined ? message.op : $root.google.firestore.v1.StructuredQuery.CompositeFilter.Operator[message.op] : message.op; if (message.filters && message.filters.length) { object.filters = []; for (var j = 0; j < message.filters.length; ++j) @@ -13111,17 +15496,34 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CompositeFilter + * @function getTypeUrl + * @memberof google.firestore.v1.StructuredQuery.CompositeFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompositeFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.StructuredQuery.CompositeFilter"; + }; + /** * Operator enum. * @name google.firestore.v1.StructuredQuery.CompositeFilter.Operator * @enum {string} * @property {string} OPERATOR_UNSPECIFIED=OPERATOR_UNSPECIFIED OPERATOR_UNSPECIFIED value * @property {string} AND=AND AND value + * @property {string} OR=OR OR value */ CompositeFilter.Operator = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "OPERATOR_UNSPECIFIED"] = "OPERATOR_UNSPECIFIED"; values[valuesById[1] = "AND"] = "AND"; + values[valuesById[2] = "OR"] = "OR"; return values; })(); @@ -13196,6 +15598,12 @@ message.field = $root.google.firestore.v1.StructuredQuery.FieldReference.fromObject(object.field); } switch (object.op) { + default: + if (typeof object.op === "number") { + message.op = object.op; + break; + } + break; case "OPERATOR_UNSPECIFIED": case 0: message.op = 0; @@ -13270,7 +15678,7 @@ if (message.field != null && message.hasOwnProperty("field")) object.field = $root.google.firestore.v1.StructuredQuery.FieldReference.toObject(message.field, options); if (message.op != null && message.hasOwnProperty("op")) - object.op = options.enums === String ? $root.google.firestore.v1.StructuredQuery.FieldFilter.Operator[message.op] : message.op; + object.op = options.enums === String ? $root.google.firestore.v1.StructuredQuery.FieldFilter.Operator[message.op] === undefined ? message.op : $root.google.firestore.v1.StructuredQuery.FieldFilter.Operator[message.op] : message.op; if (message.value != null && message.hasOwnProperty("value")) object.value = $root.google.firestore.v1.Value.toObject(message.value, options); return object; @@ -13287,6 +15695,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldFilter + * @function getTypeUrl + * @memberof google.firestore.v1.StructuredQuery.FieldFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.StructuredQuery.FieldFilter"; + }; + /** * Operator enum. * @name google.firestore.v1.StructuredQuery.FieldFilter.Operator @@ -13390,6 +15813,12 @@ return object; var message = new $root.google.firestore.v1.StructuredQuery.UnaryFilter(); switch (object.op) { + default: + if (typeof object.op === "number") { + message.op = object.op; + break; + } + break; case "OPERATOR_UNSPECIFIED": case 0: message.op = 0; @@ -13435,7 +15864,7 @@ if (options.defaults) object.op = options.enums === String ? "OPERATOR_UNSPECIFIED" : 0; if (message.op != null && message.hasOwnProperty("op")) - object.op = options.enums === String ? $root.google.firestore.v1.StructuredQuery.UnaryFilter.Operator[message.op] : message.op; + object.op = options.enums === String ? $root.google.firestore.v1.StructuredQuery.UnaryFilter.Operator[message.op] === undefined ? message.op : $root.google.firestore.v1.StructuredQuery.UnaryFilter.Operator[message.op] : message.op; if (message.field != null && message.hasOwnProperty("field")) { object.field = $root.google.firestore.v1.StructuredQuery.FieldReference.toObject(message.field, options); if (options.oneofs) @@ -13455,6 +15884,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UnaryFilter + * @function getTypeUrl + * @memberof google.firestore.v1.StructuredQuery.UnaryFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UnaryFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.StructuredQuery.UnaryFilter"; + }; + /** * Operator enum. * @name google.firestore.v1.StructuredQuery.UnaryFilter.Operator @@ -13537,6 +15981,12 @@ message.field = $root.google.firestore.v1.StructuredQuery.FieldReference.fromObject(object.field); } switch (object.direction) { + default: + if (typeof object.direction === "number") { + message.direction = object.direction; + break; + } + break; case "DIRECTION_UNSPECIFIED": case 0: message.direction = 0; @@ -13573,7 +16023,7 @@ if (message.field != null && message.hasOwnProperty("field")) object.field = $root.google.firestore.v1.StructuredQuery.FieldReference.toObject(message.field, options); if (message.direction != null && message.hasOwnProperty("direction")) - object.direction = options.enums === String ? $root.google.firestore.v1.StructuredQuery.Direction[message.direction] : message.direction; + object.direction = options.enums === String ? $root.google.firestore.v1.StructuredQuery.Direction[message.direction] === undefined ? message.direction : $root.google.firestore.v1.StructuredQuery.Direction[message.direction] : message.direction; return object; }; @@ -13588,6 +16038,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Order + * @function getTypeUrl + * @memberof google.firestore.v1.StructuredQuery.Order + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Order.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.StructuredQuery.Order"; + }; + return Order; })(); @@ -13687,28 +16152,296 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FieldReference; - })(); + /** + * Gets the default type url for FieldReference + * @function getTypeUrl + * @memberof google.firestore.v1.StructuredQuery.FieldReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.StructuredQuery.FieldReference"; + }; + + return FieldReference; + })(); + + StructuredQuery.Projection = (function() { + + /** + * Properties of a Projection. + * @memberof google.firestore.v1.StructuredQuery + * @interface IProjection + * @property {Array.|null} [fields] Projection fields + */ + + /** + * Constructs a new Projection. + * @memberof google.firestore.v1.StructuredQuery + * @classdesc Represents a Projection. + * @implements IProjection + * @constructor + * @param {google.firestore.v1.StructuredQuery.IProjection=} [properties] Properties to set + */ + function Projection(properties) { + this.fields = []; + 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]]; + } + + /** + * Projection fields. + * @member {Array.} fields + * @memberof google.firestore.v1.StructuredQuery.Projection + * @instance + */ + Projection.prototype.fields = $util.emptyArray; + + /** + * Creates a Projection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.v1.StructuredQuery.Projection + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.v1.StructuredQuery.Projection} Projection + */ + Projection.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.StructuredQuery.Projection) + return object; + var message = new $root.google.firestore.v1.StructuredQuery.Projection(); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.firestore.v1.StructuredQuery.Projection.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.firestore.v1.StructuredQuery.Projection.fields: object expected"); + message.fields[i] = $root.google.firestore.v1.StructuredQuery.FieldReference.fromObject(object.fields[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Projection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.v1.StructuredQuery.Projection + * @static + * @param {google.firestore.v1.StructuredQuery.Projection} message Projection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Projection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fields = []; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.firestore.v1.StructuredQuery.FieldReference.toObject(message.fields[j], options); + } + return object; + }; + + /** + * Converts this Projection to JSON. + * @function toJSON + * @memberof google.firestore.v1.StructuredQuery.Projection + * @instance + * @returns {Object.} JSON object + */ + Projection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Projection + * @function getTypeUrl + * @memberof google.firestore.v1.StructuredQuery.Projection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Projection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.StructuredQuery.Projection"; + }; + + return Projection; + })(); + + return StructuredQuery; + })(); + + v1.StructuredAggregationQuery = (function() { + + /** + * Properties of a StructuredAggregationQuery. + * @memberof google.firestore.v1 + * @interface IStructuredAggregationQuery + * @property {google.firestore.v1.IStructuredQuery|null} [structuredQuery] StructuredAggregationQuery structuredQuery + * @property {Array.|null} [aggregations] StructuredAggregationQuery aggregations + */ + + /** + * Constructs a new StructuredAggregationQuery. + * @memberof google.firestore.v1 + * @classdesc Represents a StructuredAggregationQuery. + * @implements IStructuredAggregationQuery + * @constructor + * @param {google.firestore.v1.IStructuredAggregationQuery=} [properties] Properties to set + */ + function StructuredAggregationQuery(properties) { + this.aggregations = []; + 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]]; + } + + /** + * StructuredAggregationQuery structuredQuery. + * @member {google.firestore.v1.IStructuredQuery|null|undefined} structuredQuery + * @memberof google.firestore.v1.StructuredAggregationQuery + * @instance + */ + StructuredAggregationQuery.prototype.structuredQuery = null; + + /** + * StructuredAggregationQuery aggregations. + * @member {Array.} aggregations + * @memberof google.firestore.v1.StructuredAggregationQuery + * @instance + */ + StructuredAggregationQuery.prototype.aggregations = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * StructuredAggregationQuery queryType. + * @member {"structuredQuery"|undefined} queryType + * @memberof google.firestore.v1.StructuredAggregationQuery + * @instance + */ + Object.defineProperty(StructuredAggregationQuery.prototype, "queryType", { + get: $util.oneOfGetter($oneOfFields = ["structuredQuery"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a StructuredAggregationQuery message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.v1.StructuredAggregationQuery + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.v1.StructuredAggregationQuery} StructuredAggregationQuery + */ + StructuredAggregationQuery.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.StructuredAggregationQuery) + return object; + var message = new $root.google.firestore.v1.StructuredAggregationQuery(); + if (object.structuredQuery != null) { + if (typeof object.structuredQuery !== "object") + throw TypeError(".google.firestore.v1.StructuredAggregationQuery.structuredQuery: object expected"); + message.structuredQuery = $root.google.firestore.v1.StructuredQuery.fromObject(object.structuredQuery); + } + if (object.aggregations) { + if (!Array.isArray(object.aggregations)) + throw TypeError(".google.firestore.v1.StructuredAggregationQuery.aggregations: array expected"); + message.aggregations = []; + for (var i = 0; i < object.aggregations.length; ++i) { + if (typeof object.aggregations[i] !== "object") + throw TypeError(".google.firestore.v1.StructuredAggregationQuery.aggregations: object expected"); + message.aggregations[i] = $root.google.firestore.v1.StructuredAggregationQuery.Aggregation.fromObject(object.aggregations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a StructuredAggregationQuery message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.v1.StructuredAggregationQuery + * @static + * @param {google.firestore.v1.StructuredAggregationQuery} message StructuredAggregationQuery + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StructuredAggregationQuery.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.aggregations = []; + if (message.structuredQuery != null && message.hasOwnProperty("structuredQuery")) { + object.structuredQuery = $root.google.firestore.v1.StructuredQuery.toObject(message.structuredQuery, options); + if (options.oneofs) + object.queryType = "structuredQuery"; + } + if (message.aggregations && message.aggregations.length) { + object.aggregations = []; + for (var j = 0; j < message.aggregations.length; ++j) + object.aggregations[j] = $root.google.firestore.v1.StructuredAggregationQuery.Aggregation.toObject(message.aggregations[j], options); + } + return object; + }; + + /** + * Converts this StructuredAggregationQuery to JSON. + * @function toJSON + * @memberof google.firestore.v1.StructuredAggregationQuery + * @instance + * @returns {Object.} JSON object + */ + StructuredAggregationQuery.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - StructuredQuery.Projection = (function() { + /** + * Gets the default type url for StructuredAggregationQuery + * @function getTypeUrl + * @memberof google.firestore.v1.StructuredAggregationQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StructuredAggregationQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.StructuredAggregationQuery"; + }; + + StructuredAggregationQuery.Aggregation = (function() { /** - * Properties of a Projection. - * @memberof google.firestore.v1.StructuredQuery - * @interface IProjection - * @property {Array.|null} [fields] Projection fields + * Properties of an Aggregation. + * @memberof google.firestore.v1.StructuredAggregationQuery + * @interface IAggregation + * @property {google.firestore.v1.StructuredAggregationQuery.Aggregation.ICount|null} [count] Aggregation count + * @property {string|null} [alias] Aggregation alias */ /** - * Constructs a new Projection. - * @memberof google.firestore.v1.StructuredQuery - * @classdesc Represents a Projection. - * @implements IProjection + * Constructs a new Aggregation. + * @memberof google.firestore.v1.StructuredAggregationQuery + * @classdesc Represents an Aggregation. + * @implements IAggregation * @constructor - * @param {google.firestore.v1.StructuredQuery.IProjection=} [properties] Properties to set + * @param {google.firestore.v1.StructuredAggregationQuery.IAggregation=} [properties] Properties to set */ - function Projection(properties) { - this.fields = []; + function Aggregation(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -13716,76 +16449,213 @@ } /** - * Projection fields. - * @member {Array.} fields - * @memberof google.firestore.v1.StructuredQuery.Projection + * Aggregation count. + * @member {google.firestore.v1.StructuredAggregationQuery.Aggregation.ICount|null|undefined} count + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation * @instance */ - Projection.prototype.fields = $util.emptyArray; + Aggregation.prototype.count = null; /** - * Creates a Projection message from a plain object. Also converts values to their respective internal types. + * Aggregation alias. + * @member {string} alias + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation + * @instance + */ + Aggregation.prototype.alias = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Aggregation operator. + * @member {"count"|undefined} operator + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation + * @instance + */ + Object.defineProperty(Aggregation.prototype, "operator", { + get: $util.oneOfGetter($oneOfFields = ["count"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates an Aggregation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.firestore.v1.StructuredQuery.Projection + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation * @static * @param {Object.} object Plain object - * @returns {google.firestore.v1.StructuredQuery.Projection} Projection + * @returns {google.firestore.v1.StructuredAggregationQuery.Aggregation} Aggregation */ - Projection.fromObject = function fromObject(object) { - if (object instanceof $root.google.firestore.v1.StructuredQuery.Projection) + Aggregation.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.StructuredAggregationQuery.Aggregation) return object; - var message = new $root.google.firestore.v1.StructuredQuery.Projection(); - if (object.fields) { - if (!Array.isArray(object.fields)) - throw TypeError(".google.firestore.v1.StructuredQuery.Projection.fields: array expected"); - message.fields = []; - for (var i = 0; i < object.fields.length; ++i) { - if (typeof object.fields[i] !== "object") - throw TypeError(".google.firestore.v1.StructuredQuery.Projection.fields: object expected"); - message.fields[i] = $root.google.firestore.v1.StructuredQuery.FieldReference.fromObject(object.fields[i]); - } + var message = new $root.google.firestore.v1.StructuredAggregationQuery.Aggregation(); + if (object.count != null) { + if (typeof object.count !== "object") + throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation.count: object expected"); + message.count = $root.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.fromObject(object.count); } + if (object.alias != null) + message.alias = String(object.alias); return message; }; /** - * Creates a plain object from a Projection message. Also converts values to other types if specified. + * Creates a plain object from an Aggregation message. Also converts values to other types if specified. * @function toObject - * @memberof google.firestore.v1.StructuredQuery.Projection + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation * @static - * @param {google.firestore.v1.StructuredQuery.Projection} message Projection + * @param {google.firestore.v1.StructuredAggregationQuery.Aggregation} message Aggregation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Projection.toObject = function toObject(message, options) { + Aggregation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.fields = []; - if (message.fields && message.fields.length) { - object.fields = []; - for (var j = 0; j < message.fields.length; ++j) - object.fields[j] = $root.google.firestore.v1.StructuredQuery.FieldReference.toObject(message.fields[j], options); + if (options.defaults) + object.alias = ""; + if (message.count != null && message.hasOwnProperty("count")) { + object.count = $root.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.toObject(message.count, options); + if (options.oneofs) + object.operator = "count"; } + if (message.alias != null && message.hasOwnProperty("alias")) + object.alias = message.alias; return object; }; /** - * Converts this Projection to JSON. + * Converts this Aggregation to JSON. * @function toJSON - * @memberof google.firestore.v1.StructuredQuery.Projection + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation * @instance * @returns {Object.} JSON object */ - Projection.prototype.toJSON = function toJSON() { + Aggregation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Projection; + /** + * Gets the default type url for Aggregation + * @function getTypeUrl + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Aggregation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.StructuredAggregationQuery.Aggregation"; + }; + + Aggregation.Count = (function() { + + /** + * Properties of a Count. + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation + * @interface ICount + * @property {google.protobuf.IInt64Value|null} [upTo] Count upTo + */ + + /** + * Constructs a new Count. + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation + * @classdesc Represents a Count. + * @implements ICount + * @constructor + * @param {google.firestore.v1.StructuredAggregationQuery.Aggregation.ICount=} [properties] Properties to set + */ + function Count(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]]; + } + + /** + * Count upTo. + * @member {google.protobuf.IInt64Value|null|undefined} upTo + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation.Count + * @instance + */ + Count.prototype.upTo = null; + + /** + * Creates a Count message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation.Count + * @static + * @param {Object.} object Plain object + * @returns {google.firestore.v1.StructuredAggregationQuery.Aggregation.Count} Count + */ + Count.fromObject = function fromObject(object) { + if (object instanceof $root.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count) + return object; + var message = new $root.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count(); + if (object.upTo != null) { + if (typeof object.upTo !== "object") + throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.upTo: object expected"); + message.upTo = $root.google.protobuf.Int64Value.fromObject(object.upTo); + } + return message; + }; + + /** + * Creates a plain object from a Count message. Also converts values to other types if specified. + * @function toObject + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation.Count + * @static + * @param {google.firestore.v1.StructuredAggregationQuery.Aggregation.Count} message Count + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Count.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.upTo = null; + if (message.upTo != null && message.hasOwnProperty("upTo")) + object.upTo = $root.google.protobuf.Int64Value.toObject(message.upTo, options); + return object; + }; + + /** + * Converts this Count to JSON. + * @function toJSON + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation.Count + * @instance + * @returns {Object.} JSON object + */ + Count.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Count + * @function getTypeUrl + * @memberof google.firestore.v1.StructuredAggregationQuery.Aggregation.Count + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Count.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.StructuredAggregationQuery.Aggregation.Count"; + }; + + return Count; + })(); + + return Aggregation; })(); - return StructuredQuery; + return StructuredAggregationQuery; })(); v1.Cursor = (function() { @@ -13895,6 +16765,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Cursor + * @function getTypeUrl + * @memberof google.firestore.v1.Cursor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Cursor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.Cursor"; + }; + return Cursor; })(); @@ -14094,6 +16979,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Write + * @function getTypeUrl + * @memberof google.firestore.v1.Write + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Write.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.Write"; + }; + return Write; })(); @@ -14204,6 +17104,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DocumentTransform + * @function getTypeUrl + * @memberof google.firestore.v1.DocumentTransform + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentTransform.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.DocumentTransform"; + }; + DocumentTransform.FieldTransform = (function() { /** @@ -14319,6 +17234,12 @@ if (object.fieldPath != null) message.fieldPath = String(object.fieldPath); switch (object.setToServerValue) { + default: + if (typeof object.setToServerValue === "number") { + message.setToServerValue = object.setToServerValue; + break; + } + break; case "SERVER_VALUE_UNSPECIFIED": case 0: message.setToServerValue = 0; @@ -14374,7 +17295,7 @@ if (message.fieldPath != null && message.hasOwnProperty("fieldPath")) object.fieldPath = message.fieldPath; if (message.setToServerValue != null && message.hasOwnProperty("setToServerValue")) { - object.setToServerValue = options.enums === String ? $root.google.firestore.v1.DocumentTransform.FieldTransform.ServerValue[message.setToServerValue] : message.setToServerValue; + object.setToServerValue = options.enums === String ? $root.google.firestore.v1.DocumentTransform.FieldTransform.ServerValue[message.setToServerValue] === undefined ? message.setToServerValue : $root.google.firestore.v1.DocumentTransform.FieldTransform.ServerValue[message.setToServerValue] : message.setToServerValue; if (options.oneofs) object.transformType = "setToServerValue"; } @@ -14417,6 +17338,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldTransform + * @function getTypeUrl + * @memberof google.firestore.v1.DocumentTransform.FieldTransform + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldTransform.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.DocumentTransform.FieldTransform"; + }; + /** * ServerValue enum. * @name google.firestore.v1.DocumentTransform.FieldTransform.ServerValue @@ -14547,6 +17483,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WriteResult + * @function getTypeUrl + * @memberof google.firestore.v1.WriteResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.WriteResult"; + }; + return WriteResult; })(); @@ -14681,6 +17632,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DocumentChange + * @function getTypeUrl + * @memberof google.firestore.v1.DocumentChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.DocumentChange"; + }; + return DocumentChange; })(); @@ -14806,6 +17772,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DocumentDelete + * @function getTypeUrl + * @memberof google.firestore.v1.DocumentDelete + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentDelete.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.DocumentDelete"; + }; + return DocumentDelete; })(); @@ -14931,6 +17912,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DocumentRemove + * @function getTypeUrl + * @memberof google.firestore.v1.DocumentRemove + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentRemove.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.DocumentRemove"; + }; + return DocumentRemove; })(); @@ -15029,6 +18025,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExistenceFilter + * @function getTypeUrl + * @memberof google.firestore.v1.ExistenceFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExistenceFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1.ExistenceFilter"; + }; + return ExistenceFilter; })(); @@ -15038,34 +18049,34 @@ return firestore; })(); - google.api = (function() { + google.type = (function() { /** - * Namespace api. + * Namespace type. * @memberof google * @namespace */ - var api = {}; + var type = {}; - api.Http = (function() { + type.LatLng = (function() { /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules + * Properties of a LatLng. + * @memberof google.type + * @interface ILatLng + * @property {number|null} [latitude] LatLng latitude + * @property {number|null} [longitude] LatLng longitude */ /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * Constructs a new LatLng. + * @memberof google.type + * @classdesc Represents a LatLng. + * @implements ILatLng * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.type.ILatLng=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function LatLng(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15073,102 +18084,126 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * LatLng latitude. + * @member {number} latitude + * @memberof google.type.LatLng * @instance */ - Http.prototype.rules = $util.emptyArray; + LatLng.prototype.latitude = 0; /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * LatLng longitude. + * @member {number} longitude + * @memberof google.type.LatLng + * @instance + */ + LatLng.prototype.longitude = 0; + + /** + * Creates a LatLng message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.type.LatLng * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.type.LatLng} LatLng */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + LatLng.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.LatLng) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } + var message = new $root.google.type.LatLng(); + if (object.latitude != null) + message.latitude = Number(object.latitude); + if (object.longitude != null) + message.longitude = Number(object.longitude); return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from a LatLng message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.type.LatLng * @static - * @param {google.api.Http} message Http + * @param {google.type.LatLng} message LatLng * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + LatLng.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + if (options.defaults) { + object.latitude = 0; + object.longitude = 0; } + if (message.latitude != null && message.hasOwnProperty("latitude")) + object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; + if (message.longitude != null && message.hasOwnProperty("longitude")) + object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; return object; }; /** - * Converts this Http to JSON. + * Converts this LatLng to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.type.LatLng * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + LatLng.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; + /** + * Gets the default type url for LatLng + * @function getTypeUrl + * @memberof google.type.LatLng + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LatLng.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.LatLng"; + }; + + return LatLng; })(); - api.HttpRule = (function() { + return type; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [body] HttpRule body - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details */ /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.rpc.IStatus=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function Status(properties) { + this.details = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15176,229 +18211,176 @@ } /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule + * Status code. + * @member {number} code + * @memberof google.rpc.Status * @instance */ - HttpRule.prototype.body = ""; + Status.prototype.code = 0; /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * Status message. + * @member {string} message + * @memberof google.rpc.Status * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Status.prototype.message = ""; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + Status.prototype.details = $util.emptyArray; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.rpc.Status * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.rpc.Status} Status */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) return object; - var message = new $root.google.api.HttpRule(); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.selector != null) - message.selector = String(object.selector); - if (object.body != null) - message.body = String(object.body); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); } } return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a Status message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.rpc.Status * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.rpc.Status} message Status * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + Status.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.additionalBindings = []; + object.details = []; if (options.defaults) { - object.selector = ""; - object.body = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; + object.code = 0; + object.message = ""; } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); } return object; }; /** - * Converts this HttpRule to JSON. + * Converts this Status to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.rpc.Status * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + Status.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; })(); - api.CustomHttpPattern = (function() { + return rpc; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {string} + * @property {string} FIELD_BEHAVIOR_UNSPECIFIED=FIELD_BEHAVIOR_UNSPECIFIED FIELD_BEHAVIOR_UNSPECIFIED value + * @property {string} OPTIONAL=OPTIONAL OPTIONAL value + * @property {string} REQUIRED=REQUIRED REQUIRED value + * @property {string} OUTPUT_ONLY=OUTPUT_ONLY OUTPUT_ONLY value + * @property {string} INPUT_ONLY=INPUT_ONLY INPUT_ONLY value + * @property {string} IMMUTABLE=IMMUTABLE IMMUTABLE value + * @property {string} UNORDERED_LIST=UNORDERED_LIST UNORDERED_LIST value + * @property {string} NON_EMPTY_DEFAULT=NON_EMPTY_DEFAULT NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = "FIELD_BEHAVIOR_UNSPECIFIED"; + values[valuesById[1] = "OPTIONAL"] = "OPTIONAL"; + values[valuesById[2] = "REQUIRED"] = "REQUIRED"; + values[valuesById[3] = "OUTPUT_ONLY"] = "OUTPUT_ONLY"; + values[valuesById[4] = "INPUT_ONLY"] = "INPUT_ONLY"; + values[valuesById[5] = "IMMUTABLE"] = "IMMUTABLE"; + values[valuesById[6] = "UNORDERED_LIST"] = "UNORDERED_LIST"; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = "NON_EMPTY_DEFAULT"; + return values; + })(); + + api.Http = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a Http. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15406,130 +18388,132 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.kind = ""; + Http.prototype.rules = $util.emptyArray; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.path = ""; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; - })(); + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {string} - * @property {string} FIELD_BEHAVIOR_UNSPECIFIED=FIELD_BEHAVIOR_UNSPECIFIED FIELD_BEHAVIOR_UNSPECIFIED value - * @property {string} OPTIONAL=OPTIONAL OPTIONAL value - * @property {string} REQUIRED=REQUIRED REQUIRED value - * @property {string} OUTPUT_ONLY=OUTPUT_ONLY OUTPUT_ONLY value - * @property {string} INPUT_ONLY=INPUT_ONLY INPUT_ONLY value - * @property {string} IMMUTABLE=IMMUTABLE IMMUTABLE value - * @property {string} UNORDERED_LIST=UNORDERED_LIST UNORDERED_LIST value - * @property {string} NON_EMPTY_DEFAULT=NON_EMPTY_DEFAULT NON_EMPTY_DEFAULT value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = "FIELD_BEHAVIOR_UNSPECIFIED"; - values[valuesById[1] = "OPTIONAL"] = "OPTIONAL"; - values[valuesById[2] = "REQUIRED"] = "REQUIRED"; - values[valuesById[3] = "OUTPUT_ONLY"] = "OUTPUT_ONLY"; - values[valuesById[4] = "INPUT_ONLY"] = "INPUT_ONLY"; - values[valuesById[5] = "IMMUTABLE"] = "IMMUTABLE"; - values[valuesById[6] = "UNORDERED_LIST"] = "UNORDERED_LIST"; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = "NON_EMPTY_DEFAULT"; - return values; + return Http; })(); - api.ResourceDescriptor = (function() { + api.HttpRule = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a HttpRule. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15537,232 +18521,257 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.type = ""; + HttpRule.prototype.selector = ""; /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + HttpRule.prototype.get = null; /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.nameField = ""; + HttpRule.prototype.custom = null; /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.history = 0; + HttpRule.prototype.body = ""; /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.plural = ""; + HttpRule.prototype.responseBody = ""; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.singular = ""; + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } } return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } + if (options.arrays || options.defaults) + object.additionalBindings = []; if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {string} - * @property {string} HISTORY_UNSPECIFIED=HISTORY_UNSPECIFIED HISTORY_UNSPECIFIED value - * @property {string} ORIGINALLY_SINGLE_PATTERN=ORIGINALLY_SINGLE_PATTERN ORIGINALLY_SINGLE_PATTERN value - * @property {string} FUTURE_MULTI_PATTERN=FUTURE_MULTI_PATTERN FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = "HISTORY_UNSPECIFIED"; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = "ORIGINALLY_SINGLE_PATTERN"; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = "FUTURE_MULTI_PATTERN"; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {string} - * @property {string} STYLE_UNSPECIFIED=STYLE_UNSPECIFIED STYLE_UNSPECIFIED value - * @property {string} DECLARATIVE_FRIENDLY=DECLARATIVE_FRIENDLY DECLARATIVE_FRIENDLY value + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = "STYLE_UNSPECIFIED"; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = "DECLARATIVE_FRIENDLY"; - return values; - })(); + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; - return ResourceDescriptor; + return HttpRule; })(); - api.ResourceReference = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a ResourceReference. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new ResourceReference. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function ResourceReference(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15770,109 +18779,119 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.type = ""; + CustomHttpPattern.prototype.kind = ""; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.childType = ""; + CustomHttpPattern.prototype.path = ""; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.kind = ""; + object.path = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; - })(); - - return api; - })(); - - google.type = (function() { + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; + return CustomHttpPattern; + })(); - type.LatLng = (function() { + api.ResourceDescriptor = (function() { /** - * Properties of a LatLng. - * @memberof google.type - * @interface ILatLng - * @property {number|null} [latitude] LatLng latitude - * @property {number|null} [longitude] LatLng longitude + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style */ /** - * Constructs a new LatLng. - * @memberof google.type - * @classdesc Represents a LatLng. - * @implements ILatLng + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.type.ILatLng=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function LatLng(properties) { + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15880,111 +18899,257 @@ } /** - * LatLng latitude. - * @member {number} latitude - * @memberof google.type.LatLng + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - LatLng.prototype.latitude = 0; + ResourceDescriptor.prototype.type = ""; /** - * LatLng longitude. - * @member {number} longitude - * @memberof google.type.LatLng + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - LatLng.prototype.longitude = 0; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * Creates a LatLng message from a plain object. Also converts values to their respective internal types. + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.type.LatLng + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.type.LatLng} LatLng + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - LatLng.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.LatLng) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) return object; - var message = new $root.google.type.LatLng(); - if (object.latitude != null) - message.latitude = Number(object.latitude); - if (object.longitude != null) - message.longitude = Number(object.longitude); + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } return message; }; /** - * Creates a plain object from a LatLng message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.type.LatLng + * @memberof google.api.ResourceDescriptor * @static - * @param {google.type.LatLng} message LatLng + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LatLng.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } if (options.defaults) { - object.latitude = 0; - object.longitude = 0; + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } - if (message.latitude != null && message.hasOwnProperty("latitude")) - object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; - if (message.longitude != null && message.hasOwnProperty("longitude")) - object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; return object; }; /** - * Converts this LatLng to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.type.LatLng + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - LatLng.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LatLng; - })(); + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; - return type; - })(); + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {string} + * @property {string} HISTORY_UNSPECIFIED=HISTORY_UNSPECIFIED HISTORY_UNSPECIFIED value + * @property {string} ORIGINALLY_SINGLE_PATTERN=ORIGINALLY_SINGLE_PATTERN ORIGINALLY_SINGLE_PATTERN value + * @property {string} FUTURE_MULTI_PATTERN=FUTURE_MULTI_PATTERN FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = "HISTORY_UNSPECIFIED"; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = "ORIGINALLY_SINGLE_PATTERN"; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = "FUTURE_MULTI_PATTERN"; + return values; + })(); - google.rpc = (function() { + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {string} + * @property {string} STYLE_UNSPECIFIED=STYLE_UNSPECIFIED STYLE_UNSPECIFIED value + * @property {string} DECLARATIVE_FRIENDLY=DECLARATIVE_FRIENDLY DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = "STYLE_UNSPECIFIED"; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = "DECLARATIVE_FRIENDLY"; + return values; + })(); - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; + return ResourceDescriptor; + })(); - rpc.Status = (function() { + api.ResourceReference = (function() { /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set + * @param {google.api.IResourceReference=} [properties] Properties to set */ - function Status(properties) { - this.details = []; + function ResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15992,104 +19157,94 @@ } /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - Status.prototype.message = ""; + ResourceReference.prototype.type = ""; /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - Status.prototype.details = $util.emptyArray; + ResourceReference.prototype.childType = ""; /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.rpc.Status + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status + * @returns {google.api.ResourceReference} ResourceReference */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); return message; }; /** - * Creates a plain object from a Status message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.rpc.Status + * @memberof google.api.ResourceReference * @static - * @param {google.rpc.Status} message Status + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Status.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.details = []; if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + object.type = ""; + object.childType = ""; } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; return object; }; /** - * Converts this Status to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.rpc.Status + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - Status.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Status; + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; })(); - return rpc; + return api; })(); google.longrunning = (function() { @@ -16451,6 +19606,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + return Operation; })(); @@ -16534,6 +19704,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + return GetOperationRequest; })(); @@ -16660,6 +19845,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + return ListOperationsRequest; })(); @@ -16770,6 +19970,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + return ListOperationsResponse; })(); @@ -16853,6 +20068,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + return CancelOperationRequest; })(); @@ -16936,6 +20166,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + return DeleteOperationRequest; })(); @@ -17037,6 +20282,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + return WaitOperationRequest; })(); @@ -17135,6 +20395,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + return OperationInfo; })(); diff --git a/dev/protos/firestore_v1beta1_proto_api.d.ts b/dev/protos/firestore_v1beta1_proto_api.d.ts index ce9fcaee3..df5af2964 100644 --- a/dev/protos/firestore_v1beta1_proto_api.d.ts +++ b/dev/protos/firestore_v1beta1_proto_api.d.ts @@ -66,2226 +66,2709 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { + /** Properties of a Struct. */ + interface IStruct { - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); + /** Struct fields */ + fields?: ({ [k: string]: google.protobuf.IValue }|null); } - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { + /** Represents a Struct. */ + class Struct implements IStruct { /** - * Constructs a new FileDescriptorSet. + * Constructs a new Struct. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFileDescriptorSet); + constructor(properties?: google.protobuf.IStruct); - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; + /** Struct fields. */ + public fields: { [k: string]: google.protobuf.IValue }; /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorSet + * @returns Struct */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet + * Creates a plain object from a Struct message. Also converts values to other types if specified. + * @param message Struct * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorSet to JSON. + * Converts this Struct to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); + /** + * Gets the default type url for Struct + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); + /** Properties of a Value. */ + interface IValue { - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + /** Value nullValue */ + nullValue?: (google.protobuf.NullValue|null); - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); + /** Value numberValue */ + numberValue?: (number|null); - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); + /** Value stringValue */ + stringValue?: (string|null); - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); + /** Value boolValue */ + boolValue?: (boolean|null); - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** Value structValue */ + structValue?: (google.protobuf.IStruct|null); - /** FileDescriptorProto syntax */ - syntax?: (string|null); + /** Value listValue */ + listValue?: (google.protobuf.IListValue|null); } - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { + /** Represents a Value. */ + class Value implements IValue { /** - * Constructs a new FileDescriptorProto. + * Constructs a new Value. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; + constructor(properties?: google.protobuf.IValue); - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; + /** Value nullValue. */ + public nullValue?: (google.protobuf.NullValue|null); - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; + /** Value numberValue. */ + public numberValue?: (number|null); - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; + /** Value stringValue. */ + public stringValue?: (string|null); - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; + /** Value boolValue. */ + public boolValue?: (boolean|null); - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); + /** Value structValue. */ + public structValue?: (google.protobuf.IStruct|null); - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + /** Value listValue. */ + public listValue?: (google.protobuf.IListValue|null); - /** FileDescriptorProto syntax. */ - public syntax: string; + /** Value kind. */ + public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileDescriptorProto + * @returns Value */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.Value; /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileDescriptorProto to JSON. + * Converts this Value to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); + /** NullValue enum. */ + type NullValue = + "NULL_VALUE"; - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + /** Properties of a ListValue. */ + interface IListValue { - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); + /** ListValue values */ + values?: (google.protobuf.IValue[]|null); } - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { + /** Represents a ListValue. */ + class ListValue implements IListValue { /** - * Constructs a new DescriptorProto. + * Constructs a new ListValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + constructor(properties?: google.protobuf.IListValue); - /** DescriptorProto reservedName. */ - public reservedName: string[]; + /** ListValue values. */ + public values: google.protobuf.IValue[]; /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DescriptorProto + * @returns ListValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @param message ListValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DescriptorProto to JSON. + * Converts this ListValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace DescriptorProto { + /** Properties of an Empty. */ + interface IEmpty { + } - /** Properties of an ExtensionRange. */ - interface IExtensionRange { + /** Represents an Empty. */ + class Empty implements IEmpty { - /** ExtensionRange start */ - start?: (number|null); + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); - /** ExtensionRange end */ - end?: (number|null); - } + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** ExtensionRange start. */ - public start: number; + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ExtensionRange end. */ - public end: number; + /** Properties of a DoubleValue. */ + interface IDoubleValue { - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + /** DoubleValue value */ + value?: (number|null); + } - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Represents a DoubleValue. */ + class DoubleValue implements IDoubleValue { - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Constructs a new DoubleValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDoubleValue); - /** Properties of a ReservedRange. */ - interface IReservedRange { + /** DoubleValue value. */ + public value: number; - /** ReservedRange start */ - start?: (number|null); + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DoubleValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; - /** ReservedRange end */ - end?: (number|null); - } + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @param message DoubleValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { + /** + * Converts this DoubleValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + /** + * Gets the default type url for DoubleValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ReservedRange start. */ - public start: number; + /** Properties of a FloatValue. */ + interface IFloatValue { - /** ReservedRange end. */ - public end: number; + /** FloatValue value */ + value?: (number|null); + } - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + /** Represents a FloatValue. */ + class FloatValue implements IFloatValue { - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Constructs a new FloatValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFloatValue); - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** FloatValue value. */ + public value: number; + + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FloatValue + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @param message FloatValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FloatValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FloatValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { + /** Properties of an Int64Value. */ + interface IInt64Value { - /** FieldDescriptorProto name */ - name?: (string|null); + /** Int64Value value */ + value?: (number|string|null); + } - /** FieldDescriptorProto number */ - number?: (number|null); + /** Represents an Int64Value. */ + class Int64Value implements IInt64Value { - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|null); + /** + * Constructs a new Int64Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt64Value); - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|null); + /** Int64Value value. */ + public value: (number|string); - /** FieldDescriptorProto typeName */ - typeName?: (string|null); + /** + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; - /** FieldDescriptorProto extendee */ - extendee?: (string|null); + /** + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @param message Int64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); + /** + * Converts this Int64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); + /** + * Gets the default type url for Int64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); + /** Properties of a UInt64Value. */ + interface IUInt64Value { - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); + /** UInt64Value value */ + value?: (number|string|null); } - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { + /** Represents a UInt64Value. */ + class UInt64Value implements IUInt64Value { /** - * Constructs a new FieldDescriptorProto. + * Constructs a new UInt64Value. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); + constructor(properties?: google.protobuf.IUInt64Value); - /** FieldDescriptorProto name. */ - public name: string; + /** UInt64Value value. */ + public value: (number|string); - /** FieldDescriptorProto number. */ - public number: number; + /** + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UInt64Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; - /** FieldDescriptorProto label. */ - public label: google.protobuf.FieldDescriptorProto.Label; + /** + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * @param message UInt64Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldDescriptorProto type. */ - public type: google.protobuf.FieldDescriptorProto.Type; + /** + * Converts this UInt64Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FieldDescriptorProto typeName. */ - public typeName: string; + /** + * Gets the default type url for UInt64Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FieldDescriptorProto extendee. */ - public extendee: string; + /** Properties of an Int32Value. */ + interface IInt32Value { - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; + /** Int32Value value */ + value?: (number|null); + } + + /** Represents an Int32Value. */ + class Int32Value implements IInt32Value { + + /** + * Constructs a new Int32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IInt32Value); + + /** Int32Value value. */ + public value: number; + + /** + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Int32Value + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + + /** + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * @param message Int32Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Int32Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Int32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UInt32Value. */ + interface IUInt32Value { + + /** UInt32Value value */ + value?: (number|null); + } - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; + /** Represents a UInt32Value. */ + class UInt32Value implements IUInt32Value { - /** FieldDescriptorProto jsonName. */ - public jsonName: string; + /** + * Constructs a new UInt32Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUInt32Value); - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); + /** UInt32Value value. */ + public value: number; /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldDescriptorProto + * @returns UInt32Value */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * @param message UInt32Value * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldDescriptorProto to JSON. + * Converts this UInt32Value to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - namespace FieldDescriptorProto { - /** Type enum. */ - type Type = - "TYPE_DOUBLE"| "TYPE_FLOAT"| "TYPE_INT64"| "TYPE_UINT64"| "TYPE_INT32"| "TYPE_FIXED64"| "TYPE_FIXED32"| "TYPE_BOOL"| "TYPE_STRING"| "TYPE_GROUP"| "TYPE_MESSAGE"| "TYPE_BYTES"| "TYPE_UINT32"| "TYPE_ENUM"| "TYPE_SFIXED32"| "TYPE_SFIXED64"| "TYPE_SINT32"| "TYPE_SINT64"; - - /** Label enum. */ - type Label = - "LABEL_OPTIONAL"| "LABEL_REQUIRED"| "LABEL_REPEATED"; + /** + * Gets the default type url for UInt32Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); + /** Properties of a BoolValue. */ + interface IBoolValue { - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); + /** BoolValue value */ + value?: (boolean|null); } - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { + /** Represents a BoolValue. */ + class BoolValue implements IBoolValue { /** - * Constructs a new OneofDescriptorProto. + * Constructs a new BoolValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; + constructor(properties?: google.protobuf.IBoolValue); - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); + /** BoolValue value. */ + public value: boolean; /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneofDescriptorProto + * @returns BoolValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. + * @param message BoolValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneofDescriptorProto to JSON. + * Converts this BoolValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - /** EnumDescriptorProto name */ - name?: (string|null); + /** + * Gets the default type url for BoolValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + /** Properties of a StringValue. */ + interface IStringValue { - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); + /** StringValue value */ + value?: (string|null); } - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { + /** Represents a StringValue. */ + class StringValue implements IStringValue { /** - * Constructs a new EnumDescriptorProto. + * Constructs a new StringValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; + constructor(properties?: google.protobuf.IStringValue); - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); + /** StringValue value. */ + public value: string; /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumDescriptorProto + * @returns StringValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto + * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * @param message StringValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumDescriptorProto to JSON. + * Converts this StringValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - /** EnumValueDescriptorProto name */ - name?: (string|null); + /** + * Gets the default type url for StringValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** EnumValueDescriptorProto number */ - number?: (number|null); + /** Properties of a BytesValue. */ + interface IBytesValue { - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); + /** BytesValue value */ + value?: (Uint8Array|null); } - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + /** Represents a BytesValue. */ + class BytesValue implements IBytesValue { /** - * Constructs a new EnumValueDescriptorProto. + * Constructs a new BytesValue. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; + constructor(properties?: google.protobuf.IBytesValue); - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); + /** BytesValue value. */ + public value: Uint8Array; /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumValueDescriptorProto + * @returns BytesValue */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @param message BytesValue * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumValueDescriptorProto to JSON. + * Converts this BytesValue to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { + /** + * Gets the default type url for BytesValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** ServiceDescriptorProto name */ - name?: (string|null); + /** Properties of an Any. */ + interface IAny { - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); + /** Any type_url */ + type_url?: (string|null); - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); + /** Any value */ + value?: (Uint8Array|null); } - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { + /** Represents an Any. */ + class Any implements IAny { /** - * Constructs a new ServiceDescriptorProto. + * Constructs a new Any. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; + constructor(properties?: google.protobuf.IAny); - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; + /** Any type_url. */ + public type_url: string; - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); + /** Any value. */ + public value: Uint8Array; /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceDescriptorProto + * @returns Any */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceDescriptorProto to JSON. + * Converts this Any to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); } - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { /** - * Constructs a new MethodDescriptorProto. + * Constructs a new FileDescriptorSet. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; + constructor(properties?: google.protobuf.IFileDescriptorSet); - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodDescriptorProto + * @returns FileDescriptorSet */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodDescriptorProto to JSON. + * Converts this FileDescriptorSet to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); + /** FileDescriptorProto name */ + name?: (string|null); - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); + /** FileDescriptorProto package */ + "package"?: (string|null); - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); - /** FileOptions goPackage */ - goPackage?: (string|null); + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** FileOptions deprecated */ - deprecated?: (boolean|null); + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** FileDescriptorProto syntax */ + syntax?: (string|null); - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + /** FileDescriptorProto edition */ + edition?: (string|null); } - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { /** - * Constructs a new FileOptions. + * Constructs a new FileDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; + constructor(properties?: google.protobuf.IFileDescriptorProto); - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; + /** FileDescriptorProto name. */ + public name: string; - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; + /** FileDescriptorProto package. */ + public package: string; - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; + /** FileDescriptorProto dependency. */ + public dependency: string[]; - /** FileOptions optimizeFor. */ - public optimizeFor: google.protobuf.FileOptions.OptimizeMode; + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; - /** FileOptions goPackage. */ - public goPackage: string; + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; - /** FileOptions deprecated. */ - public deprecated: boolean; + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; + /** FileDescriptorProto syntax. */ + public syntax: string; - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** FileDescriptorProto edition. */ + public edition: string; /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FileOptions + * @returns FileDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FileOptions to JSON. + * Converts this FileDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace FileOptions { + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { - /** OptimizeMode enum. */ - type OptimizeMode = - "SPEED"| "CODE_SIZE"| "LITE_RUNTIME"; - } + /** DescriptorProto name */ + name?: (string|null); - /** Properties of a MessageOptions. */ - interface IMessageOptions { + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); - /** MessageOptions deprecated */ - deprecated?: (boolean|null); + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); } - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { /** - * Constructs a new MessageOptions. + * Constructs a new DescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IMessageOptions); + constructor(properties?: google.protobuf.IDescriptorProto); - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - /** MessageOptions deprecated. */ - public deprecated: boolean; + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); - /** MessageOptions mapEntry. */ - public mapEntry: boolean; + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** DescriptorProto reservedName. */ + public reservedName: string[]; /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MessageOptions + * @returns DescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MessageOptions to JSON. + * Converts this DescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FieldOptions. */ - interface IFieldOptions { + namespace DescriptorProto { - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|null); + /** Properties of an ExtensionRange. */ + interface IExtensionRange { - /** FieldOptions packed */ - packed?: (boolean|null); + /** ExtensionRange start */ + start?: (number|null); - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|null); + /** ExtensionRange end */ + end?: (number|null); - /** FieldOptions lazy */ - lazy?: (boolean|null); + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } - /** FieldOptions deprecated */ - deprecated?: (boolean|null); + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { - /** FieldOptions weak */ - weak?: (boolean|null); + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** ExtensionRange start. */ + public start: number; - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + /** ExtensionRange end. */ + public end: number; - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** FieldOptions ctype. */ - public ctype: google.protobuf.FieldOptions.CType; + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** FieldOptions packed. */ - public packed: boolean; + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** FieldOptions jstype. */ - public jstype: google.protobuf.FieldOptions.JSType; + /** Properties of a ReservedRange. */ + interface IReservedRange { - /** FieldOptions lazy. */ - public lazy: boolean; + /** ReservedRange start */ + start?: (number|null); - /** FieldOptions deprecated. */ - public deprecated: boolean; + /** ReservedRange end */ + end?: (number|null); + } - /** FieldOptions weak. */ - public weak: boolean; + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { - /** FieldOptions uninterpretedOption. */ + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FieldOptions + * @returns ExtensionRangeOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FieldOptions to JSON. + * Converts this ExtensionRangeOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace FieldOptions { + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { - /** CType enum. */ - type CType = - "STRING"| "CORD"| "STRING_PIECE"; + /** FieldDescriptorProto name */ + name?: (string|null); - /** JSType enum. */ - type JSType = - "JS_NORMAL"| "JS_STRING"| "JS_NUMBER"; - } + /** FieldDescriptorProto number */ + number?: (number|null); - /** Properties of an OneofOptions. */ - interface IOneofOptions { + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|null); - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); } - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { /** - * Constructs a new OneofOptions. + * Constructs a new FieldDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IOneofOptions); + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: google.protobuf.FieldDescriptorProto.Label; + + /** FieldDescriptorProto type. */ + public type: google.protobuf.FieldDescriptorProto.Type; + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns OneofOptions + * @returns FieldDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this OneofOptions to JSON. + * Converts this FieldDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EnumOptions. */ - interface IEnumOptions { + namespace FieldDescriptorProto { - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); + /** Type enum. */ + type Type = + "TYPE_DOUBLE"| "TYPE_FLOAT"| "TYPE_INT64"| "TYPE_UINT64"| "TYPE_INT32"| "TYPE_FIXED64"| "TYPE_FIXED32"| "TYPE_BOOL"| "TYPE_STRING"| "TYPE_GROUP"| "TYPE_MESSAGE"| "TYPE_BYTES"| "TYPE_UINT32"| "TYPE_ENUM"| "TYPE_SFIXED32"| "TYPE_SFIXED64"| "TYPE_SINT32"| "TYPE_SINT64"; - /** EnumOptions deprecated */ - deprecated?: (boolean|null); + /** Label enum. */ + type Label = + "LABEL_OPTIONAL"| "LABEL_REQUIRED"| "LABEL_REPEATED"; + } - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); } - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { /** - * Constructs a new EnumOptions. + * Constructs a new OneofDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; + constructor(properties?: google.protobuf.IOneofDescriptorProto); - /** EnumOptions deprecated. */ - public deprecated: boolean; + /** OneofDescriptorProto name. */ + public name: string; - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumOptions + * @returns OneofDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumOptions to JSON. + * Converts this OneofDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); + /** EnumDescriptorProto name */ + name?: (string|null); - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); } - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { /** - * Constructs a new EnumValueOptions. + * Constructs a new EnumDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEnumValueOptions); + constructor(properties?: google.protobuf.IEnumDescriptorProto); - /** EnumValueOptions deprecated. */ - public deprecated: boolean; + /** EnumDescriptorProto name. */ + public name: string; - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns EnumValueOptions + * @returns EnumDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this EnumValueOptions to JSON. + * Converts this EnumDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ServiceOptions. */ - interface IServiceOptions { + namespace EnumDescriptorProto { - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** EnumReservedRange start */ + start?: (number|null); - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); + /** EnumReservedRange end */ + end?: (number|null); + } - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { /** - * Constructs a new ServiceOptions. + * Constructs a new EnumValueDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IServiceOptions); + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - /** ServiceOptions deprecated. */ - public deprecated: boolean; + /** EnumValueDescriptorProto name. */ + public name: string; - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ServiceOptions + * @returns EnumValueDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ServiceOptions to JSON. + * Converts this EnumValueDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - /** MethodOptions deprecated */ - deprecated?: (boolean|null); + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); + /** ServiceDescriptorProto name */ + name?: (string|null); - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); - /** MethodOptions .google.longrunning.operationInfo */ - ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); } - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { /** - * Constructs a new MethodOptions. + * Constructs a new ServiceDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IMethodOptions); + constructor(properties?: google.protobuf.IServiceDescriptorProto); - /** MethodOptions deprecated. */ - public deprecated: boolean; + /** ServiceDescriptorProto name. */ + public name: string; - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodOptions + * @returns ServiceDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodOptions to JSON. + * Converts this ServiceDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); + /** MethodDescriptorProto name */ + name?: (string|null); - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|string|null); + /** MethodDescriptorProto inputType */ + inputType?: (string|null); - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|string|null); + /** MethodDescriptorProto outputType */ + outputType?: (string|null); - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|null); + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); } - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { /** - * Constructs a new UninterpretedOption. + * Constructs a new MethodDescriptorProto. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; + constructor(properties?: google.protobuf.IMethodDescriptorProto); - /** UninterpretedOption identifierValue. */ - public identifierValue: string; + /** MethodDescriptorProto name. */ + public name: string; - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|string); + /** MethodDescriptorProto inputType. */ + public inputType: string; - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|string); + /** MethodDescriptorProto outputType. */ + public outputType: string; - /** UninterpretedOption doubleValue. */ - public doubleValue: number; + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); - /** UninterpretedOption stringValue. */ - public stringValue: Uint8Array; + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UninterpretedOption + * @returns MethodDescriptorProto */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UninterpretedOption to JSON. + * Converts this MethodDescriptorProto to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace UninterpretedOption { + /** Properties of a FileOptions. */ + interface IFileOptions { - /** Properties of a NamePart. */ - interface INamePart { + /** FileOptions javaPackage */ + javaPackage?: (string|null); - /** NamePart namePart */ - namePart: string; + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); - /** NamePart isExtension */ - isExtension: boolean; - } + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); - /** Represents a NamePart. */ - class NamePart implements INamePart { + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); - /** NamePart namePart. */ - public namePart: string; + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|null); - /** NamePart isExtension. */ - public isExtension: boolean; + /** FileOptions goPackage */ + goPackage?: (string|null); - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { + /** FileOptions phpGenericServices */ + phpGenericServices?: (boolean|null); - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } + /** FileOptions deprecated */ + deprecated?: (boolean|null); - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); } - namespace SourceCodeInfo { + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { - /** Properties of a Location. */ - interface ILocation { + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); - /** Location path */ - path?: (number[]|null); + /** FileOptions javaPackage. */ + public javaPackage: string; - /** Location span */ - span?: (number[]|null); + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; - /** Location leadingComments */ - leadingComments?: (string|null); + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; - /** Location trailingComments */ - trailingComments?: (string|null); + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: google.protobuf.FileOptions.OptimizeMode; - /** Represents a Location. */ - class Location implements ILocation { + /** FileOptions goPackage. */ + public goPackage: string; - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; - /** Location path. */ - public path: number[]; + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; - /** Location span. */ - public span: number[]; + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; - /** Location leadingComments. */ - public leadingComments: string; + /** FileOptions phpGenericServices. */ + public phpGenericServices: boolean; - /** Location trailingComments. */ - public trailingComments: string; + /** FileOptions deprecated. */ + public deprecated: boolean; - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } + /** FileOptions phpNamespace. */ + public phpNamespace: string; - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); + /** FileOptions rubyPackage. */ + public rubyPackage: string; - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GeneratedCodeInfo + * @returns FileOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this FileOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Annotation path. */ - public path: number[]; + namespace FileOptions { - /** Annotation sourceFile. */ - public sourceFile: string; + /** OptimizeMode enum. */ + type OptimizeMode = + "SPEED"| "CODE_SIZE"| "LITE_RUNTIME"; + } - /** Annotation begin. */ - public begin: number; + /** Properties of a MessageOptions. */ + interface IMessageOptions { - /** Annotation end. */ - public end: number; + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** MessageOptions deprecated */ + deprecated?: (boolean|null); - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); - /** Properties of a Struct. */ - interface IStruct { + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - /** Struct fields */ - fields?: ({ [k: string]: google.protobuf.IValue }|null); + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); } - /** Represents a Struct. */ - class Struct implements IStruct { + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { /** - * Constructs a new Struct. + * Constructs a new MessageOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IStruct); + constructor(properties?: google.protobuf.IMessageOptions); - /** Struct fields. */ - public fields: { [k: string]: google.protobuf.IValue }; + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Struct + * @returns MessageOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Struct; + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. - * @param message Struct + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Struct, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Struct to JSON. + * Converts this MessageOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Value. */ - interface IValue { + /** Properties of a FieldOptions. */ + interface IFieldOptions { - /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|null); + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|null); - /** Value numberValue */ - numberValue?: (number|null); + /** FieldOptions packed */ + packed?: (boolean|null); - /** Value stringValue */ - stringValue?: (string|null); + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|null); - /** Value boolValue */ - boolValue?: (boolean|null); + /** FieldOptions lazy */ + lazy?: (boolean|null); - /** Value structValue */ - structValue?: (google.protobuf.IStruct|null); + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); - /** Value listValue */ - listValue?: (google.protobuf.IListValue|null); + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); } - /** Represents a Value. */ - class Value implements IValue { + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { /** - * Constructs a new Value. + * Constructs a new FieldOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IValue); + constructor(properties?: google.protobuf.IFieldOptions); - /** Value nullValue. */ - public nullValue?: (google.protobuf.NullValue|null); + /** FieldOptions ctype. */ + public ctype: google.protobuf.FieldOptions.CType; - /** Value numberValue. */ - public numberValue?: (number|null); + /** FieldOptions packed. */ + public packed: boolean; - /** Value stringValue. */ - public stringValue?: (string|null); + /** FieldOptions jstype. */ + public jstype: google.protobuf.FieldOptions.JSType; - /** Value boolValue. */ - public boolValue?: (boolean|null); + /** FieldOptions lazy. */ + public lazy: boolean; - /** Value structValue. */ - public structValue?: (google.protobuf.IStruct|null); + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; - /** Value listValue. */ - public listValue?: (google.protobuf.IListValue|null); + /** FieldOptions deprecated. */ + public deprecated: boolean; - /** Value kind. */ - public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Value + * @returns FieldOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Value; + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Value to JSON. + * Converts this FieldOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** NullValue enum. */ - type NullValue = - "NULL_VALUE"; + namespace FieldOptions { - /** Properties of a ListValue. */ - interface IListValue { + /** CType enum. */ + type CType = + "STRING"| "CORD"| "STRING_PIECE"; - /** ListValue values */ - values?: (google.protobuf.IValue[]|null); + /** JSType enum. */ + type JSType = + "JS_NORMAL"| "JS_STRING"| "JS_NUMBER"; } - /** Represents a ListValue. */ - class ListValue implements IListValue { + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { /** - * Constructs a new ListValue. + * Constructs a new OneofOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IListValue); + constructor(properties?: google.protobuf.IOneofOptions); - /** ListValue values. */ - public values: google.protobuf.IValue[]; + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListValue + * @returns OneofOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ListValue; + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. - * @param message ListValue + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.ListValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListValue to JSON. + * Converts this OneofOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Empty. */ - interface IEmpty { + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents an Empty. */ - class Empty implements IEmpty { + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { /** - * Constructs a new Empty. + * Constructs a new EnumOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IEmpty); + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Empty + * @returns EnumOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Empty to JSON. + * Converts this EnumOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DoubleValue. */ - interface IDoubleValue { + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { - /** DoubleValue value */ - value?: (number|null); + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); } - /** Represents a DoubleValue. */ - class DoubleValue implements IDoubleValue { + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { /** - * Constructs a new DoubleValue. + * Constructs a new EnumValueOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDoubleValue); + constructor(properties?: google.protobuf.IEnumValueOptions); - /** DoubleValue value. */ - public value: number; + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DoubleValue + * @returns EnumValueOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DoubleValue; + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. - * @param message DoubleValue + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.DoubleValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DoubleValue to JSON. + * Converts this EnumValueOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a FloatValue. */ - interface IFloatValue { + /** Properties of a ServiceOptions. */ + interface IServiceOptions { - /** FloatValue value */ - value?: (number|null); + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); } - /** Represents a FloatValue. */ - class FloatValue implements IFloatValue { + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { /** - * Constructs a new FloatValue. + * Constructs a new ServiceOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IFloatValue); + constructor(properties?: google.protobuf.IServiceOptions); - /** FloatValue value. */ - public value: number; + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns FloatValue + * @returns ServiceOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FloatValue; + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. - * @param message FloatValue + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.FloatValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this FloatValue to JSON. + * Converts this ServiceOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an Int64Value. */ - interface IInt64Value { + /** Properties of a MethodOptions. */ + interface IMethodOptions { - /** Int64Value value */ - value?: (number|string|null); + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + + /** MethodOptions .google.longrunning.operationInfo */ + ".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null); } - /** Represents an Int64Value. */ - class Int64Value implements IInt64Value { + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { /** - * Constructs a new Int64Value. + * Constructs a new MethodOptions. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IInt64Value); + constructor(properties?: google.protobuf.IMethodOptions); - /** Int64Value value. */ - public value: (number|string); + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: google.protobuf.MethodOptions.IdempotencyLevel; + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Int64Value + * @returns MethodOptions */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int64Value; + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. - * @param message Int64Value + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Int64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Int64Value to JSON. + * Converts this MethodOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a UInt64Value. */ - interface IUInt64Value { + namespace MethodOptions { - /** UInt64Value value */ - value?: (number|string|null); + /** IdempotencyLevel enum. */ + type IdempotencyLevel = + "IDEMPOTENCY_UNKNOWN"| "NO_SIDE_EFFECTS"| "IDEMPOTENT"; } - /** Represents a UInt64Value. */ - class UInt64Value implements IUInt64Value { + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { - /** - * Constructs a new UInt64Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUInt64Value); + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - /** UInt64Value value. */ - public value: (number|string); + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); - /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UInt64Value - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt64Value; + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|string|null); - /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. - * @param message UInt64Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UInt64Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|string|null); - /** - * Converts this UInt64Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); - /** Properties of an Int32Value. */ - interface IInt32Value { + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|null); - /** Int32Value value */ - value?: (number|null); + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); } - /** Represents an Int32Value. */ - class Int32Value implements IInt32Value { + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { /** - * Constructs a new Int32Value. + * Constructs a new UninterpretedOption. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IInt32Value); + constructor(properties?: google.protobuf.IUninterpretedOption); - /** Int32Value value. */ - public value: number; + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: Uint8Array; + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Int32Value + * @returns UninterpretedOption */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Int32Value; + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. - * @param message Int32Value + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.Int32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Int32Value to JSON. + * Converts this UninterpretedOption to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a UInt32Value. */ - interface IUInt32Value { + namespace UninterpretedOption { - /** UInt32Value value */ - value?: (number|null); + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Represents a UInt32Value. */ - class UInt32Value implements IUInt32Value { + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { /** - * Constructs a new UInt32Value. + * Constructs a new SourceCodeInfo. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IUInt32Value); + constructor(properties?: google.protobuf.ISourceCodeInfo); - /** UInt32Value value. */ - public value: number; + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UInt32Value + * @returns SourceCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UInt32Value; + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. - * @param message UInt32Value + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.UInt32Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UInt32Value to JSON. + * Converts this SourceCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BoolValue. */ - interface IBoolValue { + namespace SourceCodeInfo { - /** BoolValue value */ - value?: (boolean|null); - } + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; - /** Represents a BoolValue. */ - class BoolValue implements IBoolValue { + /** Location leadingComments. */ + public leadingComments: string; - /** - * Constructs a new BoolValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBoolValue); + /** Location trailingComments. */ + public trailingComments: string; - /** BoolValue value. */ - public value: boolean; + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; - /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BoolValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BoolValue; + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @param message BoolValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BoolValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this BoolValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Properties of a StringValue. */ - interface IStringValue { + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { - /** StringValue value */ - value?: (string|null); + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); } - /** Represents a StringValue. */ - class StringValue implements IStringValue { + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { /** - * Constructs a new StringValue. + * Constructs a new GeneratedCodeInfo. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IStringValue); + constructor(properties?: google.protobuf.IGeneratedCodeInfo); - /** StringValue value. */ - public value: string; + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns StringValue + * @returns GeneratedCodeInfo */ - public static fromObject(object: { [k: string]: any }): google.protobuf.StringValue; + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. - * @param message StringValue + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.protobuf.StringValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this StringValue to JSON. + * Converts this GeneratedCodeInfo to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a BytesValue. */ - interface IBytesValue { + namespace GeneratedCodeInfo { - /** BytesValue value */ - value?: (Uint8Array|null); - } + /** Properties of an Annotation. */ + interface IAnnotation { - /** Represents a BytesValue. */ - class BytesValue implements IBytesValue { + /** Annotation path */ + path?: (number[]|null); - /** - * Constructs a new BytesValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IBytesValue); + /** Annotation sourceFile */ + sourceFile?: (string|null); - /** BytesValue value. */ - public value: Uint8Array; + /** Annotation begin */ + begin?: (number|null); - /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BytesValue - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.BytesValue; + /** Annotation end */ + end?: (number|null); - /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. - * @param message BytesValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.BytesValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } - /** - * Converts this BytesValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Represents an Annotation. */ + class Annotation implements IAnnotation { - /** Properties of an Any. */ - interface IAny { + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - /** Any type_url */ - type_url?: (string|null); + /** Annotation path. */ + public path: number[]; - /** Any value */ - value?: (Uint8Array|null); - } + /** Annotation sourceFile. */ + public sourceFile: string; - /** Represents an Any. */ - class Any implements IAny { + /** Annotation begin. */ + public begin: number; - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); + /** Annotation end. */ + public end: number; - /** Any type_url. */ - public type_url: string; + /** Annotation semantic. */ + public semantic: google.protobuf.GeneratedCodeInfo.Annotation.Semantic; - /** Any value. */ - public value: Uint8Array; + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + type Semantic = + "NONE"| "SET"| "ALIAS"; + } } /** Properties of a FieldMask. */ @@ -2327,6 +2810,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Duration. */ @@ -2374,6 +2864,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2422,6 +2919,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Precondition. */ @@ -2472,6 +2976,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Precondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a TransactionOptions. */ @@ -2522,6 +3033,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransactionOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace TransactionOptions { @@ -2565,6 +3083,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadWrite + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ReadOnly. */ @@ -2609,6 +3134,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReadOnly + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -2669,6 +3201,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Document + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Value. */ @@ -2773,6 +3312,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an ArrayValue. */ @@ -2814,6 +3360,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ArrayValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a MapValue. */ @@ -2855,6 +3408,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MapValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Represents a Firestore */ @@ -3247,6 +3807,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDocumentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListDocumentsRequest. */ @@ -3339,6 +3906,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDocumentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListDocumentsResponse. */ @@ -3385,7 +3959,14 @@ export namespace google { * Converts this ListDocumentsResponse to JSON. * @returns JSON object */ - public toJSON(): { [k: string]: any }; + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDocumentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CreateDocumentRequest. */ @@ -3451,6 +4032,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDocumentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an UpdateDocumentRequest. */ @@ -3510,6 +4098,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDocumentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteDocumentRequest. */ @@ -3557,6 +4152,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDocumentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BatchGetDocumentsRequest. */ @@ -3631,6 +4233,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchGetDocumentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BatchGetDocumentsResponse. */ @@ -3693,6 +4302,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchGetDocumentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BeginTransactionRequest. */ @@ -3740,6 +4356,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BeginTransactionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BeginTransactionResponse. */ @@ -3781,6 +4404,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BeginTransactionResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CommitRequest. */ @@ -3834,6 +4464,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommitRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CommitResponse. */ @@ -3881,6 +4518,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommitResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RollbackRequest. */ @@ -3928,6 +4572,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RollbackRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RunQueryRequest. */ @@ -3999,6 +4650,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunQueryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a RunQueryResponse. */ @@ -4058,6 +4716,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RunQueryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PartitionQueryRequest. */ @@ -4126,6 +4791,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartitionQueryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a PartitionQueryResponse. */ @@ -4173,6 +4845,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartitionQueryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WriteRequest. */ @@ -4238,6 +4917,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WriteResponse. */ @@ -4297,6 +4983,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListenRequest. */ @@ -4359,6 +5052,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListenRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListenResponse. */ @@ -4427,6 +5127,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListenResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Target. */ @@ -4504,6 +5211,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Target + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace Target { @@ -4547,6 +5261,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentsTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a QueryTarget. */ @@ -4597,6 +5318,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QueryTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -4663,6 +5391,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TargetChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace TargetChange { @@ -4723,6 +5458,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCollectionIdsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListCollectionIdsResponse. */ @@ -4770,6 +5512,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListCollectionIdsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BatchWriteRequest. */ @@ -4823,6 +5572,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchWriteRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a BatchWriteResponse. */ @@ -4870,6 +5626,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchWriteResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a StructuredQuery. */ @@ -4953,6 +5716,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StructuredQuery + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace StructuredQuery { @@ -5002,6 +5772,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CollectionSelector + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Filter. */ @@ -5058,6 +5835,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Filter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CompositeFilter. */ @@ -5105,6 +5889,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompositeFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace CompositeFilter { @@ -5165,6 +5956,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldFilter { @@ -5222,6 +6020,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UnaryFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace UnaryFilter { @@ -5270,6 +6075,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an Order. */ @@ -5317,6 +6129,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Order + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Projection. */ @@ -5358,6 +6177,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Projection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Direction enum. */ @@ -5410,6 +6236,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Cursor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a Write. */ @@ -5484,6 +6317,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Write + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DocumentTransform. */ @@ -5531,6 +6371,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentTransform + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace DocumentTransform { @@ -5613,6 +6460,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldTransform + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace FieldTransform { @@ -5668,6 +6522,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WriteResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DocumentChange. */ @@ -5721,6 +6582,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DocumentDelete. */ @@ -5774,6 +6642,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentDelete + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DocumentRemove. */ @@ -5814,78 +6689,221 @@ export namespace google { */ public static fromObject(object: { [k: string]: any }): google.firestore.v1beta1.DocumentRemove; - /** - * Creates a plain object from a DocumentRemove message. Also converts values to other types if specified. - * @param message DocumentRemove - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.v1beta1.DocumentRemove, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a DocumentRemove message. Also converts values to other types if specified. + * @param message DocumentRemove + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.v1beta1.DocumentRemove, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DocumentRemove to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentRemove + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExistenceFilter. */ + interface IExistenceFilter { + + /** ExistenceFilter targetId */ + targetId?: (number|null); + + /** ExistenceFilter count */ + count?: (number|null); + } + + /** Represents an ExistenceFilter. */ + class ExistenceFilter implements IExistenceFilter { + + /** + * Constructs a new ExistenceFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.firestore.v1beta1.IExistenceFilter); + + /** ExistenceFilter targetId. */ + public targetId: number; + + /** ExistenceFilter count. */ + public count: number; + + /** + * Creates an ExistenceFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExistenceFilter + */ + public static fromObject(object: { [k: string]: any }): google.firestore.v1beta1.ExistenceFilter; + + /** + * Creates a plain object from an ExistenceFilter message. Also converts values to other types if specified. + * @param message ExistenceFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.firestore.v1beta1.ExistenceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExistenceFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExistenceFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of a LatLng. */ + interface ILatLng { + + /** LatLng latitude */ + latitude?: (number|null); + + /** LatLng longitude */ + longitude?: (number|null); + } + + /** Represents a LatLng. */ + class LatLng implements ILatLng { + + /** + * Constructs a new LatLng. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.ILatLng); + + /** LatLng latitude. */ + public latitude: number; + + /** LatLng longitude. */ + public longitude: number; + + /** + * Creates a LatLng message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LatLng + */ + public static fromObject(object: { [k: string]: any }): google.type.LatLng; + + /** + * Creates a plain object from a LatLng message. Also converts values to other types if specified. + * @param message LatLng + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.LatLng, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LatLng to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LatLng + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); - /** - * Converts this DocumentRemove to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** Status message */ + message?: (string|null); - /** Properties of an ExistenceFilter. */ - interface IExistenceFilter { + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } - /** ExistenceFilter targetId */ - targetId?: (number|null); + /** Represents a Status. */ + class Status implements IStatus { - /** ExistenceFilter count */ - count?: (number|null); - } + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); - /** Represents an ExistenceFilter. */ - class ExistenceFilter implements IExistenceFilter { + /** Status code. */ + public code: number; - /** - * Constructs a new ExistenceFilter. - * @param [properties] Properties to set - */ - constructor(properties?: google.firestore.v1beta1.IExistenceFilter); + /** Status message. */ + public message: string; - /** ExistenceFilter targetId. */ - public targetId: number; + /** Status details. */ + public details: google.protobuf.IAny[]; - /** ExistenceFilter count. */ - public count: number; + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; - /** - * Creates an ExistenceFilter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExistenceFilter - */ - public static fromObject(object: { [k: string]: any }): google.firestore.v1beta1.ExistenceFilter; + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Creates a plain object from an ExistenceFilter message. Also converts values to other types if specified. - * @param message ExistenceFilter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.firestore.v1beta1.ExistenceFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Converts this ExistenceFilter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } /** Namespace api. */ namespace api { + /** FieldBehavior enum. */ + type FieldBehavior = + "FIELD_BEHAVIOR_UNSPECIFIED"| "OPTIONAL"| "REQUIRED"| "OUTPUT_ONLY"| "INPUT_ONLY"| "IMMUTABLE"| "UNORDERED_LIST"| "NON_EMPTY_DEFAULT"; + /** Properties of a Http. */ interface IHttp { /** Http rules */ rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); } /** Represents a Http. */ @@ -5900,6 +6918,9 @@ export namespace google { /** Http rules. */ public rules: google.api.IHttpRule[]; + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + /** * Creates a Http message from a plain object. Also converts values to their respective internal types. * @param object Plain object @@ -5920,11 +6941,21 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a HttpRule. */ interface IHttpRule { + /** HttpRule selector */ + selector?: (string|null); + /** HttpRule get */ get?: (string|null); @@ -5943,12 +6974,12 @@ export namespace google { /** HttpRule custom */ custom?: (google.api.ICustomHttpPattern|null); - /** HttpRule selector */ - selector?: (string|null); - /** HttpRule body */ body?: (string|null); + /** HttpRule responseBody */ + responseBody?: (string|null); + /** HttpRule additionalBindings */ additionalBindings?: (google.api.IHttpRule[]|null); } @@ -5962,6 +6993,9 @@ export namespace google { */ constructor(properties?: google.api.IHttpRule); + /** HttpRule selector. */ + public selector: string; + /** HttpRule get. */ public get?: (string|null); @@ -5980,12 +7014,12 @@ export namespace google { /** HttpRule custom. */ public custom?: (google.api.ICustomHttpPattern|null); - /** HttpRule selector. */ - public selector: string; - /** HttpRule body. */ public body: string; + /** HttpRule responseBody. */ + public responseBody: string; + /** HttpRule additionalBindings. */ public additionalBindings: google.api.IHttpRule[]; @@ -6012,6 +7046,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CustomHttpPattern. */ @@ -6059,11 +7100,14 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - /** FieldBehavior enum. */ - type FieldBehavior = - "FIELD_BEHAVIOR_UNSPECIFIED"| "OPTIONAL"| "REQUIRED"| "OUTPUT_ONLY"| "INPUT_ONLY"| "IMMUTABLE"| "UNORDERED_LIST"| "NON_EMPTY_DEFAULT"; + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } /** Properties of a ResourceDescriptor. */ interface IResourceDescriptor { @@ -6140,6 +7184,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } namespace ResourceDescriptor { @@ -6198,114 +7249,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; - } - } - - /** Namespace type. */ - namespace type { - - /** Properties of a LatLng. */ - interface ILatLng { - - /** LatLng latitude */ - latitude?: (number|null); - - /** LatLng longitude */ - longitude?: (number|null); - } - - /** Represents a LatLng. */ - class LatLng implements ILatLng { - - /** - * Constructs a new LatLng. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.ILatLng); - - /** LatLng latitude. */ - public latitude: number; - - /** LatLng longitude. */ - public longitude: number; - - /** - * Creates a LatLng message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LatLng - */ - public static fromObject(object: { [k: string]: any }): google.type.LatLng; - - /** - * Creates a plain object from a LatLng message. Also converts values to other types if specified. - * @param message LatLng - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.LatLng, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LatLng to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of a Status. */ - interface IStatus { - - /** Status code */ - code?: (number|null); - - /** Status message */ - message?: (string|null); - - /** Status details */ - details?: (google.protobuf.IAny[]|null); - } - - /** Represents a Status. */ - class Status implements IStatus { - - /** - * Constructs a new Status. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IStatus); - - /** Status code. */ - public code: number; - - /** Status message. */ - public message: string; - - /** Status details. */ - public details: google.protobuf.IAny[]; - - /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Status - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Status; - - /** - * Creates a plain object from a Status message. Also converts values to other types if specified. - * @param message Status - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Status to JSON. - * @returns JSON object + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public toJSON(): { [k: string]: any }; + public static getTypeUrl(typeUrlPrefix?: string): string; } } @@ -6498,6 +7448,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Operation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a GetOperationRequest. */ @@ -6539,6 +7496,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsRequest. */ @@ -6598,6 +7562,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a ListOperationsResponse. */ @@ -6645,6 +7616,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOperationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a CancelOperationRequest. */ @@ -6686,6 +7664,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a DeleteOperationRequest. */ @@ -6727,6 +7712,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of a WaitOperationRequest. */ @@ -6774,6 +7766,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WaitOperationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } /** Properties of an OperationInfo. */ @@ -6821,6 +7820,13 @@ export namespace google { * @returns JSON object */ public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OperationInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; } } } diff --git a/dev/protos/firestore_v1beta1_proto_api.js b/dev/protos/firestore_v1beta1_proto_api.js index dbd4a6a3b..8c03a8d82 100644 --- a/dev/protos/firestore_v1beta1_proto_api.js +++ b/dev/protos/firestore_v1beta1_proto_api.js @@ -159,28 +159,43 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + return Timestamp; })(); - protobuf.FileDescriptorSet = (function() { + protobuf.Struct = (function() { /** - * Properties of a FileDescriptorSet. + * Properties of a Struct. * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file + * @interface IStruct + * @property {Object.|null} [fields] Struct fields */ /** - * Constructs a new FileDescriptorSet. + * Constructs a new Struct. * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet + * @classdesc Represents a Struct. + * @implements IStruct * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @param {google.protobuf.IStruct=} [properties] Properties to set */ - function FileDescriptorSet(properties) { - this.file = []; + function Struct(properties) { + this.fields = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -188,111 +203,114 @@ } /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet + * Struct fields. + * @member {Object.} fields + * @memberof google.protobuf.Struct * @instance */ - FileDescriptorSet.prototype.file = $util.emptyArray; + Struct.prototype.fields = $util.emptyObject; /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * Creates a Struct message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.Struct * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @returns {google.protobuf.Struct} Struct */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) + Struct.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Struct) return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + var message = new $root.google.protobuf.Struct(); + if (object.fields) { + if (typeof object.fields !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields = {}; + for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { + if (typeof object.fields[keys[i]] !== "object") + throw TypeError(".google.protobuf.Struct.fields: object expected"); + message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); } } return message; }; /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * Creates a plain object from a Struct message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.Struct * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {google.protobuf.Struct} message Struct * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorSet.toObject = function toObject(message, options) { + Struct.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + if (options.objects || options.defaults) + object.fields = {}; + var keys2; + if (message.fields && (keys2 = Object.keys(message.fields)).length) { + object.fields = {}; + for (var j = 0; j < keys2.length; ++j) + object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); } return object; }; /** - * Converts this FileDescriptorSet to JSON. + * Converts this Struct to JSON. * @function toJSON - * @memberof google.protobuf.FileDescriptorSet + * @memberof google.protobuf.Struct * @instance * @returns {Object.} JSON object */ - FileDescriptorSet.prototype.toJSON = function toJSON() { + Struct.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FileDescriptorSet; + /** + * Gets the default type url for Struct + * @function getTypeUrl + * @memberof google.protobuf.Struct + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Struct"; + }; + + return Struct; })(); - protobuf.FileDescriptorProto = (function() { + protobuf.Value = (function() { /** - * Properties of a FileDescriptorProto. + * Properties of a Value. * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax + * @interface IValue + * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue + * @property {number|null} [numberValue] Value numberValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [boolValue] Value boolValue + * @property {google.protobuf.IStruct|null} [structValue] Value structValue + * @property {google.protobuf.IListValue|null} [listValue] Value listValue */ /** - * Constructs a new FileDescriptorProto. + * Constructs a new Value. * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto + * @classdesc Represents a Value. + * @implements IValue * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IValue=} [properties] Properties to set */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; + function Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -300,319 +318,216 @@ } /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto + * Value nullValue. + * @member {google.protobuf.NullValue|null|undefined} nullValue + * @memberof google.protobuf.Value * @instance */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + Value.prototype.nullValue = null; /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto + * Value numberValue. + * @member {number|null|undefined} numberValue + * @memberof google.protobuf.Value * @instance */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; + Value.prototype.numberValue = null; /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.protobuf.Value * @instance */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; + Value.prototype.stringValue = null; /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto + * Value boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.protobuf.Value * @instance */ - FileDescriptorProto.prototype.service = $util.emptyArray; + Value.prototype.boolValue = null; /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto + * Value structValue. + * @member {google.protobuf.IStruct|null|undefined} structValue + * @memberof google.protobuf.Value * @instance */ - FileDescriptorProto.prototype.extension = $util.emptyArray; + Value.prototype.structValue = null; /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto + * Value listValue. + * @member {google.protobuf.IListValue|null|undefined} listValue + * @memberof google.protobuf.Value * @instance */ - FileDescriptorProto.prototype.options = null; + Value.prototype.listValue = null; - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto + * Value kind. + * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind + * @memberof google.protobuf.Value * @instance */ - FileDescriptorProto.prototype.syntax = ""; + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @returns {google.protobuf.Value} Value */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Value) return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + var message = new $root.google.protobuf.Value(); + switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; } + break; + case "NULL_VALUE": + case 0: + message.nullValue = 0; + break; } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + if (object.numberValue != null) + message.numberValue = Number(object.numberValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.boolValue != null) + message.boolValue = Boolean(object.boolValue); + if (object.structValue != null) { + if (typeof object.structValue !== "object") + throw TypeError(".google.protobuf.Value.structValue: object expected"); + message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + if (object.listValue != null) { + if (typeof object.listValue !== "object") + throw TypeError(".google.protobuf.Value.listValue: object expected"); + message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); } - if (object.syntax != null) - message.syntax = String(object.syntax); return message; }; /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.Value * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {google.protobuf.Value} message Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileDescriptorProto.toObject = function toObject(message, options) { + Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + if (message.nullValue != null && message.hasOwnProperty("nullValue")) { + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + if (options.oneofs) + object.kind = "nullValue"; } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + if (message.numberValue != null && message.hasOwnProperty("numberValue")) { + object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; + if (options.oneofs) + object.kind = "numberValue"; } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + if (message.boolValue != null && message.hasOwnProperty("boolValue")) { + object.boolValue = message.boolValue; + if (options.oneofs) + object.kind = "boolValue"; } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; + if (message.structValue != null && message.hasOwnProperty("structValue")) { + object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); + if (options.oneofs) + object.kind = "structValue"; } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; + if (message.listValue != null && message.hasOwnProperty("listValue")) { + object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); + if (options.oneofs) + object.kind = "listValue"; } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; return object; }; /** - * Converts this FileDescriptorProto to JSON. + * Converts this Value to JSON. * @function toJSON - * @memberof google.protobuf.FileDescriptorProto + * @memberof google.protobuf.Value * @instance * @returns {Object.} JSON object */ - FileDescriptorProto.prototype.toJSON = function toJSON() { + Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FileDescriptorProto; + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.protobuf.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Value"; + }; + + return Value; })(); - protobuf.DescriptorProto = (function() { + /** + * NullValue enum. + * @name google.protobuf.NullValue + * @enum {string} + * @property {string} NULL_VALUE=NULL_VALUE NULL_VALUE value + */ + protobuf.NullValue = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_VALUE"] = "NULL_VALUE"; + return values; + })(); + + protobuf.ListValue = (function() { /** - * Properties of a DescriptorProto. + * Properties of a ListValue. * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @interface IListValue + * @property {Array.|null} [values] ListValue values */ /** - * Constructs a new DescriptorProto. + * Constructs a new ListValue. * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto + * @classdesc Represents a ListValue. + * @implements IListValue * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IListValue=} [properties] Properties to set */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; + function ListValue(properties) { + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -620,495 +535,383 @@ } /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto + * ListValue values. + * @member {Array.} values + * @memberof google.protobuf.ListValue * @instance */ - DescriptorProto.prototype.field = $util.emptyArray; + ListValue.prototype.values = $util.emptyArray; /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance + * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ListValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ListValue} ListValue */ - DescriptorProto.prototype.extension = $util.emptyArray; + ListValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ListValue) + return object; + var message = new $root.google.protobuf.ListValue(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.protobuf.ListValue.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.protobuf.ListValue.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } + return message; + }; /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance + * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ListValue + * @static + * @param {google.protobuf.ListValue} message ListValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - DescriptorProto.prototype.nestedType = $util.emptyArray; + ListValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + } + return object; + }; /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto + * Converts this ListValue to JSON. + * @function toJSON + * @memberof google.protobuf.ListValue * @instance + * @returns {Object.} JSON object */ - DescriptorProto.prototype.enumType = $util.emptyArray; + ListValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance + * Gets the default type url for ListValue + * @function getTypeUrl + * @memberof google.protobuf.ListValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; + ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ListValue"; + }; - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; + return ListValue; + })(); - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; + protobuf.Empty = (function() { /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set */ - DescriptorProto.prototype.reservedName = $util.emptyArray; + function Empty(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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an Empty message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.Empty * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @returns {google.protobuf.Empty} Empty */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - return message; + return new $root.google.protobuf.Empty(); }; /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an Empty message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.Empty * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {google.protobuf.Empty} message Empty * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.DoubleValue = (function() { + + /** + * Properties of a DoubleValue. + * @memberof google.protobuf + * @interface IDoubleValue + * @property {number|null} [value] DoubleValue value + */ + + /** + * Constructs a new DoubleValue. + * @memberof google.protobuf + * @classdesc Represents a DoubleValue. + * @implements IDoubleValue + * @constructor + * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + */ + function DoubleValue(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]]; + } + + /** + * DoubleValue value. + * @member {number} value + * @memberof google.protobuf.DoubleValue + * @instance + */ + DoubleValue.prototype.value = 0; + + /** + * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DoubleValue} DoubleValue + */ + DoubleValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DoubleValue) + return object; + var message = new $root.google.protobuf.DoubleValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; + + /** + * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DoubleValue + * @static + * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DoubleValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; return object; }; /** - * Converts this DescriptorProto to JSON. + * Converts this DoubleValue to JSON. * @function toJSON - * @memberof google.protobuf.DescriptorProto + * @memberof google.protobuf.DoubleValue * @instance * @returns {Object.} JSON object */ - DescriptorProto.prototype.toJSON = function toJSON() { + DoubleValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - DescriptorProto.ExtensionRange = (function() { + /** + * Gets the default type url for DoubleValue + * @function getTypeUrl + * @memberof google.protobuf.DoubleValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DoubleValue"; + }; - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - */ + return DoubleValue; + })(); - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(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]]; - } + protobuf.FloatValue = (function() { - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; + /** + * Properties of a FloatValue. + * @memberof google.protobuf + * @interface IFloatValue + * @property {number|null} [value] FloatValue value + */ - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; + /** + * Constructs a new FloatValue. + * @memberof google.protobuf + * @classdesc Represents a FloatValue. + * @implements IFloatValue + * @constructor + * @param {google.protobuf.IFloatValue=} [properties] Properties to set + */ + function FloatValue(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 an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; + /** + * FloatValue value. + * @member {number} value + * @memberof google.protobuf.FloatValue + * @instance + */ + FloatValue.prototype.value = 0; - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; + /** + * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FloatValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FloatValue} FloatValue + */ + FloatValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FloatValue) return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + var message = new $root.google.protobuf.FloatValue(); + if (object.value != null) + message.value = Number(object.value); + return message; + }; - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { + /** + * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FloatValue + * @static + * @param {google.protobuf.FloatValue} message FloatValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FloatValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + return object; + }; - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ + /** + * Converts this FloatValue to JSON. + * @function toJSON + * @memberof google.protobuf.FloatValue + * @instance + * @returns {Object.} JSON object + */ + FloatValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(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]]; + /** + * Gets the default type url for FloatValue + * @function getTypeUrl + * @memberof google.protobuf.FloatValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.FloatValue"; + }; - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return ReservedRange; - })(); - - return DescriptorProto; + return FloatValue; })(); - protobuf.FieldDescriptorProto = (function() { + protobuf.Int64Value = (function() { /** - * Properties of a FieldDescriptorProto. + * Properties of an Int64Value. * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @interface IInt64Value + * @property {number|string|null} [value] Int64Value value */ /** - * Constructs a new FieldDescriptorProto. + * Constructs a new Int64Value. * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto + * @classdesc Represents an Int64Value. + * @implements IInt64Value * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IInt64Value=} [properties] Properties to set */ - function FieldDescriptorProto(properties) { + function Int64Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1116,350 +919,223 @@ } /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto + * Int64Value value. + * @member {number|string} value + * @memberof google.protobuf.Int64Value * @instance */ - FieldDescriptorProto.prototype.name = ""; + Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Int64Value + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Int64Value} Int64Value */ - FieldDescriptorProto.prototype.number = 0; + Int64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int64Value) + return object; + var message = new $root.google.protobuf.Int64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = false; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + return message; + }; /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Int64Value + * @static + * @param {google.protobuf.Int64Value} message Int64Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - FieldDescriptorProto.prototype.label = 1; + Int64Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + return object; + }; /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto + * Converts this Int64Value to JSON. + * @function toJSON + * @memberof google.protobuf.Int64Value * @instance + * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.type = 1; + Int64Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Gets the default type url for Int64Value + * @function getTypeUrl + * @memberof google.protobuf.Int64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - FieldDescriptorProto.prototype.typeName = ""; + Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int64Value"; + }; + + return Int64Value; + })(); + + protobuf.UInt64Value = (function() { /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Properties of a UInt64Value. + * @memberof google.protobuf + * @interface IUInt64Value + * @property {number|string|null} [value] UInt64Value value */ - FieldDescriptorProto.prototype.extendee = ""; /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance + * Constructs a new UInt64Value. + * @memberof google.protobuf + * @classdesc Represents a UInt64Value. + * @implements IUInt64Value + * @constructor + * @param {google.protobuf.IUInt64Value=} [properties] Properties to set */ - FieldDescriptorProto.prototype.jsonName = ""; + function UInt64Value(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]]; + } /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto + * UInt64Value value. + * @member {number|string} value + * @memberof google.protobuf.UInt64Value * @instance */ - FieldDescriptorProto.prototype.options = null; + UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.UInt64Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @returns {google.protobuf.UInt64Value} UInt64Value */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) + UInt64Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt64Value) return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - } - switch (object.type) { - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } + var message = new $root.google.protobuf.UInt64Value(); + if (object.value != null) + if ($util.Long) + (message.value = $util.Long.fromValue(object.value)).unsigned = true; + else if (typeof object.value === "string") + message.value = parseInt(object.value, 10); + else if (typeof object.value === "number") + message.value = object.value; + else if (typeof object.value === "object") + message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); return message; }; /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.UInt64Value * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {google.protobuf.UInt64Value} message UInt64Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FieldDescriptorProto.toObject = function toObject(message, options) { + UInt64Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.value = options.longs === String ? "0" : 0; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value === "number") + object.value = options.longs === String ? String(message.value) : message.value; + else + object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; return object; }; /** - * Converts this FieldDescriptorProto to JSON. + * Converts this UInt64Value to JSON. * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto + * @memberof google.protobuf.UInt64Value * @instance * @returns {Object.} JSON object */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { + UInt64Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {string} - * @property {string} TYPE_DOUBLE=TYPE_DOUBLE TYPE_DOUBLE value - * @property {string} TYPE_FLOAT=TYPE_FLOAT TYPE_FLOAT value - * @property {string} TYPE_INT64=TYPE_INT64 TYPE_INT64 value - * @property {string} TYPE_UINT64=TYPE_UINT64 TYPE_UINT64 value - * @property {string} TYPE_INT32=TYPE_INT32 TYPE_INT32 value - * @property {string} TYPE_FIXED64=TYPE_FIXED64 TYPE_FIXED64 value - * @property {string} TYPE_FIXED32=TYPE_FIXED32 TYPE_FIXED32 value - * @property {string} TYPE_BOOL=TYPE_BOOL TYPE_BOOL value - * @property {string} TYPE_STRING=TYPE_STRING TYPE_STRING value - * @property {string} TYPE_GROUP=TYPE_GROUP TYPE_GROUP value - * @property {string} TYPE_MESSAGE=TYPE_MESSAGE TYPE_MESSAGE value - * @property {string} TYPE_BYTES=TYPE_BYTES TYPE_BYTES value - * @property {string} TYPE_UINT32=TYPE_UINT32 TYPE_UINT32 value - * @property {string} TYPE_ENUM=TYPE_ENUM TYPE_ENUM value - * @property {string} TYPE_SFIXED32=TYPE_SFIXED32 TYPE_SFIXED32 value - * @property {string} TYPE_SFIXED64=TYPE_SFIXED64 TYPE_SFIXED64 value - * @property {string} TYPE_SINT32=TYPE_SINT32 TYPE_SINT32 value - * @property {string} TYPE_SINT64=TYPE_SINT64 TYPE_SINT64 value + * Gets the default type url for UInt64Value + * @function getTypeUrl + * @memberof google.protobuf.UInt64Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = "TYPE_DOUBLE"; - values[valuesById[2] = "TYPE_FLOAT"] = "TYPE_FLOAT"; - values[valuesById[3] = "TYPE_INT64"] = "TYPE_INT64"; - values[valuesById[4] = "TYPE_UINT64"] = "TYPE_UINT64"; - values[valuesById[5] = "TYPE_INT32"] = "TYPE_INT32"; - values[valuesById[6] = "TYPE_FIXED64"] = "TYPE_FIXED64"; - values[valuesById[7] = "TYPE_FIXED32"] = "TYPE_FIXED32"; - values[valuesById[8] = "TYPE_BOOL"] = "TYPE_BOOL"; - values[valuesById[9] = "TYPE_STRING"] = "TYPE_STRING"; - values[valuesById[10] = "TYPE_GROUP"] = "TYPE_GROUP"; - values[valuesById[11] = "TYPE_MESSAGE"] = "TYPE_MESSAGE"; - values[valuesById[12] = "TYPE_BYTES"] = "TYPE_BYTES"; - values[valuesById[13] = "TYPE_UINT32"] = "TYPE_UINT32"; - values[valuesById[14] = "TYPE_ENUM"] = "TYPE_ENUM"; - values[valuesById[15] = "TYPE_SFIXED32"] = "TYPE_SFIXED32"; - values[valuesById[16] = "TYPE_SFIXED64"] = "TYPE_SFIXED64"; - values[valuesById[17] = "TYPE_SINT32"] = "TYPE_SINT32"; - values[valuesById[18] = "TYPE_SINT64"] = "TYPE_SINT64"; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {string} - * @property {string} LABEL_OPTIONAL=LABEL_OPTIONAL LABEL_OPTIONAL value - * @property {string} LABEL_REQUIRED=LABEL_REQUIRED LABEL_REQUIRED value - * @property {string} LABEL_REPEATED=LABEL_REPEATED LABEL_REPEATED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = "LABEL_OPTIONAL"; - values[valuesById[2] = "LABEL_REQUIRED"] = "LABEL_REQUIRED"; - values[valuesById[3] = "LABEL_REPEATED"] = "LABEL_REPEATED"; - return values; - })(); + UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt64Value"; + }; - return FieldDescriptorProto; + return UInt64Value; })(); - protobuf.OneofDescriptorProto = (function() { + protobuf.Int32Value = (function() { /** - * Properties of an OneofDescriptorProto. + * Properties of an Int32Value. * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + * @interface IInt32Value + * @property {number|null} [value] Int32Value value */ /** - * Constructs a new OneofDescriptorProto. + * Constructs a new Int32Value. * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto + * @classdesc Represents an Int32Value. + * @implements IInt32Value * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IInt32Value=} [properties] Properties to set */ - function OneofDescriptorProto(properties) { + function Int32Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1467,102 +1143,97 @@ } /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto + * Int32Value value. + * @member {number} value + * @memberof google.protobuf.Int32Value * @instance */ - OneofDescriptorProto.prototype.options = null; + Int32Value.prototype.value = 0; /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.Int32Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @returns {google.protobuf.Int32Value} Int32Value */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) + Int32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Int32Value) return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } + var message = new $root.google.protobuf.Int32Value(); + if (object.value != null) + message.value = object.value | 0; return message; }; /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an Int32Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.Int32Value * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {google.protobuf.Int32Value} message Int32Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OneofDescriptorProto.toObject = function toObject(message, options) { + Int32Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this OneofDescriptorProto to JSON. + * Converts this Int32Value to JSON. * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto + * @memberof google.protobuf.Int32Value * @instance * @returns {Object.} JSON object */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { + Int32Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return OneofDescriptorProto; + /** + * Gets the default type url for Int32Value + * @function getTypeUrl + * @memberof google.protobuf.Int32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Int32Value"; + }; + + return Int32Value; })(); - protobuf.EnumDescriptorProto = (function() { + protobuf.UInt32Value = (function() { /** - * Properties of an EnumDescriptorProto. + * Properties of a UInt32Value. * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @interface IUInt32Value + * @property {number|null} [value] UInt32Value value */ /** - * Constructs a new EnumDescriptorProto. + * Constructs a new UInt32Value. * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto + * @classdesc Represents a UInt32Value. + * @implements IUInt32Value * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IUInt32Value=} [properties] Properties to set */ - function EnumDescriptorProto(properties) { - this.value = []; + function UInt32Value(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1570,126 +1241,97 @@ } /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto + * UInt32Value value. + * @member {number} value + * @memberof google.protobuf.UInt32Value * @instance */ - EnumDescriptorProto.prototype.options = null; + UInt32Value.prototype.value = 0; /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UInt32Value * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @returns {google.protobuf.UInt32Value} UInt32Value */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) + UInt32Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UInt32Value) return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } + var message = new $root.google.protobuf.UInt32Value(); + if (object.value != null) + message.value = object.value >>> 0; return message; }; /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UInt32Value * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {google.protobuf.UInt32Value} message UInt32Value * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumDescriptorProto.toObject = function toObject(message, options) { + UInt32Value.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.value = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (options.defaults) + object.value = 0; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this EnumDescriptorProto to JSON. + * Converts this UInt32Value to JSON. * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto + * @memberof google.protobuf.UInt32Value * @instance * @returns {Object.} JSON object */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { + UInt32Value.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EnumDescriptorProto; + /** + * Gets the default type url for UInt32Value + * @function getTypeUrl + * @memberof google.protobuf.UInt32Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UInt32Value"; + }; + + return UInt32Value; })(); - protobuf.EnumValueDescriptorProto = (function() { + protobuf.BoolValue = (function() { /** - * Properties of an EnumValueDescriptorProto. + * Properties of a BoolValue. * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + * @interface IBoolValue + * @property {boolean|null} [value] BoolValue value */ /** - * Constructs a new EnumValueDescriptorProto. + * Constructs a new BoolValue. * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto + * @classdesc Represents a BoolValue. + * @implements IBoolValue * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IBoolValue=} [properties] Properties to set */ - function EnumValueDescriptorProto(properties) { + function BoolValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1697,115 +1339,97 @@ } /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto + * BoolValue value. + * @member {boolean} value + * @memberof google.protobuf.BoolValue * @instance */ - EnumValueDescriptorProto.prototype.options = null; + BoolValue.prototype.value = false; /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.BoolValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @returns {google.protobuf.BoolValue} BoolValue */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + BoolValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BoolValue) return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } + var message = new $root.google.protobuf.BoolValue(); + if (object.value != null) + message.value = Boolean(object.value); return message; }; /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a BoolValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.BoolValue * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {google.protobuf.BoolValue} message BoolValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { + BoolValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + if (options.defaults) + object.value = false; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this EnumValueDescriptorProto to JSON. + * Converts this BoolValue to JSON. * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto + * @memberof google.protobuf.BoolValue * @instance * @returns {Object.} JSON object */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + BoolValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return EnumValueDescriptorProto; + /** + * Gets the default type url for BoolValue + * @function getTypeUrl + * @memberof google.protobuf.BoolValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BoolValue"; + }; + + return BoolValue; })(); - protobuf.ServiceDescriptorProto = (function() { + protobuf.StringValue = (function() { /** - * Properties of a ServiceDescriptorProto. + * Properties of a StringValue. * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + * @interface IStringValue + * @property {string|null} [value] StringValue value */ /** - * Constructs a new ServiceDescriptorProto. + * Constructs a new StringValue. * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto + * @classdesc Represents a StringValue. + * @implements IStringValue * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IStringValue=} [properties] Properties to set */ - function ServiceDescriptorProto(properties) { - this.method = []; + function StringValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1813,129 +1437,97 @@ } /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto + * StringValue value. + * @member {string} value + * @memberof google.protobuf.StringValue * @instance */ - ServiceDescriptorProto.prototype.options = null; + StringValue.prototype.value = ""; /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates a StringValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.StringValue * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @returns {google.protobuf.StringValue} StringValue */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + StringValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.StringValue) return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } + var message = new $root.google.protobuf.StringValue(); + if (object.value != null) + message.value = String(object.value); return message; }; /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from a StringValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.StringValue * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {google.protobuf.StringValue} message StringValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceDescriptorProto.toObject = function toObject(message, options) { + StringValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + if (options.defaults) + object.value = ""; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; return object; }; /** - * Converts this ServiceDescriptorProto to JSON. + * Converts this StringValue to JSON. * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto + * @memberof google.protobuf.StringValue * @instance * @returns {Object.} JSON object */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { + StringValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ServiceDescriptorProto; + /** + * Gets the default type url for StringValue + * @function getTypeUrl + * @memberof google.protobuf.StringValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.StringValue"; + }; + + return StringValue; })(); - protobuf.MethodDescriptorProto = (function() { + protobuf.BytesValue = (function() { /** - * Properties of a MethodDescriptorProto. + * Properties of a BytesValue. * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + * @interface IBytesValue + * @property {Uint8Array|null} [value] BytesValue value */ /** - * Constructs a new MethodDescriptorProto. + * Constructs a new BytesValue. * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto + * @classdesc Represents a BytesValue. + * @implements IBytesValue * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @param {google.protobuf.IBytesValue=} [properties] Properties to set */ - function MethodDescriptorProto(properties) { + function BytesValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1943,168 +1535,229 @@ } /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto + * BytesValue value. + * @member {Uint8Array} value + * @memberof google.protobuf.BytesValue * @instance */ - MethodDescriptorProto.prototype.name = ""; + BytesValue.prototype.value = $util.newBuffer([]); /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance + * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.BytesValue + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.BytesValue} BytesValue */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance + BytesValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.BytesValue) + return object; + var message = new $root.google.protobuf.BytesValue(); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.BytesValue + * @static + * @param {google.protobuf.BytesValue} message BytesValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - MethodDescriptorProto.prototype.outputType = ""; + BytesValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto + * Converts this BytesValue to JSON. + * @function toJSON + * @memberof google.protobuf.BytesValue * @instance + * @returns {Object.} JSON object */ - MethodDescriptorProto.prototype.options = null; + BytesValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto + * Gets the default type url for BytesValue + * @function getTypeUrl + * @memberof google.protobuf.BytesValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.BytesValue"; + }; + + return BytesValue; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(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]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any * @instance */ - MethodDescriptorProto.prototype.clientStreaming = false; + Any.prototype.type_url = ""; /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any * @instance */ - MethodDescriptorProto.prototype.serverStreaming = false; + Any.prototype.value = $util.newBuffer([]); /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * Creates an Any message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.Any * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @returns {google.protobuf.Any} Any */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; return message; }; /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * Creates a plain object from an Any message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.Any * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {google.protobuf.Any} message Any * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodDescriptorProto.toObject = function toObject(message, options) { + Any.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this MethodDescriptorProto to JSON. + * Converts this Any to JSON. * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto + * @memberof google.protobuf.Any * @instance * @returns {Object.} JSON object */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { + Any.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MethodDescriptorProto; + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; })(); - protobuf.FileOptions = (function() { + protobuf.FileDescriptorSet = (function() { /** - * Properties of a FileOptions. + * Properties of a FileDescriptorSet. * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file */ /** - * Constructs a new FileOptions. + * Constructs a new FileDescriptorSet. * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; + function FileDescriptorSet(properties) { + this.file = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2112,336 +1765,475 @@ } /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet * @instance */ - FileOptions.prototype.javaPackage = ""; + FileDescriptorSet.prototype.file = $util.emptyArray; /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet */ - FileOptions.prototype.javaOuterClassname = ""; + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet * @instance + * @returns {Object.} JSON object */ - FileOptions.prototype.javaMultipleFiles = false; + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {string|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + 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]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto * @instance */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; + FileDescriptorProto.prototype.name = ""; /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto * @instance */ - FileOptions.prototype.javaStringCheckUtf8 = false; + FileDescriptorProto.prototype["package"] = ""; /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto * @instance */ - FileOptions.prototype.optimizeFor = 1; + FileDescriptorProto.prototype.dependency = $util.emptyArray; /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto * @instance */ - FileOptions.prototype.goPackage = ""; + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto * @instance */ - FileOptions.prototype.ccGenericServices = false; + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto * @instance */ - FileOptions.prototype.javaGenericServices = false; + FileDescriptorProto.prototype.messageType = $util.emptyArray; /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto * @instance */ - FileOptions.prototype.pyGenericServices = false; + FileDescriptorProto.prototype.enumType = $util.emptyArray; /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto * @instance */ - FileOptions.prototype.deprecated = false; + FileDescriptorProto.prototype.service = $util.emptyArray; /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto * @instance */ - FileOptions.prototype.ccEnableArenas = false; + FileDescriptorProto.prototype.extension = $util.emptyArray; /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto * @instance */ - FileOptions.prototype.objcClassPrefix = ""; + FileDescriptorProto.prototype.options = null; /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto * @instance */ - FileOptions.prototype.csharpNamespace = ""; + FileDescriptorProto.prototype.sourceCodeInfo = null; /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto * @instance */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; + FileDescriptorProto.prototype.syntax = ""; /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions + * FileDescriptorProto edition. + * @member {string} edition + * @memberof google.protobuf.FileDescriptorProto * @instance */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + FileDescriptorProto.prototype.edition = ""; /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.FileDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); } } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + if (object.edition != null) + message.edition = String(object.edition); return message; }; /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.FileDescriptorProto * @static - * @param {google.protobuf.FileOptions} message FileOptions + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FileOptions.toObject = function toObject(message, options) { + FileDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; } if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = false; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = ""; } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = message.edition; return object; }; /** - * Converts this FileOptions to JSON. + * Converts this FileDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.FileOptions + * @memberof google.protobuf.FileDescriptorProto * @instance * @returns {Object.} JSON object */ - FileOptions.prototype.toJSON = function toJSON() { + FileDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {string} - * @property {string} SPEED=SPEED SPEED value - * @property {string} CODE_SIZE=CODE_SIZE CODE_SIZE value - * @property {string} LITE_RUNTIME=LITE_RUNTIME LITE_RUNTIME value + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = "SPEED"; - values[valuesById[2] = "CODE_SIZE"] = "CODE_SIZE"; - values[valuesById[3] = "LITE_RUNTIME"] = "LITE_RUNTIME"; - return values; - })(); + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; - return FileOptions; + return FileDescriptorProto; })(); - protobuf.MessageOptions = (function() { + protobuf.DescriptorProto = (function() { /** - * Properties of a MessageOptions. + * Properties of a DescriptorProto. * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName */ /** - * Constructs a new MessageOptions. + * Constructs a new DescriptorProto. * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set */ - function MessageOptions(properties) { - this.uninterpretedOption = []; + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2449,950 +2241,668 @@ } /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto * @instance */ - MessageOptions.prototype.messageSetWireFormat = false; + DescriptorProto.prototype.name = ""; /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto * @instance */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; + DescriptorProto.prototype.field = $util.emptyArray; /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto * @instance */ - MessageOptions.prototype.deprecated = false; + DescriptorProto.prototype.extension = $util.emptyArray; /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto * @instance */ - MessageOptions.prototype.mapEntry = false; + DescriptorProto.prototype.nestedType = $util.emptyArray; /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto * @instance */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + DescriptorProto.prototype.enumType = $util.emptyArray; /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto * @instance */ - MessageOptions.prototype[".google.api.resource"] = null; + DescriptorProto.prototype.extensionRange = $util.emptyArray; /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.DescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions + * @returns {google.protobuf.DescriptorProto} DescriptorProto */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); } } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); } return message; }; /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MessageOptions + * @memberof google.protobuf.DescriptorProto * @static - * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {google.protobuf.DescriptorProto} message DescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MessageOptions.toObject = function toObject(message, options) { + DescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object[".google.api.resource"] = null; + object.name = ""; + object.options = null; } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - 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]]; - } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto * @instance + * @returns {Object.} JSON object */ - FieldOptions.prototype.ctype = 0; + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - FieldOptions.prototype.packed = false; + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; + DescriptorProto.ExtensionRange = (function() { - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(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]]; + } - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {string} - * @property {string} STRING=STRING STRING value - * @property {string} CORD=CORD CORD value - * @property {string} STRING_PIECE=STRING_PIECE STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = "STRING"; - values[valuesById[1] = "CORD"] = "CORD"; - values[valuesById[2] = "STRING_PIECE"] = "STRING_PIECE"; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {string} - * @property {string} JS_NORMAL=JS_NORMAL JS_NORMAL value - * @property {string} JS_STRING=JS_STRING JS_STRING value - * @property {string} JS_NUMBER=JS_NUMBER JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = "JS_NORMAL"; - values[valuesById[1] = "JS_STRING"] = "JS_STRING"; - values[valuesById[2] = "JS_NUMBER"] = "JS_NUMBER"; - return values; - })(); - - return FieldOptions; - })(); - - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ - - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } - - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return OneofOptions; - })(); - - protobuf.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ - - /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } - - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return EnumOptions; - })(); + }; - protobuf.EnumValueOptions = (function() { + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } + return ExtensionRange; + })(); - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; + DescriptorProto.ReservedRange = (function() { - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(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]]; } - return message; - }; - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.deprecated = false; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; - return EnumValueOptions; - })(); + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; - protobuf.ServiceOptions = (function() { + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - */ + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions - * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions * @instance */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.ExtensionRangeOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); + var message = new $root.google.protobuf.ExtensionRangeOptions(); if (object.uninterpretedOption) { if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); message.uninterpretedOption = []; for (var i = 0; i < object.uninterpretedOption.length; ++i) { if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); return message; }; /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.ExtensionRangeOptions * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ServiceOptions.toObject = function toObject(message, options) { + ExtensionRangeOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; if (message.uninterpretedOption && message.uninterpretedOption.length) { object.uninterpretedOption = []; for (var j = 0; j < message.uninterpretedOption.length; ++j) object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; return object; }; /** - * Converts this ServiceOptions to JSON. + * Converts this ExtensionRangeOptions to JSON. * @function toJSON - * @memberof google.protobuf.ServiceOptions + * @memberof google.protobuf.ExtensionRangeOptions * @instance * @returns {Object.} JSON object */ - ServiceOptions.prototype.toJSON = function toJSON() { + ExtensionRangeOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ServiceOptions; + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + return ExtensionRangeOptions; })(); - protobuf.MethodOptions = (function() { + protobuf.FieldDescriptorProto = (function() { /** - * Properties of a MethodOptions. + * Properties of a FieldDescriptorProto. * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional */ /** - * Constructs a new MethodOptions. + * Constructs a new FieldDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; + function FieldDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3400,479 +2910,512 @@ } /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - MethodOptions.prototype.deprecated = false; + FieldDescriptorProto.prototype.name = ""; /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + FieldDescriptorProto.prototype.number = 0; /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - MethodOptions.prototype[".google.api.http"] = null; + FieldDescriptorProto.prototype.label = 1; /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + FieldDescriptorProto.prototype.type = 1; /** - * MethodOptions .google.longrunning.operationInfo. - * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo - * @memberof google.protobuf.MethodOptions + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto * @instance */ - MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + FieldDescriptorProto.prototype.typeName = ""; /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FieldDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; } - if (object[".google.longrunning.operationInfo"] != null) { - if (typeof object[".google.longrunning.operationInfo"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); - message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); return message; }; /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FieldDescriptorProto * @static - * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodOptions.toObject = function toObject(message, options) { + FieldDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } if (options.defaults) { - object.deprecated = false; - object[".google.longrunning.operationInfo"] = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) - object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; return object; }; /** - * Converts this MethodOptions to JSON. + * Converts this FieldDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.MethodOptions + * @memberof google.protobuf.FieldDescriptorProto * @instance * @returns {Object.} JSON object */ - MethodOptions.prototype.toJSON = function toJSON() { + FieldDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|string|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|string|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {string} + * @property {string} TYPE_DOUBLE=TYPE_DOUBLE TYPE_DOUBLE value + * @property {string} TYPE_FLOAT=TYPE_FLOAT TYPE_FLOAT value + * @property {string} TYPE_INT64=TYPE_INT64 TYPE_INT64 value + * @property {string} TYPE_UINT64=TYPE_UINT64 TYPE_UINT64 value + * @property {string} TYPE_INT32=TYPE_INT32 TYPE_INT32 value + * @property {string} TYPE_FIXED64=TYPE_FIXED64 TYPE_FIXED64 value + * @property {string} TYPE_FIXED32=TYPE_FIXED32 TYPE_FIXED32 value + * @property {string} TYPE_BOOL=TYPE_BOOL TYPE_BOOL value + * @property {string} TYPE_STRING=TYPE_STRING TYPE_STRING value + * @property {string} TYPE_GROUP=TYPE_GROUP TYPE_GROUP value + * @property {string} TYPE_MESSAGE=TYPE_MESSAGE TYPE_MESSAGE value + * @property {string} TYPE_BYTES=TYPE_BYTES TYPE_BYTES value + * @property {string} TYPE_UINT32=TYPE_UINT32 TYPE_UINT32 value + * @property {string} TYPE_ENUM=TYPE_ENUM TYPE_ENUM value + * @property {string} TYPE_SFIXED32=TYPE_SFIXED32 TYPE_SFIXED32 value + * @property {string} TYPE_SFIXED64=TYPE_SFIXED64 TYPE_SFIXED64 value + * @property {string} TYPE_SINT32=TYPE_SINT32 TYPE_SINT32 value + * @property {string} TYPE_SINT64=TYPE_SINT64 TYPE_SINT64 value */ - function UninterpretedOption(properties) { - this.name = []; - 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]]; - } + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = "TYPE_DOUBLE"; + values[valuesById[2] = "TYPE_FLOAT"] = "TYPE_FLOAT"; + values[valuesById[3] = "TYPE_INT64"] = "TYPE_INT64"; + values[valuesById[4] = "TYPE_UINT64"] = "TYPE_UINT64"; + values[valuesById[5] = "TYPE_INT32"] = "TYPE_INT32"; + values[valuesById[6] = "TYPE_FIXED64"] = "TYPE_FIXED64"; + values[valuesById[7] = "TYPE_FIXED32"] = "TYPE_FIXED32"; + values[valuesById[8] = "TYPE_BOOL"] = "TYPE_BOOL"; + values[valuesById[9] = "TYPE_STRING"] = "TYPE_STRING"; + values[valuesById[10] = "TYPE_GROUP"] = "TYPE_GROUP"; + values[valuesById[11] = "TYPE_MESSAGE"] = "TYPE_MESSAGE"; + values[valuesById[12] = "TYPE_BYTES"] = "TYPE_BYTES"; + values[valuesById[13] = "TYPE_UINT32"] = "TYPE_UINT32"; + values[valuesById[14] = "TYPE_ENUM"] = "TYPE_ENUM"; + values[valuesById[15] = "TYPE_SFIXED32"] = "TYPE_SFIXED32"; + values[valuesById[16] = "TYPE_SFIXED64"] = "TYPE_SFIXED64"; + values[valuesById[17] = "TYPE_SINT32"] = "TYPE_SINT32"; + values[valuesById[18] = "TYPE_SINT64"] = "TYPE_SINT64"; + return values; + })(); /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {string} + * @property {string} LABEL_OPTIONAL=LABEL_OPTIONAL LABEL_OPTIONAL value + * @property {string} LABEL_REQUIRED=LABEL_REQUIRED LABEL_REQUIRED value + * @property {string} LABEL_REPEATED=LABEL_REPEATED LABEL_REPEATED value */ - UninterpretedOption.prototype.name = $util.emptyArray; + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = "LABEL_OPTIONAL"; + values[valuesById[2] = "LABEL_REQUIRED"] = "LABEL_REQUIRED"; + values[valuesById[3] = "LABEL_REPEATED"] = "LABEL_REPEATED"; + return values; + })(); - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; + return FieldDescriptorProto; + })(); - /** - * UninterpretedOption positiveIntValue. - * @member {number|string} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + protobuf.OneofDescriptorProto = (function() { /** - * UninterpretedOption negativeIntValue. - * @member {number|string} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set */ - UninterpretedOption.prototype.doubleValue = 0; + function OneofDescriptorProto(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]]; + } /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto * @instance */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + OneofDescriptorProto.prototype.name = ""; /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto * @instance */ - UninterpretedOption.prototype.aggregateValue = ""; + OneofDescriptorProto.prototype.options = null; /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.OneofDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); return message; }; /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.OneofDescriptorProto * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UninterpretedOption.toObject = function toObject(message, options) { + OneofDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.name = []; if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + object.name = ""; + object.options = null; } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); return object; }; /** - * Converts this UninterpretedOption to JSON. + * Converts this OneofDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.UninterpretedOption + * @memberof google.protobuf.OneofDescriptorProto * @instance * @returns {Object.} JSON object */ - UninterpretedOption.prototype.toJSON = function toJSON() { + OneofDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(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]]; + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; - - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return NamePart; - })(); - - return UninterpretedOption; + return OneofDescriptorProto; })(); - protobuf.SourceCodeInfo = (function() { + protobuf.EnumDescriptorProto = (function() { /** - * Properties of a SourceCodeInfo. + * Properties of an EnumDescriptorProto. * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName */ /** - * Constructs a new SourceCodeInfo. + * Constructs a new EnumDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set */ - function SourceCodeInfo(properties) { - this.location = []; + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3880,97 +3423,183 @@ } /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto * @instance */ - SourceCodeInfo.prototype.location = $util.emptyArray; + EnumDescriptorProto.prototype.name = ""; /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.EnumDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); } } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } return message; }; /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.EnumDescriptorProto * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceCodeInfo.toObject = function toObject(message, options) { + EnumDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; } return object; }; /** - * Converts this SourceCodeInfo to JSON. + * Converts this EnumDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.SourceCodeInfo + * @memberof google.protobuf.EnumDescriptorProto * @instance * @returns {Object.} JSON object */ - SourceCodeInfo.prototype.toJSON = function toJSON() { + EnumDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - SourceCodeInfo.Location = (function() { + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end */ /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; + function EnumReservedRange(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3978,165 +3607,116 @@ } /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; return message; }; /** - * Creates a plain object from a Location message. Also converts values to other types if specified. + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Location.toObject = function toObject(message, options) { + EnumReservedRange.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + object.start = 0; + object.end = 0; } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; return object; }; /** - * Converts this Location to JSON. + * Converts this EnumReservedRange to JSON. * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange * @instance * @returns {Object.} JSON object */ - Location.prototype.toJSON = function toJSON() { + EnumReservedRange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Location; + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; })(); - return SourceCodeInfo; + return EnumDescriptorProto; })(); - protobuf.GeneratedCodeInfo = (function() { + protobuf.EnumValueDescriptorProto = (function() { /** - * Properties of a GeneratedCodeInfo. + * Properties of an EnumValueDescriptorProto. * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options */ /** - * Constructs a new GeneratedCodeInfo. + * Constructs a new EnumValueDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set */ - function GeneratedCodeInfo(properties) { - this.annotation = []; + function EnumValueDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4144,230 +3724,275 @@ } /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto * @instance */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + EnumValueDescriptorProto.prototype.name = ""; /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.EnumValueDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + 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]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); } } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } return message; }; /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.ServiceDescriptorProto * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GeneratedCodeInfo.toObject = function toObject(message, options) { + ServiceDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); return object; }; /** - * Converts this GeneratedCodeInfo to JSON. + * Converts this ServiceDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo + * @memberof google.protobuf.ServiceDescriptorProto * @instance * @returns {Object.} JSON object */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { + ServiceDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - 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]]; + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return Annotation; - })(); - - return GeneratedCodeInfo; + return ServiceDescriptorProto; })(); - protobuf.Struct = (function() { + protobuf.MethodDescriptorProto = (function() { /** - * Properties of a Struct. + * Properties of a MethodDescriptorProto. * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming */ /** - * Constructs a new Struct. + * Constructs a new MethodDescriptorProto. * @memberof google.protobuf - * @classdesc Represents a Struct. - * @implements IStruct + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto * @constructor - * @param {google.protobuf.IStruct=} [properties] Properties to set + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set */ - function Struct(properties) { - this.fields = {}; + function MethodDescriptorProto(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4375,99 +4000,189 @@ } /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto * @instance */ - Struct.prototype.fields = $util.emptyObject; + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; /** - * Creates a Struct message from a plain object. Also converts values to their respective internal types. + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Struct + * @memberof google.protobuf.MethodDescriptorProto * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Struct} Struct + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto */ - Struct.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Struct) + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) return object; - var message = new $root.google.protobuf.Struct(); - if (object.fields) { - if (typeof object.fields !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (typeof object.fields[keys[i]] !== "object") - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]); - } + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); return message; }; /** - * Creates a plain object from a Struct message. Also converts values to other types if specified. + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Struct + * @memberof google.protobuf.MethodDescriptorProto * @static - * @param {google.protobuf.Struct} message Struct + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Struct.toObject = function toObject(message, options) { + MethodDescriptorProto.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.fields = {}; - var keys2; - if (message.fields && (keys2 = Object.keys(message.fields)).length) { - object.fields = {}; - for (var j = 0; j < keys2.length; ++j) - object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options); + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; return object; }; /** - * Converts this Struct to JSON. + * Converts this MethodDescriptorProto to JSON. * @function toJSON - * @memberof google.protobuf.Struct + * @memberof google.protobuf.MethodDescriptorProto * @instance * @returns {Object.} JSON object */ - Struct.prototype.toJSON = function toJSON() { + MethodDescriptorProto.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Struct; + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; })(); - protobuf.Value = (function() { + protobuf.FileOptions = (function() { /** - * Properties of a Value. + * Properties of a FileOptions. * @memberof google.protobuf - * @interface IValue - * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue - * @property {number|null} [numberValue] Value numberValue - * @property {string|null} [stringValue] Value stringValue - * @property {boolean|null} [boolValue] Value boolValue - * @property {google.protobuf.IStruct|null} [structValue] Value structValue - * @property {google.protobuf.IListValue|null} [listValue] Value listValue + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition */ /** - * Constructs a new Value. + * Constructs a new FileOptions. * @memberof google.protobuf - * @classdesc Represents a Value. - * @implements IValue + * @classdesc Represents a FileOptions. + * @implements IFileOptions * @constructor - * @param {google.protobuf.IValue=} [properties] Properties to set + * @param {google.protobuf.IFileOptions=} [properties] Properties to set */ - function Value(properties) { + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4475,195 +4190,435 @@ } /** - * Value nullValue. - * @member {google.protobuf.NullValue|null|undefined} nullValue - * @memberof google.protobuf.Value + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions * @instance */ - Value.prototype.nullValue = null; + FileOptions.prototype.javaPackage = ""; /** - * Value numberValue. - * @member {number|null|undefined} numberValue - * @memberof google.protobuf.Value + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions * @instance */ - Value.prototype.numberValue = null; + FileOptions.prototype.javaOuterClassname = ""; /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.protobuf.Value + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions * @instance */ - Value.prototype.stringValue = null; + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions phpGenericServices. + * @member {boolean} phpGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; /** - * Value boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.protobuf.Value + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions * @instance */ - Value.prototype.boolValue = null; + FileOptions.prototype.phpMetadataNamespace = ""; /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions * @instance */ - Value.prototype.structValue = null; + FileOptions.prototype.rubyPackage = ""; /** - * Value listValue. - * @member {google.protobuf.IListValue|null|undefined} listValue - * @memberof google.protobuf.Value + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions * @instance */ - Value.prototype.listValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + FileOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Value kind. - * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind - * @memberof google.protobuf.Value + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions * @instance */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Value + * @memberof google.protobuf.FileOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Value} Value + * @returns {google.protobuf.FileOptions} FileOptions */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Value) + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) return object; - var message = new $root.google.protobuf.Value(); - switch (object.nullValue) { - case "NULL_VALUE": - case 0: - message.nullValue = 0; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; break; } - if (object.numberValue != null) - message.numberValue = Number(object.numberValue); - if (object.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.boolValue != null) - message.boolValue = Boolean(object.boolValue); - if (object.structValue != null) { - if (typeof object.structValue !== "object") - throw TypeError(".google.protobuf.Value.structValue: object expected"); - message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue); + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.phpGenericServices != null) + message.phpGenericServices = Boolean(object.phpGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } } - if (object.listValue != null) { - if (typeof object.listValue !== "object") - throw TypeError(".google.protobuf.Value.listValue: object expected"); - message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue); + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } } return message; }; /** - * Creates a plain object from a Value message. Also converts values to other types if specified. + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Value + * @memberof google.protobuf.FileOptions * @static - * @param {google.protobuf.Value} message Value + * @param {google.protobuf.FileOptions} message FileOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Value.toObject = function toObject(message, options) { + FileOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; - if (options.oneofs) - object.kind = "nullValue"; - } - if (message.numberValue != null && message.hasOwnProperty("numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.kind = "numberValue"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; } - if (message.boolValue != null && message.hasOwnProperty("boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpGenericServices = false; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; } - if (message.structValue != null && message.hasOwnProperty("structValue")) { - object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options); - if (options.oneofs) - object.kind = "structValue"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices")) + object.phpGenericServices = message.phpGenericServices; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } - if (message.listValue != null && message.hasOwnProperty("listValue")) { - object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options); - if (options.oneofs) - object.kind = "listValue"; + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); } return object; }; /** - * Converts this Value to JSON. + * Converts this FileOptions to JSON. * @function toJSON - * @memberof google.protobuf.Value + * @memberof google.protobuf.FileOptions * @instance * @returns {Object.} JSON object */ - Value.prototype.toJSON = function toJSON() { + FileOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Value; - })(); + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; - /** - * NullValue enum. - * @name google.protobuf.NullValue - * @enum {string} - * @property {string} NULL_VALUE=NULL_VALUE NULL_VALUE value - */ - protobuf.NullValue = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_VALUE"] = "NULL_VALUE"; - return values; + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {string} + * @property {string} SPEED=SPEED SPEED value + * @property {string} CODE_SIZE=CODE_SIZE CODE_SIZE value + * @property {string} LITE_RUNTIME=LITE_RUNTIME LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = "SPEED"; + values[valuesById[2] = "CODE_SIZE"] = "CODE_SIZE"; + values[valuesById[3] = "LITE_RUNTIME"] = "LITE_RUNTIME"; + return values; + })(); + + return FileOptions; })(); - protobuf.ListValue = (function() { + protobuf.MessageOptions = (function() { /** - * Properties of a ListValue. + * Properties of a MessageOptions. * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource */ /** - * Constructs a new ListValue. + * Constructs a new MessageOptions. * @memberof google.protobuf - * @classdesc Represents a ListValue. - * @implements IListValue + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions * @constructor - * @param {google.protobuf.IListValue=} [properties] Properties to set + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set */ - function ListValue(properties) { - this.values = []; + function MessageOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4671,92 +4626,189 @@ } /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions * @instance */ - ListValue.prototype.values = $util.emptyArray; + MessageOptions.prototype.messageSetWireFormat = false; /** - * Creates a ListValue message from a plain object. Also converts values to their respective internal types. + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.MessageOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.ListValue} ListValue + * @returns {google.protobuf.MessageOptions} MessageOptions */ - ListValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ListValue) + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) return object; - var message = new $root.google.protobuf.ListValue(); - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.protobuf.ListValue.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.protobuf.ListValue.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); } } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } return message; }; /** - * Creates a plain object from a ListValue message. Also converts values to other types if specified. + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.MessageOptions * @static - * @param {google.protobuf.ListValue} message ListValue + * @param {google.protobuf.MessageOptions} message MessageOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListValue.toObject = function toObject(message, options) { + MessageOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.values = []; - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); return object; }; /** - * Converts this ListValue to JSON. + * Converts this MessageOptions to JSON. * @function toJSON - * @memberof google.protobuf.ListValue + * @memberof google.protobuf.MessageOptions * @instance * @returns {Object.} JSON object */ - ListValue.prototype.toJSON = function toJSON() { + MessageOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListValue; + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; })(); - protobuf.Empty = (function() { + protobuf.FieldOptions = (function() { /** - * Properties of an Empty. + * Properties of a FieldOptions. * @memberof google.protobuf - * @interface IEmpty + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference */ /** - * Constructs a new Empty. + * Constructs a new FieldOptions. * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set */ - function Empty(properties) { + function FieldOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4764,147 +4816,346 @@ } /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; + FieldOptions.prototype.ctype = 0; /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance */ - Empty.toObject = function toObject() { - return {}; - }; + FieldOptions.prototype.packed = false; /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions * @instance - * @returns {Object.} JSON object */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + FieldOptions.prototype.jstype = 0; - return Empty; - })(); + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; - protobuf.DoubleValue = (function() { + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; /** - * Properties of a DoubleValue. - * @memberof google.protobuf - * @interface IDoubleValue - * @property {number|null} [value] DoubleValue value + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Constructs a new DoubleValue. - * @memberof google.protobuf - * @classdesc Represents a DoubleValue. - * @implements IDoubleValue - * @constructor - * @param {google.protobuf.IDoubleValue=} [properties] Properties to set + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance */ - function DoubleValue(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]]; - } + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; /** - * DoubleValue value. - * @member {number} value - * @memberof google.protobuf.DoubleValue + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions * @instance */ - DoubleValue.prototype.value = 0; + FieldOptions.prototype[".google.api.resourceReference"] = null; /** - * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types. + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.FieldOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.DoubleValue} DoubleValue + * @returns {google.protobuf.FieldOptions} FieldOptions */ - DoubleValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DoubleValue) + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) return object; - var message = new $root.google.protobuf.DoubleValue(); - if (object.value != null) - message.value = Number(object.value); + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } return message; }; /** - * Creates a plain object from a DoubleValue message. Also converts values to other types if specified. + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.FieldOptions * @static - * @param {google.protobuf.DoubleValue} message DoubleValue + * @param {google.protobuf.FieldOptions} message FieldOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DoubleValue.toObject = function toObject(message, options) { + FieldOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); return object; }; /** - * Converts this DoubleValue to JSON. + * Converts this FieldOptions to JSON. * @function toJSON - * @memberof google.protobuf.DoubleValue + * @memberof google.protobuf.FieldOptions * @instance * @returns {Object.} JSON object */ - DoubleValue.prototype.toJSON = function toJSON() { + FieldOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DoubleValue; + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {string} + * @property {string} STRING=STRING STRING value + * @property {string} CORD=CORD CORD value + * @property {string} STRING_PIECE=STRING_PIECE STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = "STRING"; + values[valuesById[1] = "CORD"] = "CORD"; + values[valuesById[2] = "STRING_PIECE"] = "STRING_PIECE"; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {string} + * @property {string} JS_NORMAL=JS_NORMAL JS_NORMAL value + * @property {string} JS_STRING=JS_STRING JS_STRING value + * @property {string} JS_NUMBER=JS_NUMBER JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = "JS_NORMAL"; + values[valuesById[1] = "JS_STRING"] = "JS_STRING"; + values[valuesById[2] = "JS_NUMBER"] = "JS_NUMBER"; + return values; + })(); + + return FieldOptions; })(); - protobuf.FloatValue = (function() { + protobuf.OneofOptions = (function() { /** - * Properties of a FloatValue. + * Properties of an OneofOptions. * @memberof google.protobuf - * @interface IFloatValue - * @property {number|null} [value] FloatValue value + * @interface IOneofOptions + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption */ /** - * Constructs a new FloatValue. + * Constructs a new OneofOptions. * @memberof google.protobuf - * @classdesc Represents a FloatValue. - * @implements IFloatValue + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions * @constructor - * @param {google.protobuf.IFloatValue=} [properties] Properties to set + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set */ - function FloatValue(properties) { + function OneofOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4912,82 +5163,111 @@ } /** - * FloatValue value. - * @member {number} value - * @memberof google.protobuf.FloatValue + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions * @instance */ - FloatValue.prototype.value = 0; + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; /** - * Creates a FloatValue message from a plain object. Also converts values to their respective internal types. + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.OneofOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.FloatValue} FloatValue + * @returns {google.protobuf.OneofOptions} OneofOptions */ - FloatValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FloatValue) + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) return object; - var message = new $root.google.protobuf.FloatValue(); - if (object.value != null) - message.value = Number(object.value); + var message = new $root.google.protobuf.OneofOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } return message; }; /** - * Creates a plain object from a FloatValue message. Also converts values to other types if specified. + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.OneofOptions * @static - * @param {google.protobuf.FloatValue} message FloatValue + * @param {google.protobuf.OneofOptions} message OneofOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FloatValue.toObject = function toObject(message, options) { + OneofOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } return object; }; /** - * Converts this FloatValue to JSON. + * Converts this OneofOptions to JSON. * @function toJSON - * @memberof google.protobuf.FloatValue + * @memberof google.protobuf.OneofOptions * @instance * @returns {Object.} JSON object */ - FloatValue.prototype.toJSON = function toJSON() { + OneofOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return FloatValue; + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; })(); - protobuf.Int64Value = (function() { + protobuf.EnumOptions = (function() { /** - * Properties of an Int64Value. + * Properties of an EnumOptions. * @memberof google.protobuf - * @interface IInt64Value - * @property {number|string|null} [value] Int64Value value + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption */ /** - * Constructs a new Int64Value. + * Constructs a new EnumOptions. * @memberof google.protobuf - * @classdesc Represents an Int64Value. - * @implements IInt64Value + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions * @constructor - * @param {google.protobuf.IInt64Value=} [properties] Properties to set + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set */ - function Int64Value(properties) { + function EnumOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4995,96 +5275,138 @@ } /** - * Int64Value value. - * @member {number|string} value - * @memberof google.protobuf.Int64Value + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions * @instance */ - Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + EnumOptions.prototype.allowAlias = false; /** - * Creates an Int64Value message from a plain object. Also converts values to their respective internal types. + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Int64Value + * @memberof google.protobuf.EnumOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Int64Value} Int64Value + * @returns {google.protobuf.EnumOptions} EnumOptions */ - Int64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int64Value) + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) return object; - var message = new $root.google.protobuf.Int64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = false; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(); + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } return message; }; /** - * Creates a plain object from an Int64Value message. Also converts values to other types if specified. + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Int64Value + * @memberof google.protobuf.EnumOptions * @static - * @param {google.protobuf.Int64Value} message Int64Value + * @param {google.protobuf.EnumOptions} message EnumOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Int64Value.toObject = function toObject(message, options) { + EnumOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } return object; }; /** - * Converts this Int64Value to JSON. + * Converts this EnumOptions to JSON. * @function toJSON - * @memberof google.protobuf.Int64Value + * @memberof google.protobuf.EnumOptions * @instance * @returns {Object.} JSON object */ - Int64Value.prototype.toJSON = function toJSON() { + EnumOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Int64Value; + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; })(); - protobuf.UInt64Value = (function() { + protobuf.EnumValueOptions = (function() { /** - * Properties of a UInt64Value. + * Properties of an EnumValueOptions. * @memberof google.protobuf - * @interface IUInt64Value - * @property {number|string|null} [value] UInt64Value value + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption */ /** - * Constructs a new UInt64Value. + * Constructs a new EnumValueOptions. * @memberof google.protobuf - * @classdesc Represents a UInt64Value. - * @implements IUInt64Value + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions * @constructor - * @param {google.protobuf.IUInt64Value=} [properties] Properties to set + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set */ - function UInt64Value(properties) { + function EnumValueOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5092,96 +5414,126 @@ } /** - * UInt64Value value. - * @member {number|string} value - * @memberof google.protobuf.UInt64Value + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions * @instance */ - UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + EnumValueOptions.prototype.deprecated = false; /** - * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types. + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.EnumValueOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UInt64Value} UInt64Value + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions */ - UInt64Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt64Value) + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) return object; - var message = new $root.google.protobuf.UInt64Value(); - if (object.value != null) - if ($util.Long) - (message.value = $util.Long.fromValue(object.value)).unsigned = true; - else if (typeof object.value === "string") - message.value = parseInt(object.value, 10); - else if (typeof object.value === "number") - message.value = object.value; - else if (typeof object.value === "object") - message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true); + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } return message; }; /** - * Creates a plain object from a UInt64Value message. Also converts values to other types if specified. + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.EnumValueOptions * @static - * @param {google.protobuf.UInt64Value} message UInt64Value + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UInt64Value.toObject = function toObject(message, options) { + EnumValueOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; if (options.defaults) - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.value = options.longs === String ? "0" : 0; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value === "number") - object.value = options.longs === String ? String(message.value) : message.value; - else - object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value; + object.deprecated = false; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } return object; }; /** - * Converts this UInt64Value to JSON. + * Converts this EnumValueOptions to JSON. * @function toJSON - * @memberof google.protobuf.UInt64Value + * @memberof google.protobuf.EnumValueOptions * @instance * @returns {Object.} JSON object */ - UInt64Value.prototype.toJSON = function toJSON() { + EnumValueOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UInt64Value; + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; })(); - protobuf.Int32Value = (function() { + protobuf.ServiceOptions = (function() { /** - * Properties of an Int32Value. + * Properties of a ServiceOptions. * @memberof google.protobuf - * @interface IInt32Value - * @property {number|null} [value] Int32Value value + * @interface IServiceOptions + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes */ /** - * Constructs a new Int32Value. + * Constructs a new ServiceOptions. * @memberof google.protobuf - * @classdesc Represents an Int32Value. - * @implements IInt32Value + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions * @constructor - * @param {google.protobuf.IInt32Value=} [properties] Properties to set + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set */ - function Int32Value(properties) { + function ServiceOptions(properties) { + this.uninterpretedOption = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5189,82 +5541,156 @@ } /** - * Int32Value value. - * @member {number} value - * @memberof google.protobuf.Int32Value + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions * @instance */ - Int32Value.prototype.value = 0; + ServiceOptions.prototype.deprecated = false; /** - * Creates an Int32Value message from a plain object. Also converts values to their respective internal types. + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Int32Value + * @memberof google.protobuf.ServiceOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Int32Value} Int32Value + * @returns {google.protobuf.ServiceOptions} ServiceOptions */ - Int32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Int32Value) + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) return object; - var message = new $root.google.protobuf.Int32Value(); - if (object.value != null) - message.value = object.value | 0; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); return message; }; /** - * Creates a plain object from an Int32Value message. Also converts values to other types if specified. + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Int32Value + * @memberof google.protobuf.ServiceOptions * @static - * @param {google.protobuf.Int32Value} message Int32Value + * @param {google.protobuf.ServiceOptions} message ServiceOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Int32Value.toObject = function toObject(message, options) { + ServiceOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; return object; }; /** - * Converts this Int32Value to JSON. + * Converts this ServiceOptions to JSON. * @function toJSON - * @memberof google.protobuf.Int32Value + * @memberof google.protobuf.ServiceOptions * @instance * @returns {Object.} JSON object */ - Int32Value.prototype.toJSON = function toJSON() { + ServiceOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Int32Value; + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; })(); - protobuf.UInt32Value = (function() { + protobuf.MethodOptions = (function() { /** - * Properties of a UInt32Value. + * Properties of a MethodOptions. * @memberof google.protobuf - * @interface IUInt32Value - * @property {number|null} [value] UInt32Value value + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo */ /** - * Constructs a new UInt32Value. + * Constructs a new MethodOptions. * @memberof google.protobuf - * @classdesc Represents a UInt32Value. - * @implements IUInt32Value + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions * @constructor - * @param {google.protobuf.IUInt32Value=} [properties] Properties to set + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set */ - function UInt32Value(properties) { + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5272,82 +5698,231 @@ } /** - * UInt32Value value. - * @member {number} value - * @memberof google.protobuf.UInt32Value + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions * @instance */ - UInt32Value.prototype.value = 0; + MethodOptions.prototype.deprecated = false; /** - * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types. + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * MethodOptions .google.longrunning.operationInfo. + * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.longrunning.operationInfo"] = null; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.MethodOptions * @static * @param {Object.} object Plain object - * @returns {google.protobuf.UInt32Value} UInt32Value + * @returns {google.protobuf.MethodOptions} MethodOptions */ - UInt32Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UInt32Value) + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) return object; - var message = new $root.google.protobuf.UInt32Value(); - if (object.value != null) - message.value = object.value >>> 0; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + if (object[".google.longrunning.operationInfo"] != null) { + if (typeof object[".google.longrunning.operationInfo"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected"); + message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]); + } return message; }; /** - * Creates a plain object from a UInt32Value message. Also converts values to other types if specified. + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.MethodOptions * @static - * @param {google.protobuf.UInt32Value} message UInt32Value + * @param {google.protobuf.MethodOptions} message MethodOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UInt32Value.toObject = function toObject(message, options) { + MethodOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = 0; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object[".google.longrunning.operationInfo"] = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) + object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options); + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); return object; }; /** - * Converts this UInt32Value to JSON. + * Converts this MethodOptions to JSON. * @function toJSON - * @memberof google.protobuf.UInt32Value + * @memberof google.protobuf.MethodOptions * @instance * @returns {Object.} JSON object */ - UInt32Value.prototype.toJSON = function toJSON() { + MethodOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UInt32Value; + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {string} + * @property {string} IDEMPOTENCY_UNKNOWN=IDEMPOTENCY_UNKNOWN IDEMPOTENCY_UNKNOWN value + * @property {string} NO_SIDE_EFFECTS=NO_SIDE_EFFECTS NO_SIDE_EFFECTS value + * @property {string} IDEMPOTENT=IDEMPOTENT IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = "IDEMPOTENCY_UNKNOWN"; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = "NO_SIDE_EFFECTS"; + values[valuesById[2] = "IDEMPOTENT"] = "IDEMPOTENT"; + return values; + })(); + + return MethodOptions; })(); - protobuf.BoolValue = (function() { + protobuf.UninterpretedOption = (function() { /** - * Properties of a BoolValue. + * Properties of an UninterpretedOption. * @memberof google.protobuf - * @interface IBoolValue - * @property {boolean|null} [value] BoolValue value + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|string|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|string|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue */ /** - * Constructs a new BoolValue. + * Constructs a new UninterpretedOption. * @memberof google.protobuf - * @classdesc Represents a BoolValue. - * @implements IBoolValue + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption * @constructor - * @param {google.protobuf.IBoolValue=} [properties] Properties to set + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set */ - function BoolValue(properties) { + function UninterpretedOption(properties) { + this.name = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5355,165 +5930,339 @@ } /** - * BoolValue value. - * @member {boolean} value - * @memberof google.protobuf.BoolValue + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption * @instance */ - BoolValue.prototype.value = false; + UninterpretedOption.prototype.name = $util.emptyArray; /** - * Creates a BoolValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.BoolValue - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.BoolValue} BoolValue + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance */ - BoolValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BoolValue) - return object; - var message = new $root.google.protobuf.BoolValue(); - if (object.value != null) - message.value = Boolean(object.value); - return message; - }; + UninterpretedOption.prototype.identifierValue = ""; /** - * Creates a plain object from a BoolValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.BoolValue - * @static - * @param {google.protobuf.BoolValue} message BoolValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * UninterpretedOption positiveIntValue. + * @member {number|string} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance */ - BoolValue.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.value = false; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - return object; - }; + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; /** - * Converts this BoolValue to JSON. - * @function toJSON - * @memberof google.protobuf.BoolValue + * UninterpretedOption negativeIntValue. + * @member {number|string} negativeIntValue + * @memberof google.protobuf.UninterpretedOption * @instance - * @returns {Object.} JSON object */ - BoolValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - return BoolValue; - })(); - - protobuf.StringValue = (function() { + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Properties of a StringValue. - * @memberof google.protobuf - * @interface IStringValue - * @property {string|null} [value] StringValue value + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance */ + UninterpretedOption.prototype.doubleValue = 0; /** - * Constructs a new StringValue. - * @memberof google.protobuf - * @classdesc Represents a StringValue. - * @implements IStringValue - * @constructor - * @param {google.protobuf.IStringValue=} [properties] Properties to set + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance */ - function StringValue(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]]; - } + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); /** - * StringValue value. - * @member {string} value - * @memberof google.protobuf.StringValue + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption * @instance */ - StringValue.prototype.value = ""; + UninterpretedOption.prototype.aggregateValue = ""; /** - * Creates a StringValue message from a plain object. Also converts values to their respective internal types. + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.UninterpretedOption * @static * @param {Object.} object Plain object - * @returns {google.protobuf.StringValue} StringValue + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption */ - StringValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.StringValue) + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) return object; - var message = new $root.google.protobuf.StringValue(); - if (object.value != null) - message.value = String(object.value); + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); return message; }; /** - * Creates a plain object from a StringValue message. Also converts values to other types if specified. + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.UninterpretedOption * @static - * @param {google.protobuf.StringValue} message StringValue + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - StringValue.toObject = function toObject(message, options) { + UninterpretedOption.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.value = ""; - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; return object; }; /** - * Converts this StringValue to JSON. + * Converts this UninterpretedOption to JSON. * @function toJSON - * @memberof google.protobuf.StringValue + * @memberof google.protobuf.UninterpretedOption * @instance * @returns {Object.} JSON object */ - StringValue.prototype.toJSON = function toJSON() { + UninterpretedOption.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return StringValue; + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(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]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; })(); - protobuf.BytesValue = (function() { + protobuf.SourceCodeInfo = (function() { /** - * Properties of a BytesValue. + * Properties of a SourceCodeInfo. * @memberof google.protobuf - * @interface IBytesValue - * @property {Uint8Array|null} [value] BytesValue value + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location */ /** - * Constructs a new BytesValue. + * Constructs a new SourceCodeInfo. * @memberof google.protobuf - * @classdesc Represents a BytesValue. - * @implements IBytesValue + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo * @constructor - * @param {google.protobuf.IBytesValue=} [properties] Properties to set + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set */ - function BytesValue(properties) { + function SourceCodeInfo(properties) { + this.location = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5521,92 +6270,293 @@ } /** - * BytesValue value. - * @member {Uint8Array} value - * @memberof google.protobuf.BytesValue + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo * @instance */ - BytesValue.prototype.value = $util.newBuffer([]); + SourceCodeInfo.prototype.location = $util.emptyArray; /** - * Creates a BytesValue message from a plain object. Also converts values to their respective internal types. + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.SourceCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.BytesValue} BytesValue + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo */ - BytesValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.BytesValue) + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) return object; - var message = new $root.google.protobuf.BytesValue(); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } return message; }; /** - * Creates a plain object from a BytesValue message. Also converts values to other types if specified. + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.SourceCodeInfo * @static - * @param {google.protobuf.BytesValue} message BytesValue + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BytesValue.toObject = function toObject(message, options) { + SourceCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } return object; }; /** - * Converts this BytesValue to JSON. + * Converts this SourceCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.BytesValue + * @memberof google.protobuf.SourceCodeInfo * @instance * @returns {Object.} JSON object */ - BytesValue.prototype.toJSON = function toJSON() { + SourceCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return BytesValue; + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + 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]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; })(); - protobuf.Any = (function() { + protobuf.GeneratedCodeInfo = (function() { /** - * Properties of an Any. + * Properties of a GeneratedCodeInfo. * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation */ /** - * Constructs a new Any. + * Constructs a new GeneratedCodeInfo. * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set */ - function Any(properties) { + function GeneratedCodeInfo(properties) { + this.annotation = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5614,85 +6564,287 @@ } /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo * @instance */ - Any.prototype.value = $util.newBuffer([]); + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.GeneratedCodeInfo * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length) - message.value = object.value; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } return message; }; /** - * Creates a plain object from an Any message. Also converts values to other types if specified. + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Any + * @memberof google.protobuf.GeneratedCodeInfo * @static - * @param {google.protobuf.Any} message Any + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Any.toObject = function toObject(message, options) { + GeneratedCodeInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; return object; }; /** - * Converts this Any to JSON. + * Converts this GeneratedCodeInfo to JSON. * @function toJSON - * @memberof google.protobuf.Any + * @memberof google.protobuf.GeneratedCodeInfo * @instance * @returns {Object.} JSON object */ - Any.prototype.toJSON = function toJSON() { + GeneratedCodeInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Any; + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + 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]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {string} + * @property {string} NONE=NONE NONE value + * @property {string} SET=SET SET value + * @property {string} ALIAS=ALIAS ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = "NONE"; + values[valuesById[1] = "SET"] = "SET"; + values[valuesById[2] = "ALIAS"] = "ALIAS"; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; })(); protobuf.FieldMask = (function() { @@ -5784,6 +6936,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + return FieldMask; })(); @@ -5896,6 +7063,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + return Duration; })(); @@ -6002,11 +7184,26 @@ * Converts this DocumentMask to JSON. * @function toJSON * @memberof google.firestore.v1beta1.DocumentMask - * @instance - * @returns {Object.} JSON object + * @instance + * @returns {Object.} JSON object + */ + DocumentMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DocumentMask + * @function getTypeUrl + * @memberof google.firestore.v1beta1.DocumentMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - DocumentMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + DocumentMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.DocumentMask"; }; return DocumentMask; @@ -6126,6 +7323,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Precondition + * @function getTypeUrl + * @memberof google.firestore.v1beta1.Precondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Precondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.Precondition"; + }; + return Precondition; })(); @@ -6246,6 +7458,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TransactionOptions + * @function getTypeUrl + * @memberof google.firestore.v1beta1.TransactionOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransactionOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.TransactionOptions"; + }; + TransactionOptions.ReadWrite = (function() { /** @@ -6293,7 +7520,7 @@ if (object.retryTransaction != null) if (typeof object.retryTransaction === "string") $util.base64.decode(object.retryTransaction, message.retryTransaction = $util.newBuffer($util.base64.length(object.retryTransaction)), 0); - else if (object.retryTransaction.length) + else if (object.retryTransaction.length >= 0) message.retryTransaction = object.retryTransaction; return message; }; @@ -6335,6 +7562,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReadWrite + * @function getTypeUrl + * @memberof google.firestore.v1beta1.TransactionOptions.ReadWrite + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadWrite.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.TransactionOptions.ReadWrite"; + }; + return ReadWrite; })(); @@ -6436,6 +7678,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ReadOnly + * @function getTypeUrl + * @memberof google.firestore.v1beta1.TransactionOptions.ReadOnly + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadOnly.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.TransactionOptions.ReadOnly"; + }; + return ReadOnly; })(); @@ -6585,6 +7842,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Document + * @function getTypeUrl + * @memberof google.firestore.v1beta1.Document + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Document.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.Document"; + }; + return Document; })(); @@ -6737,6 +8009,12 @@ return object; var message = new $root.google.firestore.v1beta1.Value(); switch (object.nullValue) { + default: + if (typeof object.nullValue === "number") { + message.nullValue = object.nullValue; + break; + } + break; case "NULL_VALUE": case 0: message.nullValue = 0; @@ -6765,7 +8043,7 @@ if (object.bytesValue != null) if (typeof object.bytesValue === "string") $util.base64.decode(object.bytesValue, message.bytesValue = $util.newBuffer($util.base64.length(object.bytesValue)), 0); - else if (object.bytesValue.length) + else if (object.bytesValue.length >= 0) message.bytesValue = object.bytesValue; if (object.referenceValue != null) message.referenceValue = String(object.referenceValue); @@ -6844,7 +8122,7 @@ object.valueType = "timestampValue"; } if (message.nullValue != null && message.hasOwnProperty("nullValue")) { - object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; + object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue; if (options.oneofs) object.valueType = "nullValue"; } @@ -6872,6 +8150,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.firestore.v1beta1.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.Value"; + }; + return Value; })(); @@ -6967,6 +8260,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ArrayValue + * @function getTypeUrl + * @memberof google.firestore.v1beta1.ArrayValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ArrayValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.ArrayValue"; + }; + return ArrayValue; })(); @@ -7063,6 +8371,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for MapValue + * @function getTypeUrl + * @memberof google.firestore.v1beta1.MapValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MapValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.MapValue"; + }; + return MapValue; })(); @@ -7677,7 +9000,7 @@ if (object.transaction != null) if (typeof object.transaction === "string") $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) + else if (object.transaction.length >= 0) message.transaction = object.transaction; if (object.readTime != null) { if (typeof object.readTime !== "object") @@ -7732,6 +9055,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetDocumentRequest + * @function getTypeUrl + * @memberof google.firestore.v1beta1.GetDocumentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.GetDocumentRequest"; + }; + return GetDocumentRequest; })(); @@ -7883,7 +9221,7 @@ if (object.transaction != null) if (typeof object.transaction === "string") $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) + else if (object.transaction.length >= 0) message.transaction = object.transaction; if (object.readTime != null) { if (typeof object.readTime !== "object") @@ -7955,6 +9293,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListDocumentsRequest + * @function getTypeUrl + * @memberof google.firestore.v1beta1.ListDocumentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.ListDocumentsRequest"; + }; + return ListDocumentsRequest; })(); @@ -8065,6 +9418,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListDocumentsResponse + * @function getTypeUrl + * @memberof google.firestore.v1beta1.ListDocumentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.ListDocumentsResponse"; + }; + return ListDocumentsResponse; })(); @@ -8211,6 +9579,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CreateDocumentRequest + * @function getTypeUrl + * @memberof google.firestore.v1beta1.CreateDocumentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.CreateDocumentRequest"; + }; + return CreateDocumentRequest; })(); @@ -8349,6 +9732,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UpdateDocumentRequest + * @function getTypeUrl + * @memberof google.firestore.v1beta1.UpdateDocumentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.UpdateDocumentRequest"; + }; + return UpdateDocumentRequest; })(); @@ -8450,6 +9848,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteDocumentRequest + * @function getTypeUrl + * @memberof google.firestore.v1beta1.DeleteDocumentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDocumentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.DeleteDocumentRequest"; + }; + return DeleteDocumentRequest; })(); @@ -8574,7 +9987,7 @@ if (object.transaction != null) if (typeof object.transaction === "string") $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) + else if (object.transaction.length >= 0) message.transaction = object.transaction; if (object.newTransaction != null) { if (typeof object.newTransaction !== "object") @@ -8646,6 +10059,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BatchGetDocumentsRequest + * @function getTypeUrl + * @memberof google.firestore.v1beta1.BatchGetDocumentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchGetDocumentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.BatchGetDocumentsRequest"; + }; + return BatchGetDocumentsRequest; })(); @@ -8744,7 +10172,7 @@ if (object.transaction != null) if (typeof object.transaction === "string") $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) + else if (object.transaction.length >= 0) message.transaction = object.transaction; if (object.readTime != null) { if (typeof object.readTime !== "object") @@ -8805,6 +10233,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BatchGetDocumentsResponse + * @function getTypeUrl + * @memberof google.firestore.v1beta1.BatchGetDocumentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchGetDocumentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.BatchGetDocumentsResponse"; + }; + return BatchGetDocumentsResponse; })(); @@ -8906,6 +10349,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BeginTransactionRequest + * @function getTypeUrl + * @memberof google.firestore.v1beta1.BeginTransactionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BeginTransactionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.BeginTransactionRequest"; + }; + return BeginTransactionRequest; })(); @@ -8956,7 +10414,7 @@ if (object.transaction != null) if (typeof object.transaction === "string") $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) + else if (object.transaction.length >= 0) message.transaction = object.transaction; return message; }; @@ -8998,6 +10456,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BeginTransactionResponse + * @function getTypeUrl + * @memberof google.firestore.v1beta1.BeginTransactionResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BeginTransactionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.BeginTransactionResponse"; + }; + return BeginTransactionResponse; })(); @@ -9079,7 +10552,7 @@ if (object.transaction != null) if (typeof object.transaction === "string") $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) + else if (object.transaction.length >= 0) message.transaction = object.transaction; return message; }; @@ -9132,6 +10605,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CommitRequest + * @function getTypeUrl + * @memberof google.firestore.v1beta1.CommitRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommitRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.CommitRequest"; + }; + return CommitRequest; })(); @@ -9245,6 +10733,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CommitResponse + * @function getTypeUrl + * @memberof google.firestore.v1beta1.CommitResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommitResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.CommitResponse"; + }; + return CommitResponse; })(); @@ -9306,7 +10809,7 @@ if (object.transaction != null) if (typeof object.transaction === "string") $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) + else if (object.transaction.length >= 0) message.transaction = object.transaction; return message; }; @@ -9352,6 +10855,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RollbackRequest + * @function getTypeUrl + * @memberof google.firestore.v1beta1.RollbackRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RollbackRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.RollbackRequest"; + }; + return RollbackRequest; })(); @@ -9470,7 +10988,7 @@ if (object.transaction != null) if (typeof object.transaction === "string") $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) + else if (object.transaction.length >= 0) message.transaction = object.transaction; if (object.newTransaction != null) { if (typeof object.newTransaction !== "object") @@ -9536,6 +11054,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RunQueryRequest + * @function getTypeUrl + * @memberof google.firestore.v1beta1.RunQueryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.RunQueryRequest"; + }; + return RunQueryRequest; })(); @@ -9613,7 +11146,7 @@ if (object.transaction != null) if (typeof object.transaction === "string") $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0); - else if (object.transaction.length) + else if (object.transaction.length >= 0) message.transaction = object.transaction; if (object.document != null) { if (typeof object.document !== "object") @@ -9677,6 +11210,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for RunQueryResponse + * @function getTypeUrl + * @memberof google.firestore.v1beta1.RunQueryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RunQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.RunQueryResponse"; + }; + return RunQueryResponse; })(); @@ -9850,6 +11398,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PartitionQueryRequest + * @function getTypeUrl + * @memberof google.firestore.v1beta1.PartitionQueryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartitionQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.PartitionQueryRequest"; + }; + return PartitionQueryRequest; })(); @@ -9960,6 +11523,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for PartitionQueryResponse + * @function getTypeUrl + * @memberof google.firestore.v1beta1.PartitionQueryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartitionQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.PartitionQueryResponse"; + }; + return PartitionQueryResponse; })(); @@ -10062,7 +11640,7 @@ if (object.streamToken != null) if (typeof object.streamToken === "string") $util.base64.decode(object.streamToken, message.streamToken = $util.newBuffer($util.base64.length(object.streamToken)), 0); - else if (object.streamToken.length) + else if (object.streamToken.length >= 0) message.streamToken = object.streamToken; if (object.labels) { if (typeof object.labels !== "object") @@ -10133,6 +11711,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WriteRequest + * @function getTypeUrl + * @memberof google.firestore.v1beta1.WriteRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.WriteRequest"; + }; + return WriteRequest; })(); @@ -10213,7 +11806,7 @@ if (object.streamToken != null) if (typeof object.streamToken === "string") $util.base64.decode(object.streamToken, message.streamToken = $util.newBuffer($util.base64.length(object.streamToken)), 0); - else if (object.streamToken.length) + else if (object.streamToken.length >= 0) message.streamToken = object.streamToken; if (object.writeResults) { if (!Array.isArray(object.writeResults)) @@ -10284,6 +11877,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WriteResponse + * @function getTypeUrl + * @memberof google.firestore.v1beta1.WriteResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.WriteResponse"; + }; + return WriteResponse; })(); @@ -10441,6 +12049,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListenRequest + * @function getTypeUrl + * @memberof google.firestore.v1beta1.ListenRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListenRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.ListenRequest"; + }; + return ListenRequest; })(); @@ -10618,6 +12241,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListenResponse + * @function getTypeUrl + * @memberof google.firestore.v1beta1.ListenResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListenResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.ListenResponse"; + }; + return ListenResponse; })(); @@ -10748,7 +12386,7 @@ if (object.resumeToken != null) if (typeof object.resumeToken === "string") $util.base64.decode(object.resumeToken, message.resumeToken = $util.newBuffer($util.base64.length(object.resumeToken)), 0); - else if (object.resumeToken.length) + else if (object.resumeToken.length >= 0) message.resumeToken = object.resumeToken; if (object.readTime != null) { if (typeof object.readTime !== "object") @@ -10817,6 +12455,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Target + * @function getTypeUrl + * @memberof google.firestore.v1beta1.Target + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Target.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.Target"; + }; + Target.DocumentsTarget = (function() { /** @@ -10906,6 +12559,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DocumentsTarget + * @function getTypeUrl + * @memberof google.firestore.v1beta1.Target.DocumentsTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentsTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.Target.DocumentsTarget"; + }; + return DocumentsTarget; })(); @@ -11022,6 +12690,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for QueryTarget + * @function getTypeUrl + * @memberof google.firestore.v1beta1.Target.QueryTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QueryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.Target.QueryTarget"; + }; + return QueryTarget; })(); @@ -11110,6 +12793,12 @@ return object; var message = new $root.google.firestore.v1beta1.TargetChange(); switch (object.targetChangeType) { + default: + if (typeof object.targetChangeType === "number") { + message.targetChangeType = object.targetChangeType; + break; + } + break; case "NO_CHANGE": case 0: message.targetChangeType = 0; @@ -11146,7 +12835,7 @@ if (object.resumeToken != null) if (typeof object.resumeToken === "string") $util.base64.decode(object.resumeToken, message.resumeToken = $util.newBuffer($util.base64.length(object.resumeToken)), 0); - else if (object.resumeToken.length) + else if (object.resumeToken.length >= 0) message.resumeToken = object.resumeToken; if (object.readTime != null) { if (typeof object.readTime !== "object") @@ -11184,7 +12873,7 @@ object.readTime = null; } if (message.targetChangeType != null && message.hasOwnProperty("targetChangeType")) - object.targetChangeType = options.enums === String ? $root.google.firestore.v1beta1.TargetChange.TargetChangeType[message.targetChangeType] : message.targetChangeType; + object.targetChangeType = options.enums === String ? $root.google.firestore.v1beta1.TargetChange.TargetChangeType[message.targetChangeType] === undefined ? message.targetChangeType : $root.google.firestore.v1beta1.TargetChange.TargetChangeType[message.targetChangeType] : message.targetChangeType; if (message.targetIds && message.targetIds.length) { object.targetIds = []; for (var j = 0; j < message.targetIds.length; ++j) @@ -11210,6 +12899,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for TargetChange + * @function getTypeUrl + * @memberof google.firestore.v1beta1.TargetChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.TargetChange"; + }; + /** * TargetChangeType enum. * @name google.firestore.v1beta1.TargetChange.TargetChangeType @@ -11342,6 +13046,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListCollectionIdsRequest + * @function getTypeUrl + * @memberof google.firestore.v1beta1.ListCollectionIdsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCollectionIdsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.ListCollectionIdsRequest"; + }; + return ListCollectionIdsRequest; })(); @@ -11445,8 +13164,23 @@ * @instance * @returns {Object.} JSON object */ - ListCollectionIdsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + ListCollectionIdsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListCollectionIdsResponse + * @function getTypeUrl + * @memberof google.firestore.v1beta1.ListCollectionIdsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListCollectionIdsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.ListCollectionIdsResponse"; }; return ListCollectionIdsResponse; @@ -11584,6 +13318,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BatchWriteRequest + * @function getTypeUrl + * @memberof google.firestore.v1beta1.BatchWriteRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchWriteRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.BatchWriteRequest"; + }; + return BatchWriteRequest; })(); @@ -11706,6 +13455,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for BatchWriteResponse + * @function getTypeUrl + * @memberof google.firestore.v1beta1.BatchWriteResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchWriteResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.BatchWriteResponse"; + }; + return BatchWriteResponse; })(); @@ -11929,6 +13693,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for StructuredQuery + * @function getTypeUrl + * @memberof google.firestore.v1beta1.StructuredQuery + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StructuredQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.StructuredQuery"; + }; + StructuredQuery.CollectionSelector = (function() { /** @@ -12024,6 +13803,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CollectionSelector + * @function getTypeUrl + * @memberof google.firestore.v1beta1.StructuredQuery.CollectionSelector + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CollectionSelector.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.StructuredQuery.CollectionSelector"; + }; + return CollectionSelector; })(); @@ -12163,6 +13957,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Filter + * @function getTypeUrl + * @memberof google.firestore.v1beta1.StructuredQuery.Filter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.StructuredQuery.Filter"; + }; + return Filter; })(); @@ -12221,6 +14030,12 @@ return object; var message = new $root.google.firestore.v1beta1.StructuredQuery.CompositeFilter(); switch (object.op) { + default: + if (typeof object.op === "number") { + message.op = object.op; + break; + } + break; case "OPERATOR_UNSPECIFIED": case 0: message.op = 0; @@ -12261,7 +14076,7 @@ if (options.defaults) object.op = options.enums === String ? "OPERATOR_UNSPECIFIED" : 0; if (message.op != null && message.hasOwnProperty("op")) - object.op = options.enums === String ? $root.google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator[message.op] : message.op; + object.op = options.enums === String ? $root.google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator[message.op] === undefined ? message.op : $root.google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator[message.op] : message.op; if (message.filters && message.filters.length) { object.filters = []; for (var j = 0; j < message.filters.length; ++j) @@ -12281,6 +14096,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CompositeFilter + * @function getTypeUrl + * @memberof google.firestore.v1beta1.StructuredQuery.CompositeFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CompositeFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.StructuredQuery.CompositeFilter"; + }; + /** * Operator enum. * @name google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator @@ -12366,6 +14196,12 @@ message.field = $root.google.firestore.v1beta1.StructuredQuery.FieldReference.fromObject(object.field); } switch (object.op) { + default: + if (typeof object.op === "number") { + message.op = object.op; + break; + } + break; case "OPERATOR_UNSPECIFIED": case 0: message.op = 0; @@ -12440,7 +14276,7 @@ if (message.field != null && message.hasOwnProperty("field")) object.field = $root.google.firestore.v1beta1.StructuredQuery.FieldReference.toObject(message.field, options); if (message.op != null && message.hasOwnProperty("op")) - object.op = options.enums === String ? $root.google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator[message.op] : message.op; + object.op = options.enums === String ? $root.google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator[message.op] === undefined ? message.op : $root.google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator[message.op] : message.op; if (message.value != null && message.hasOwnProperty("value")) object.value = $root.google.firestore.v1beta1.Value.toObject(message.value, options); return object; @@ -12457,6 +14293,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldFilter + * @function getTypeUrl + * @memberof google.firestore.v1beta1.StructuredQuery.FieldFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.StructuredQuery.FieldFilter"; + }; + /** * Operator enum. * @name google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator @@ -12560,6 +14411,12 @@ return object; var message = new $root.google.firestore.v1beta1.StructuredQuery.UnaryFilter(); switch (object.op) { + default: + if (typeof object.op === "number") { + message.op = object.op; + break; + } + break; case "OPERATOR_UNSPECIFIED": case 0: message.op = 0; @@ -12605,7 +14462,7 @@ if (options.defaults) object.op = options.enums === String ? "OPERATOR_UNSPECIFIED" : 0; if (message.op != null && message.hasOwnProperty("op")) - object.op = options.enums === String ? $root.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator[message.op] : message.op; + object.op = options.enums === String ? $root.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator[message.op] === undefined ? message.op : $root.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator[message.op] : message.op; if (message.field != null && message.hasOwnProperty("field")) { object.field = $root.google.firestore.v1beta1.StructuredQuery.FieldReference.toObject(message.field, options); if (options.oneofs) @@ -12625,6 +14482,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for UnaryFilter + * @function getTypeUrl + * @memberof google.firestore.v1beta1.StructuredQuery.UnaryFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UnaryFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.StructuredQuery.UnaryFilter"; + }; + /** * Operator enum. * @name google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator @@ -12728,6 +14600,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldReference + * @function getTypeUrl + * @memberof google.firestore.v1beta1.StructuredQuery.FieldReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.StructuredQuery.FieldReference"; + }; + return FieldReference; })(); @@ -12790,6 +14677,12 @@ message.field = $root.google.firestore.v1beta1.StructuredQuery.FieldReference.fromObject(object.field); } switch (object.direction) { + default: + if (typeof object.direction === "number") { + message.direction = object.direction; + break; + } + break; case "DIRECTION_UNSPECIFIED": case 0: message.direction = 0; @@ -12826,7 +14719,7 @@ if (message.field != null && message.hasOwnProperty("field")) object.field = $root.google.firestore.v1beta1.StructuredQuery.FieldReference.toObject(message.field, options); if (message.direction != null && message.hasOwnProperty("direction")) - object.direction = options.enums === String ? $root.google.firestore.v1beta1.StructuredQuery.Direction[message.direction] : message.direction; + object.direction = options.enums === String ? $root.google.firestore.v1beta1.StructuredQuery.Direction[message.direction] === undefined ? message.direction : $root.google.firestore.v1beta1.StructuredQuery.Direction[message.direction] : message.direction; return object; }; @@ -12841,6 +14734,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Order + * @function getTypeUrl + * @memberof google.firestore.v1beta1.StructuredQuery.Order + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Order.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.StructuredQuery.Order"; + }; + return Order; })(); @@ -12936,6 +14844,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Projection + * @function getTypeUrl + * @memberof google.firestore.v1beta1.StructuredQuery.Projection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Projection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.StructuredQuery.Projection"; + }; + return Projection; })(); @@ -13065,6 +14988,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Cursor + * @function getTypeUrl + * @memberof google.firestore.v1beta1.Cursor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Cursor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.Cursor"; + }; + return Cursor; })(); @@ -13264,6 +15202,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Write + * @function getTypeUrl + * @memberof google.firestore.v1beta1.Write + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Write.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.Write"; + }; + return Write; })(); @@ -13374,6 +15327,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DocumentTransform + * @function getTypeUrl + * @memberof google.firestore.v1beta1.DocumentTransform + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentTransform.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.DocumentTransform"; + }; + DocumentTransform.FieldTransform = (function() { /** @@ -13489,6 +15457,12 @@ if (object.fieldPath != null) message.fieldPath = String(object.fieldPath); switch (object.setToServerValue) { + default: + if (typeof object.setToServerValue === "number") { + message.setToServerValue = object.setToServerValue; + break; + } + break; case "SERVER_VALUE_UNSPECIFIED": case 0: message.setToServerValue = 0; @@ -13544,7 +15518,7 @@ if (message.fieldPath != null && message.hasOwnProperty("fieldPath")) object.fieldPath = message.fieldPath; if (message.setToServerValue != null && message.hasOwnProperty("setToServerValue")) { - object.setToServerValue = options.enums === String ? $root.google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue[message.setToServerValue] : message.setToServerValue; + object.setToServerValue = options.enums === String ? $root.google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue[message.setToServerValue] === undefined ? message.setToServerValue : $root.google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue[message.setToServerValue] : message.setToServerValue; if (options.oneofs) object.transformType = "setToServerValue"; } @@ -13587,6 +15561,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for FieldTransform + * @function getTypeUrl + * @memberof google.firestore.v1beta1.DocumentTransform.FieldTransform + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldTransform.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.DocumentTransform.FieldTransform"; + }; + /** * ServerValue enum. * @name google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue @@ -13717,6 +15706,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WriteResult + * @function getTypeUrl + * @memberof google.firestore.v1beta1.WriteResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WriteResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.WriteResult"; + }; + return WriteResult; })(); @@ -13851,6 +15855,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DocumentChange + * @function getTypeUrl + * @memberof google.firestore.v1beta1.DocumentChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.DocumentChange"; + }; + return DocumentChange; })(); @@ -13976,6 +15995,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DocumentDelete + * @function getTypeUrl + * @memberof google.firestore.v1beta1.DocumentDelete + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentDelete.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.DocumentDelete"; + }; + return DocumentDelete; })(); @@ -14101,6 +16135,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DocumentRemove + * @function getTypeUrl + * @memberof google.firestore.v1beta1.DocumentRemove + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentRemove.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.DocumentRemove"; + }; + return DocumentRemove; })(); @@ -14199,6 +16248,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ExistenceFilter + * @function getTypeUrl + * @memberof google.firestore.v1beta1.ExistenceFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExistenceFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.firestore.v1beta1.ExistenceFilter"; + }; + return ExistenceFilter; })(); @@ -14208,34 +16272,34 @@ return firestore; })(); - google.api = (function() { + google.type = (function() { /** - * Namespace api. + * Namespace type. * @memberof google * @namespace */ - var api = {}; + var type = {}; - api.Http = (function() { + type.LatLng = (function() { /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules + * Properties of a LatLng. + * @memberof google.type + * @interface ILatLng + * @property {number|null} [latitude] LatLng latitude + * @property {number|null} [longitude] LatLng longitude */ /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * Constructs a new LatLng. + * @memberof google.type + * @classdesc Represents a LatLng. + * @implements ILatLng * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.type.ILatLng=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function LatLng(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14243,102 +16307,126 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * LatLng latitude. + * @member {number} latitude + * @memberof google.type.LatLng * @instance */ - Http.prototype.rules = $util.emptyArray; + LatLng.prototype.latitude = 0; /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. + * LatLng longitude. + * @member {number} longitude + * @memberof google.type.LatLng + * @instance + */ + LatLng.prototype.longitude = 0; + + /** + * Creates a LatLng message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.type.LatLng * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.type.LatLng} LatLng */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + LatLng.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.LatLng) return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } + var message = new $root.google.type.LatLng(); + if (object.latitude != null) + message.latitude = Number(object.latitude); + if (object.longitude != null) + message.longitude = Number(object.longitude); return message; }; /** - * Creates a plain object from a Http message. Also converts values to other types if specified. + * Creates a plain object from a LatLng message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.type.LatLng * @static - * @param {google.api.Http} message Http + * @param {google.type.LatLng} message LatLng * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + LatLng.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + if (options.defaults) { + object.latitude = 0; + object.longitude = 0; } + if (message.latitude != null && message.hasOwnProperty("latitude")) + object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; + if (message.longitude != null && message.hasOwnProperty("longitude")) + object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; return object; }; /** - * Converts this Http to JSON. + * Converts this LatLng to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.type.LatLng * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + LatLng.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Http; + /** + * Gets the default type url for LatLng + * @function getTypeUrl + * @memberof google.type.LatLng + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LatLng.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.LatLng"; + }; + + return LatLng; })(); - api.HttpRule = (function() { + return type; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [body] HttpRule body - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details */ /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.rpc.IStatus=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function Status(properties) { + this.details = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14346,229 +16434,176 @@ } /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule + * Status code. + * @member {number} code + * @memberof google.rpc.Status * @instance */ - HttpRule.prototype.body = ""; + Status.prototype.code = 0; /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule + * Status message. + * @member {string} message + * @memberof google.rpc.Status * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + Status.prototype.message = ""; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + Status.prototype.details = $util.emptyArray; /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a Status message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.rpc.Status * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.rpc.Status} Status */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + Status.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Status) return object; - var message = new $root.google.api.HttpRule(); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.selector != null) - message.selector = String(object.selector); - if (object.body != null) - message.body = String(object.body); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); } } return message; }; /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a Status message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.rpc.Status * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.rpc.Status} message Status * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + Status.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.additionalBindings = []; + object.details = []; if (options.defaults) { - object.selector = ""; - object.body = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; + object.code = 0; + object.message = ""; } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); } return object; }; /** - * Converts this HttpRule to JSON. + * Converts this Status to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.rpc.Status * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + Status.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return HttpRule; + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; })(); - api.CustomHttpPattern = (function() { + return rpc; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {string} + * @property {string} FIELD_BEHAVIOR_UNSPECIFIED=FIELD_BEHAVIOR_UNSPECIFIED FIELD_BEHAVIOR_UNSPECIFIED value + * @property {string} OPTIONAL=OPTIONAL OPTIONAL value + * @property {string} REQUIRED=REQUIRED REQUIRED value + * @property {string} OUTPUT_ONLY=OUTPUT_ONLY OUTPUT_ONLY value + * @property {string} INPUT_ONLY=INPUT_ONLY INPUT_ONLY value + * @property {string} IMMUTABLE=IMMUTABLE IMMUTABLE value + * @property {string} UNORDERED_LIST=UNORDERED_LIST UNORDERED_LIST value + * @property {string} NON_EMPTY_DEFAULT=NON_EMPTY_DEFAULT NON_EMPTY_DEFAULT value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = "FIELD_BEHAVIOR_UNSPECIFIED"; + values[valuesById[1] = "OPTIONAL"] = "OPTIONAL"; + values[valuesById[2] = "REQUIRED"] = "REQUIRED"; + values[valuesById[3] = "OUTPUT_ONLY"] = "OUTPUT_ONLY"; + values[valuesById[4] = "INPUT_ONLY"] = "INPUT_ONLY"; + values[valuesById[5] = "IMMUTABLE"] = "IMMUTABLE"; + values[valuesById[6] = "UNORDERED_LIST"] = "UNORDERED_LIST"; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = "NON_EMPTY_DEFAULT"; + return values; + })(); + + api.Http = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a Http. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion */ /** - * Constructs a new CustomHttpPattern. + * Constructs a new Http. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a Http. + * @implements IHttp * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IHttp=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function Http(properties) { + this.rules = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14576,130 +16611,132 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.kind = ""; + Http.prototype.rules = $util.emptyArray; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http * @instance */ - CustomHttpPattern.prototype.path = ""; + Http.prototype.fullyDecodeReservedExpansion = false; /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.Http} Http */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + Http.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; return object; }; /** - * Converts this CustomHttpPattern to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CustomHttpPattern; - })(); + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {string} - * @property {string} FIELD_BEHAVIOR_UNSPECIFIED=FIELD_BEHAVIOR_UNSPECIFIED FIELD_BEHAVIOR_UNSPECIFIED value - * @property {string} OPTIONAL=OPTIONAL OPTIONAL value - * @property {string} REQUIRED=REQUIRED REQUIRED value - * @property {string} OUTPUT_ONLY=OUTPUT_ONLY OUTPUT_ONLY value - * @property {string} INPUT_ONLY=INPUT_ONLY INPUT_ONLY value - * @property {string} IMMUTABLE=IMMUTABLE IMMUTABLE value - * @property {string} UNORDERED_LIST=UNORDERED_LIST UNORDERED_LIST value - * @property {string} NON_EMPTY_DEFAULT=NON_EMPTY_DEFAULT NON_EMPTY_DEFAULT value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = "FIELD_BEHAVIOR_UNSPECIFIED"; - values[valuesById[1] = "OPTIONAL"] = "OPTIONAL"; - values[valuesById[2] = "REQUIRED"] = "REQUIRED"; - values[valuesById[3] = "OUTPUT_ONLY"] = "OUTPUT_ONLY"; - values[valuesById[4] = "INPUT_ONLY"] = "INPUT_ONLY"; - values[valuesById[5] = "IMMUTABLE"] = "IMMUTABLE"; - values[valuesById[6] = "UNORDERED_LIST"] = "UNORDERED_LIST"; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = "NON_EMPTY_DEFAULT"; - return values; + return Http; })(); - api.ResourceDescriptor = (function() { + api.HttpRule = (function() { /** - * Properties of a ResourceDescriptor. + * Properties of a HttpRule. * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings */ /** - * Constructs a new ResourceDescriptor. + * Constructs a new HttpRule. * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor + * @classdesc Represents a HttpRule. + * @implements IHttpRule * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @param {google.api.IHttpRule=} [properties] Properties to set */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; + function HttpRule(properties) { + this.additionalBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14707,232 +16744,257 @@ } /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.type = ""; + HttpRule.prototype.selector = ""; /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + HttpRule.prototype.get = null; /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.nameField = ""; + HttpRule.prototype.custom = null; /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.history = 0; + HttpRule.prototype.body = ""; /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.plural = ""; + HttpRule.prototype.responseBody = ""; /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.singular = ""; + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule * @instance */ - ResourceDescriptor.prototype.style = $util.emptyArray; + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.HttpRule} HttpRule */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } } return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } + if (options.arrays || options.defaults) + object.additionalBindings = []; if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; return object; }; /** - * Converts this ResourceDescriptor to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {string} - * @property {string} HISTORY_UNSPECIFIED=HISTORY_UNSPECIFIED HISTORY_UNSPECIFIED value - * @property {string} ORIGINALLY_SINGLE_PATTERN=ORIGINALLY_SINGLE_PATTERN ORIGINALLY_SINGLE_PATTERN value - * @property {string} FUTURE_MULTI_PATTERN=FUTURE_MULTI_PATTERN FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = "HISTORY_UNSPECIFIED"; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = "ORIGINALLY_SINGLE_PATTERN"; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = "FUTURE_MULTI_PATTERN"; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {string} - * @property {string} STYLE_UNSPECIFIED=STYLE_UNSPECIFIED STYLE_UNSPECIFIED value - * @property {string} DECLARATIVE_FRIENDLY=DECLARATIVE_FRIENDLY DECLARATIVE_FRIENDLY value + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = "STYLE_UNSPECIFIED"; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = "DECLARATIVE_FRIENDLY"; - return values; - })(); + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; - return ResourceDescriptor; + return HttpRule; })(); - api.ResourceReference = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a ResourceReference. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new ResourceReference. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function ResourceReference(properties) { + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14940,109 +17002,119 @@ } /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.type = ""; + CustomHttpPattern.prototype.kind = ""; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - ResourceReference.prototype.childType = ""; + CustomHttpPattern.prototype.path = ""; /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); return message; }; /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + CustomHttpPattern.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.kind = ""; + object.path = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; return object; }; /** - * Converts this ResourceReference to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ResourceReference; - })(); - - return api; - })(); - - google.type = (function() { + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; + return CustomHttpPattern; + })(); - type.LatLng = (function() { + api.ResourceDescriptor = (function() { /** - * Properties of a LatLng. - * @memberof google.type - * @interface ILatLng - * @property {number|null} [latitude] LatLng latitude - * @property {number|null} [longitude] LatLng longitude + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style */ /** - * Constructs a new LatLng. - * @memberof google.type - * @classdesc Represents a LatLng. - * @implements ILatLng + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor * @constructor - * @param {google.type.ILatLng=} [properties] Properties to set + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - function LatLng(properties) { + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15050,111 +17122,257 @@ } /** - * LatLng latitude. - * @member {number} latitude - * @memberof google.type.LatLng + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance */ - LatLng.prototype.latitude = 0; + ResourceDescriptor.prototype.type = ""; /** - * LatLng longitude. - * @member {number} longitude - * @memberof google.type.LatLng + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor * @instance */ - LatLng.prototype.longitude = 0; + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * Creates a LatLng message from a plain object. Also converts values to their respective internal types. + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.type.LatLng + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.type.LatLng} LatLng + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - LatLng.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.LatLng) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) return object; - var message = new $root.google.type.LatLng(); - if (object.latitude != null) - message.latitude = Number(object.latitude); - if (object.longitude != null) - message.longitude = Number(object.longitude); + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } return message; }; /** - * Creates a plain object from a LatLng message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.type.LatLng + * @memberof google.api.ResourceDescriptor * @static - * @param {google.type.LatLng} message LatLng + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LatLng.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } if (options.defaults) { - object.latitude = 0; - object.longitude = 0; + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; } - if (message.latitude != null && message.hasOwnProperty("latitude")) - object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude; - if (message.longitude != null && message.hasOwnProperty("longitude")) - object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude; return object; }; /** - * Converts this LatLng to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.type.LatLng + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - LatLng.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return LatLng; - })(); + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; - return type; - })(); + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {string} + * @property {string} HISTORY_UNSPECIFIED=HISTORY_UNSPECIFIED HISTORY_UNSPECIFIED value + * @property {string} ORIGINALLY_SINGLE_PATTERN=ORIGINALLY_SINGLE_PATTERN ORIGINALLY_SINGLE_PATTERN value + * @property {string} FUTURE_MULTI_PATTERN=FUTURE_MULTI_PATTERN FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = "HISTORY_UNSPECIFIED"; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = "ORIGINALLY_SINGLE_PATTERN"; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = "FUTURE_MULTI_PATTERN"; + return values; + })(); - google.rpc = (function() { + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {string} + * @property {string} STYLE_UNSPECIFIED=STYLE_UNSPECIFIED STYLE_UNSPECIFIED value + * @property {string} DECLARATIVE_FRIENDLY=DECLARATIVE_FRIENDLY DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = "STYLE_UNSPECIFIED"; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = "DECLARATIVE_FRIENDLY"; + return values; + })(); - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; + return ResourceDescriptor; + })(); - rpc.Status = (function() { + api.ResourceReference = (function() { /** - * Properties of a Status. - * @memberof google.rpc - * @interface IStatus - * @property {number|null} [code] Status code - * @property {string|null} [message] Status message - * @property {Array.|null} [details] Status details + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType */ /** - * Constructs a new Status. - * @memberof google.rpc - * @classdesc Represents a Status. - * @implements IStatus + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference * @constructor - * @param {google.rpc.IStatus=} [properties] Properties to set + * @param {google.api.IResourceReference=} [properties] Properties to set */ - function Status(properties) { - this.details = []; + function ResourceReference(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15162,104 +17380,94 @@ } /** - * Status code. - * @member {number} code - * @memberof google.rpc.Status - * @instance - */ - Status.prototype.code = 0; - - /** - * Status message. - * @member {string} message - * @memberof google.rpc.Status + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference * @instance */ - Status.prototype.message = ""; + ResourceReference.prototype.type = ""; /** - * Status details. - * @member {Array.} details - * @memberof google.rpc.Status + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference * @instance */ - Status.prototype.details = $util.emptyArray; + ResourceReference.prototype.childType = ""; /** - * Creates a Status message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.rpc.Status + * @memberof google.api.ResourceReference * @static * @param {Object.} object Plain object - * @returns {google.rpc.Status} Status + * @returns {google.api.ResourceReference} ResourceReference */ - Status.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Status) + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) return object; - var message = new $root.google.rpc.Status(); - if (object.code != null) - message.code = object.code | 0; - if (object.message != null) - message.message = String(object.message); - if (object.details) { - if (!Array.isArray(object.details)) - throw TypeError(".google.rpc.Status.details: array expected"); - message.details = []; - for (var i = 0; i < object.details.length; ++i) { - if (typeof object.details[i] !== "object") - throw TypeError(".google.rpc.Status.details: object expected"); - message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]); - } - } + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); return message; }; /** - * Creates a plain object from a Status message. Also converts values to other types if specified. + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. * @function toObject - * @memberof google.rpc.Status + * @memberof google.api.ResourceReference * @static - * @param {google.rpc.Status} message Status + * @param {google.api.ResourceReference} message ResourceReference * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Status.toObject = function toObject(message, options) { + ResourceReference.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.details = []; if (options.defaults) { - object.code = 0; - object.message = ""; - } - if (message.code != null && message.hasOwnProperty("code")) - object.code = message.code; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - if (message.details && message.details.length) { - object.details = []; - for (var j = 0; j < message.details.length; ++j) - object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + object.type = ""; + object.childType = ""; } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; return object; }; /** - * Converts this Status to JSON. + * Converts this ResourceReference to JSON. * @function toJSON - * @memberof google.rpc.Status + * @memberof google.api.ResourceReference * @instance * @returns {Object.} JSON object */ - Status.prototype.toJSON = function toJSON() { + ResourceReference.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return Status; + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; })(); - return rpc; + return api; })(); google.longrunning = (function() { @@ -15621,6 +17829,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for Operation + * @function getTypeUrl + * @memberof google.longrunning.Operation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.Operation"; + }; + return Operation; })(); @@ -15704,6 +17927,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for GetOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.GetOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.GetOperationRequest"; + }; + return GetOperationRequest; })(); @@ -15830,6 +18068,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsRequest + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsRequest"; + }; + return ListOperationsRequest; })(); @@ -15940,6 +18193,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for ListOperationsResponse + * @function getTypeUrl + * @memberof google.longrunning.ListOperationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.ListOperationsResponse"; + }; + return ListOperationsResponse; })(); @@ -16023,6 +18291,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for CancelOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.CancelOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.CancelOperationRequest"; + }; + return CancelOperationRequest; })(); @@ -16106,6 +18389,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for DeleteOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.DeleteOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest"; + }; + return DeleteOperationRequest; })(); @@ -16207,6 +18505,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for WaitOperationRequest + * @function getTypeUrl + * @memberof google.longrunning.WaitOperationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.WaitOperationRequest"; + }; + return WaitOperationRequest; })(); @@ -16305,6 +18618,21 @@ return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + /** + * Gets the default type url for OperationInfo + * @function getTypeUrl + * @memberof google.longrunning.OperationInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.longrunning.OperationInfo"; + }; + return OperationInfo; })(); diff --git a/dev/protos/google/api/resource.proto b/dev/protos/google/api/resource.proto index 0ce0344f5..2dfff1590 100644 --- a/dev/protos/google/api/resource.proto +++ b/dev/protos/google/api/resource.proto @@ -57,7 +57,11 @@ extend google.protobuf.MessageOptions { // // For Kubernetes resources, the format is {api group}/{kind}. // option (google.api.resource) = { // type: "pubsub.googleapis.com/Topic" -// pattern: "projects/{project}/topics/{topic}" +// name_descriptor: { +// pattern: "projects/{project}/topics/{topic}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// parent_name_extractor: "projects/{project}" +// } // }; // } // @@ -65,7 +69,10 @@ extend google.protobuf.MessageOptions { // // resources: // - type: "pubsub.googleapis.com/Topic" -// pattern: "projects/{project}/topics/{topic}" +// name_descriptor: +// - pattern: "projects/{project}/topics/{topic}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// parent_name_extractor: "projects/{project}" // // Sometimes, resources have multiple patterns, typically because they can // live under multiple parents. @@ -75,10 +82,26 @@ extend google.protobuf.MessageOptions { // message LogEntry { // option (google.api.resource) = { // type: "logging.googleapis.com/LogEntry" -// pattern: "projects/{project}/logs/{log}" -// pattern: "folders/{folder}/logs/{log}" -// pattern: "organizations/{organization}/logs/{log}" -// pattern: "billingAccounts/{billing_account}/logs/{log}" +// name_descriptor: { +// pattern: "projects/{project}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// parent_name_extractor: "projects/{project}" +// } +// name_descriptor: { +// pattern: "folders/{folder}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Folder" +// parent_name_extractor: "folders/{folder}" +// } +// name_descriptor: { +// pattern: "organizations/{organization}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Organization" +// parent_name_extractor: "organizations/{organization}" +// } +// name_descriptor: { +// pattern: "billingAccounts/{billing_account}/logs/{log}" +// parent_type: "billing.googleapis.com/BillingAccount" +// parent_name_extractor: "billingAccounts/{billing_account}" +// } // }; // } // @@ -86,10 +109,48 @@ extend google.protobuf.MessageOptions { // // resources: // - type: 'logging.googleapis.com/LogEntry' -// pattern: "projects/{project}/logs/{log}" -// pattern: "folders/{folder}/logs/{log}" -// pattern: "organizations/{organization}/logs/{log}" -// pattern: "billingAccounts/{billing_account}/logs/{log}" +// name_descriptor: +// - pattern: "projects/{project}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// parent_name_extractor: "projects/{project}" +// - pattern: "folders/{folder}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Folder" +// parent_name_extractor: "folders/{folder}" +// - pattern: "organizations/{organization}/logs/{log}" +// parent_type: "cloudresourcemanager.googleapis.com/Organization" +// parent_name_extractor: "organizations/{organization}" +// - pattern: "billingAccounts/{billing_account}/logs/{log}" +// parent_type: "billing.googleapis.com/BillingAccount" +// parent_name_extractor: "billingAccounts/{billing_account}" +// +// For flexible resources, the resource name doesn't contain parent names, but +// the resource itself has parents for policy evaluation. +// +// Example: +// +// message Shelf { +// option (google.api.resource) = { +// type: "library.googleapis.com/Shelf" +// name_descriptor: { +// pattern: "shelves/{shelf}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// } +// name_descriptor: { +// pattern: "shelves/{shelf}" +// parent_type: "cloudresourcemanager.googleapis.com/Folder" +// } +// }; +// } +// +// The ResourceDescriptor Yaml config will look like: +// +// resources: +// - type: 'library.googleapis.com/Shelf' +// name_descriptor: +// - pattern: "shelves/{shelf}" +// parent_type: "cloudresourcemanager.googleapis.com/Project" +// - pattern: "shelves/{shelf}" +// parent_type: "cloudresourcemanager.googleapis.com/Folder" message ResourceDescriptor { // A description of the historical or future-looking state of the // resource pattern. diff --git a/dev/protos/google/firestore/admin/v1/firestore_admin.proto b/dev/protos/google/firestore/admin/v1/firestore_admin.proto index c493673ae..23d3218ab 100644 --- a/dev/protos/google/firestore/admin/v1/firestore_admin.proto +++ b/dev/protos/google/firestore/admin/v1/firestore_admin.proto @@ -203,6 +203,19 @@ 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) = { @@ -245,6 +258,31 @@ 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. + // + // This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + // with first character a letter and the last a letter or a number. Must not + // be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + // + // "(default)" database id is also valid. + string database_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + // The list of databases for a project. message ListDatabasesResponse { // The databases in the project. diff --git a/dev/protos/google/firestore/v1/firestore.proto b/dev/protos/google/firestore/v1/firestore.proto index 8bac56a3d..0e66c76df 100644 --- a/dev/protos/google/firestore/v1/firestore.proto +++ b/dev/protos/google/firestore/v1/firestore.proto @@ -19,6 +19,7 @@ package google.firestore.v1; import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; +import "google/firestore/v1/aggregation_result.proto"; import "google/firestore/v1/common.proto"; import "google/firestore/v1/document.proto"; import "google/firestore/v1/query.proto"; @@ -135,6 +136,29 @@ service Firestore { }; } + // Runs an aggregation query. + // + // Rather than producing [Document][google.firestore.v1.Document] results like [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], + // this API allows running an aggregation to produce a series of + // [AggregationResult][google.firestore.v1.AggregationResult] server-side. + // + // High-Level Example: + // + // ``` + // -- Return the number of documents in table given a filter. + // SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); + // ``` + rpc RunAggregationQuery(RunAggregationQueryRequest) returns (stream RunAggregationQueryResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery" + body: "*" + additional_bindings { + post: "/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery" + body: "*" + } + }; + } + // Partitions a query by returning partition cursors that can be used to run // the query in parallel. The returned partition cursors are split points that // can be used by RunQuery as starting/end points for the query results. @@ -534,6 +558,62 @@ message RunQueryResponse { } } +// The request for [Firestore.RunAggregationQuery][google.firestore.v1.Firestore.RunAggregationQuery]. +message RunAggregationQueryRequest { + // Required. The parent resource name. In the format: + // `projects/{project_id}/databases/{database_id}/documents` or + // `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + // For example: + // `projects/my-project/databases/my-database/documents` or + // `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // The query to run. + oneof query_type { + // An aggregation query. + StructuredAggregationQuery structured_aggregation_query = 2; + } + + // The consistency mode for the query, defaults to strong consistency. + oneof consistency_selector { + // Run the aggregation within an already active transaction. + // + // The value here is the opaque transaction ID to execute the query in. + bytes transaction = 4; + + // Starts a new transaction as part of the query, defaulting to read-only. + // + // The new transaction ID will be returned as the first response in the + // stream. + TransactionOptions new_transaction = 5; + + // Executes the query at the given timestamp. + // + // Requires: + // + // * Cannot be more than 270 seconds in the past. + google.protobuf.Timestamp read_time = 6; + } +} + +// The response for [Firestore.RunAggregationQuery][google.firestore.v1.Firestore.RunAggregationQuery]. +message RunAggregationQueryResponse { + // A single aggregation result. + // + // Not present when reporting partial progress or when the query produced + // zero results. + AggregationResult result = 1; + + // The transaction that was started as part of this request. + // + // Only present on the first response when the request requested to start + // a new transaction. + bytes transaction = 2; + + // The time at which the aggregate value is valid for. + google.protobuf.Timestamp read_time = 3; +} + // The request for [Firestore.PartitionQuery][google.firestore.v1.Firestore.PartitionQuery]. message PartitionQueryRequest { // Required. The parent resource name. In the format: diff --git a/dev/protos/google/firestore/v1/query.proto b/dev/protos/google/firestore/v1/query.proto index b85d8ce23..59e5f9e6b 100644 --- a/dev/protos/google/firestore/v1/query.proto +++ b/dev/protos/google/firestore/v1/query.proto @@ -67,6 +67,9 @@ message StructuredQuery { // Documents are required to satisfy all of the combined filters. AND = 1; + + // Documents are required to satisfy at least one of the combined filters. + OR = 2; } // The operator for combining multiple filters. @@ -292,6 +295,90 @@ message StructuredQuery { google.protobuf.Int32Value limit = 5; } +// Firestore query for running an aggregation over a [StructuredQuery][google.firestore.v1.StructuredQuery]. +message StructuredAggregationQuery { + // Defines a aggregation that produces a single result. + message Aggregation { + // Count of documents that match the query. + // + // The `COUNT(*)` aggregation function operates on the entire document + // so it does not require a field reference. + message Count { + // Optional. Optional constraint on the maximum number of documents to count. + // + // This provides a way to set an upper bound on the number of documents + // to scan, limiting latency and cost. + // + // Unspecified is interpreted as no bound. + // + // High-Level Example: + // + // ``` + // AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + // ``` + // + // Requires: + // + // * Must be greater than zero when present. + google.protobuf.Int64Value up_to = 1 [(google.api.field_behavior) = OPTIONAL]; + } + + // The type of aggregation to perform, required. + oneof operator { + // Count aggregator. + Count count = 1; + } + + // Optional. Optional name of the field to store the result of the aggregation into. + // + // If not provided, Firestore will pick a default name following the format + // `field_`. For example: + // + // ``` + // AGGREGATE + // COUNT_UP_TO(1) AS count_up_to_1, + // COUNT_UP_TO(2), + // COUNT_UP_TO(3) AS count_up_to_3, + // COUNT_UP_TO(4) + // OVER ( + // ... + // ); + // ``` + // + // becomes: + // + // ``` + // AGGREGATE + // COUNT_UP_TO(1) AS count_up_to_1, + // COUNT_UP_TO(2) AS field_1, + // COUNT_UP_TO(3) AS count_up_to_3, + // COUNT_UP_TO(4) AS field_2 + // OVER ( + // ... + // ); + // ``` + // + // Requires: + // + // * Must be unique across all aggregation aliases. + // * Conform to [document field name][google.firestore.v1.Document.fields] limitations. + string alias = 7 [(google.api.field_behavior) = OPTIONAL]; + } + + // The base query to aggregate over. + oneof query_type { + // Nested structured query. + StructuredQuery structured_query = 1; + } + + // Optional. Series of aggregations to apply over the results of the `structured_query`. + // + // Requires: + // + // * A minimum of one and maximum of five aggregations per query. + repeated Aggregation aggregations = 3 [(google.api.field_behavior) = OPTIONAL]; +} + // A position in a query result set. message Cursor { // The values that represent a position, in the order they appear in diff --git a/dev/protos/update.sh b/dev/protos/update.sh index 828c22a96..5764c422e 100755 --- a/dev/protos/update.sh +++ b/dev/protos/update.sh @@ -38,7 +38,7 @@ PBTS="$(npm bin)/pbts" pushd "$WORK_DIR" # Clone necessary git repos. -git clone --depth 1 https://github.com/googleapis/googleapis.git +git clone -b preview --depth 1 https://github.com/googleapis/googleapis.git git clone --depth 1 https://github.com/google/protobuf.git # Copy necessary protos. @@ -71,7 +71,7 @@ cp googleapis/google/type/latlng.proto \ "${PROTOS_DIR}/google/type/" mkdir -p "${PROTOS_DIR}/google/protobuf" -cp protobuf/src/google/protobuf/{any,empty,field_mask,struct,timestamp,wrappers}.proto \ +cp protobuf/src/google/protobuf/{any,descriptor,empty,field_mask,struct,timestamp,wrappers}.proto \ "${PROTOS_DIR}/google/protobuf/" popd diff --git a/dev/protos/v1.json b/dev/protos/v1.json index 0a3da77b4..448de691f 100644 --- a/dev/protos/v1.json +++ b/dev/protos/v1.json @@ -3,6 +3,15 @@ "google": { "nested": { "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": { "Timestamp": { "fields": { @@ -79,6 +88,93 @@ } } }, + "Empty": { + "fields": {} + }, + "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 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, "FileDescriptorSet": { "fields": { "file": { @@ -150,6 +246,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -214,6 +314,10 @@ "end": { "type": "int32", "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 } } }, @@ -231,6 +335,21 @@ } } }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, "FieldDescriptorProto": { "fields": { "name": { @@ -272,6 +391,10 @@ "options": { "type": "FieldOptions", "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 } }, "nested": { @@ -332,6 +455,30 @@ "options": { "type": "EnumOptions", "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } } } }, @@ -388,11 +535,17 @@ }, "clientStreaming": { "type": "bool", - "id": 5 + "id": 5, + "options": { + "default": false + } }, "serverStreaming": { "type": "bool", - "id": 6 + "id": 6, + "options": { + "default": false + } } } }, @@ -408,7 +561,10 @@ }, "javaMultipleFiles": { "type": "bool", - "id": 10 + "id": 10, + "options": { + "default": false + } }, "javaGenerateEqualsAndHash": { "type": "bool", @@ -419,7 +575,10 @@ }, "javaStringCheckUtf8": { "type": "bool", - "id": 27 + "id": 27, + "options": { + "default": false + } }, "optimizeFor": { "type": "OptimizeMode", @@ -434,23 +593,45 @@ }, "ccGenericServices": { "type": "bool", - "id": 16 + "id": 16, + "options": { + "default": false + } }, "javaGenericServices": { "type": "bool", - "id": 17 + "id": 17, + "options": { + "default": false + } }, "pyGenericServices": { "type": "bool", - "id": 18 + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } }, "deprecated": { "type": "bool", - "id": 23 + "id": 23, + "options": { + "default": false + } }, "ccEnableArenas": { "type": "bool", - "id": 31 + "id": 31, + "options": { + "default": true + } }, "objcClassPrefix": { "type": "string", @@ -460,6 +641,26 @@ "type": "string", "id": 37 }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -492,15 +693,24 @@ "fields": { "messageSetWireFormat": { "type": "bool", - "id": 1 + "id": 1, + "options": { + "default": false + } }, "noStandardDescriptorAccessor": { "type": "bool", - "id": 2 + "id": 2, + "options": { + "default": false + } }, "deprecated": { "type": "bool", - "id": 3 + "id": 3, + "options": { + "default": false + } }, "mapEntry": { "type": "bool", @@ -519,9 +729,25 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 + ], + [ + 9, + 9 ] ] }, @@ -547,15 +773,31 @@ }, "lazy": { "type": "bool", - "id": 5 + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } }, "deprecated": { "type": "bool", - "id": 3 + "id": 3, + "options": { + "default": false + } }, "weak": { "type": "bool", - "id": 10 + "id": 10, + "options": { + "default": false + } }, "uninterpretedOption": { "rule": "repeated", @@ -615,7 +857,10 @@ }, "deprecated": { "type": "bool", - "id": 3 + "id": 3, + "options": { + "default": false + } }, "uninterpretedOption": { "rule": "repeated", @@ -628,13 +873,22 @@ 1000, 536870911 ] + ], + "reserved": [ + [ + 5, + 5 + ] ] }, "EnumValueOptions": { "fields": { "deprecated": { "type": "bool", - "id": 1 + "id": 1, + "options": { + "default": false + } }, "uninterpretedOption": { "rule": "repeated", @@ -653,7 +907,10 @@ "fields": { "deprecated": { "type": "bool", - "id": 33 + "id": 33, + "options": { + "default": false + } }, "uninterpretedOption": { "rule": "repeated", @@ -672,7 +929,17 @@ "fields": { "deprecated": { "type": "bool", - "id": 33 + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } }, "uninterpretedOption": { "rule": "repeated", @@ -685,7 +952,16 @@ 1000, 536870911 ] - ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } }, "UninterpretedOption": { "fields": { @@ -801,98 +1077,24 @@ "end": { "type": "int32", "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } } } } } }, - "Empty": { - "fields": {} - }, - "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 - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, "FieldMask": { "fields": { "paths": { @@ -918,6 +1120,15 @@ "ruby_package": "Google::Cloud::Firestore::V1" }, "nested": { + "AggregationResult": { + "fields": { + "aggregateFields": { + "keyType": "string", + "type": "Value", + "id": 2 + } + } + }, "DocumentMask": { "fields": { "fieldPaths": { @@ -1272,6 +1483,29 @@ } ] }, + "RunAggregationQuery": { + "requestType": "RunAggregationQueryRequest", + "responseType": "RunAggregationQueryResponse", + "responseStream": true, + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery", + "body": "*", + "additional_bindings": { + "post": "/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery", + "body": "*" + } + } + } + ] + }, "PartitionQuery": { "requestType": "PartitionQueryRequest", "responseType": "PartitionQueryResponse", @@ -1731,46 +1965,103 @@ }, "transaction": { "type": "bytes", - "id": 5 + "id": 5 + }, + "newTransaction": { + "type": "TransactionOptions", + "id": 6 + }, + "readTime": { + "type": "google.protobuf.Timestamp", + "id": 7 + } + } + }, + "RunQueryResponse": { + "oneofs": { + "continuationSelector": { + "oneof": [ + "done" + ] + } + }, + "fields": { + "transaction": { + "type": "bytes", + "id": 2 + }, + "document": { + "type": "Document", + "id": 1 + }, + "readTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "skippedResults": { + "type": "int32", + "id": 4 + }, + "done": { + "type": "bool", + "id": 6 + } + } + }, + "RunAggregationQueryRequest": { + "oneofs": { + "queryType": { + "oneof": [ + "structuredAggregationQuery" + ] + }, + "consistencySelector": { + "oneof": [ + "transaction", + "newTransaction", + "readTime" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "structuredAggregationQuery": { + "type": "StructuredAggregationQuery", + "id": 2 + }, + "transaction": { + "type": "bytes", + "id": 4 }, "newTransaction": { "type": "TransactionOptions", - "id": 6 + "id": 5 }, "readTime": { "type": "google.protobuf.Timestamp", - "id": 7 + "id": 6 } } }, - "RunQueryResponse": { - "oneofs": { - "continuationSelector": { - "oneof": [ - "done" - ] - } - }, + "RunAggregationQueryResponse": { "fields": { + "result": { + "type": "AggregationResult", + "id": 1 + }, "transaction": { "type": "bytes", "id": 2 }, - "document": { - "type": "Document", - "id": 1 - }, "readTime": { "type": "google.protobuf.Timestamp", "id": 3 - }, - "skippedResults": { - "type": "int32", - "id": 4 - }, - "done": { - "type": "bool", - "id": 6 } } }, @@ -2224,7 +2515,8 @@ "Operator": { "values": { "OPERATOR_UNSPECIFIED": 0, - "AND": 1 + "AND": 1, + "OR": 2 } } } @@ -2330,6 +2622,66 @@ } } }, + "StructuredAggregationQuery": { + "oneofs": { + "queryType": { + "oneof": [ + "structuredQuery" + ] + } + }, + "fields": { + "structuredQuery": { + "type": "StructuredQuery", + "id": 1 + }, + "aggregations": { + "rule": "repeated", + "type": "Aggregation", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Aggregation": { + "oneofs": { + "operator": { + "oneof": [ + "count" + ] + } + }, + "fields": { + "count": { + "type": "Count", + "id": 1 + }, + "alias": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Count": { + "fields": { + "upTo": { + "type": "google.protobuf.Int64Value", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + } + } + }, "Cursor": { "fields": { "values": { @@ -2529,6 +2881,59 @@ } } }, + "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 + } + } + } + } + }, "api": { "options": { "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", @@ -2544,12 +2949,50 @@ "id": 72295728, "extend": "google.protobuf.MethodOptions" }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, "Http": { "fields": { "rules": { "rule": "repeated", "type": "HttpRule", "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 } } }, @@ -2567,6 +3010,10 @@ } }, "fields": { + "selector": { + "type": "string", + "id": 1 + }, "get": { "type": "string", "id": 2 @@ -2591,14 +3038,14 @@ "type": "CustomHttpPattern", "id": 8 }, - "selector": { - "type": "string", - "id": 1 - }, "body": { "type": "string", "id": 7 }, + "responseBody": { + "type": "string", + "id": 12 + }, "additionalBindings": { "rule": "repeated", "type": "HttpRule", @@ -2618,40 +3065,6 @@ } } }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7 - } - }, "resourceReference": { "type": "google.api.ResourceReference", "id": 1055, @@ -2730,59 +3143,6 @@ } } } - }, - "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 - } - } - } - } } } } diff --git a/dev/protos/v1_admin.json b/dev/protos/v1_admin.json index 2d6c481ab..302935b91 100644 --- a/dev/protos/v1_admin.json +++ b/dev/protos/v1_admin.json @@ -2,1306 +2,351 @@ "nested": { "google": { "nested": { - "firestore": { + "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": { - "admin": { - "nested": { - "v1": { + "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 + } + } + }, + "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": { - "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 - } - } - } + "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 + }, + "edition": { + "type": "string", + "id": 13 + } + } + }, + "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 }, - "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 - } - } - } - } - } + "end": { + "type": "int32", + "id": 2 }, - "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" - } - } - } + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 }, - "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" - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - } - } - }, - "protobuf": { - "nested": { - "FileDescriptorSet": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "FileDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - } - } - }, - "DescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "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 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "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 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 }, "end": { "type": "int32", @@ -1311,110 +356,6 @@ } } }, - "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": { @@ -1468,11 +409,17 @@ }, "clientStreaming": { "type": "bool", - "id": 5 + "id": 5, + "options": { + "default": false + } }, "serverStreaming": { "type": "bool", - "id": 6 + "id": 6, + "options": { + "default": false + } } } }, @@ -1488,7 +435,10 @@ }, "javaMultipleFiles": { "type": "bool", - "id": 10 + "id": 10, + "options": { + "default": false + } }, "javaGenerateEqualsAndHash": { "type": "bool", @@ -1499,7 +449,10 @@ }, "javaStringCheckUtf8": { "type": "bool", - "id": 27 + "id": 27, + "options": { + "default": false + } }, "optimizeFor": { "type": "OptimizeMode", @@ -1514,23 +467,45 @@ }, "ccGenericServices": { "type": "bool", - "id": 16 + "id": 16, + "options": { + "default": false + } }, "javaGenericServices": { "type": "bool", - "id": 17 + "id": 17, + "options": { + "default": false + } }, "pyGenericServices": { "type": "bool", - "id": 18 + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } }, "deprecated": { "type": "bool", - "id": 23 + "id": 23, + "options": { + "default": false + } }, "ccEnableArenas": { "type": "bool", - "id": 31 + "id": 31, + "options": { + "default": true + } }, "objcClassPrefix": { "type": "string", @@ -1540,6 +515,26 @@ "type": "string", "id": 37 }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -1572,15 +567,24 @@ "fields": { "messageSetWireFormat": { "type": "bool", - "id": 1 + "id": 1, + "options": { + "default": false + } }, "noStandardDescriptorAccessor": { "type": "bool", - "id": 2 + "id": 2, + "options": { + "default": false + } }, "deprecated": { "type": "bool", - "id": 3 + "id": 3, + "options": { + "default": false + } }, "mapEntry": { "type": "bool", @@ -1599,9 +603,25 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 + ], + [ + 9, + 9 ] ] }, @@ -1627,15 +647,31 @@ }, "lazy": { "type": "bool", - "id": 5 + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } }, "deprecated": { "type": "bool", - "id": 3 + "id": 3, + "options": { + "default": false + } }, "weak": { "type": "bool", - "id": 10 + "id": 10, + "options": { + "default": false + } }, "uninterpretedOption": { "rule": "repeated", @@ -1687,15 +723,68 @@ ] ] }, - "EnumOptions": { + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, "deprecated": { "type": "bool", - "id": 3 + "id": 33, + "options": { + "default": false + } }, "uninterpretedOption": { "rule": "repeated", @@ -1710,11 +799,21 @@ ] ] }, - "EnumValueOptions": { + "MethodOptions": { "fields": { "deprecated": { "type": "bool", - "id": 1 + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } }, "uninterpretedOption": { "rule": "repeated", @@ -1727,345 +826,1300 @@ 1000, 536870911 ] - ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } }, - "ServiceOptions": { + "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 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 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": { - "deprecated": { - "type": "bool", - "id": 33 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 + "value": { + "type": "uint32", + "id": 1 } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] + } }, - "MethodOptions": { + "BoolValue": { "fields": { - "deprecated": { + "value": { "type": "bool", - "id": 33 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 + "id": 1 } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] + } }, - "UninterpretedOption": { + "StringValue": { "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifierValue": { + "value": { "type": "string", - "id": 3 - }, - "positiveIntValue": { - "type": "uint64", - "id": 4 - }, - "negativeIntValue": { - "type": "int64", - "id": 5 - }, - "doubleValue": { - "type": "double", - "id": 6 - }, - "stringValue": { + "id": 1 + } + } + }, + "BytesValue": { + "fields": { + "value": { "type": "bytes", - "id": 7 + "id": 1 + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 }, - "aggregateValue": { - "type": "string", - "id": 8 + "nanos": { + "type": "int32", + "id": 2 } - }, + } + } + } + }, + "firestore": { + "nested": { + "admin": { "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 + "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" + } + } + ] + }, + "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", + "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" + } + } + ] + } + } }, - "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 + "ListDatabasesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "firestore.googleapis.com/Database" + } + } + } + }, + "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" + } + } + } + }, + "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 + } + } }, - "span": { - "rule": "repeated", - "type": "int32", - "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 + } + } }, - "leadingComments": { - "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 + } + } }, - "trailingComments": { - "type": "string", - "id": 4 + "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 + } + } + } }, - "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 + "LocationMetadata": { + "fields": {} }, - "sourceFile": { - "type": "string", - "id": 2 + "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 + } + } + } + } + } }, - "begin": { - "type": "int32", - "id": 3 + "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 + } + } }, - "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 + "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 + } + } + } + } } } } @@ -2124,6 +2178,216 @@ } } }, + "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" + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "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 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "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 + } + } + } + } + }, "longrunning": { "options": { "cc_enable_arenas": true, diff --git a/dev/protos/v1beta1.json b/dev/protos/v1beta1.json index 977d7f72a..f9a1268fa 100644 --- a/dev/protos/v1beta1.json +++ b/dev/protos/v1beta1.json @@ -3,6 +3,15 @@ "google": { "nested": { "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": { "Timestamp": { "fields": { @@ -16,6 +25,156 @@ } } }, + "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 + } + } + }, + "Empty": { + "fields": {} + }, + "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 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, "FileDescriptorSet": { "fields": { "file": { @@ -87,6 +246,10 @@ "syntax": { "type": "string", "id": 12 + }, + "edition": { + "type": "string", + "id": 13 } } }, @@ -151,6 +314,10 @@ "end": { "type": "int32", "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 } } }, @@ -168,6 +335,21 @@ } } }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, "FieldDescriptorProto": { "fields": { "name": { @@ -209,6 +391,10 @@ "options": { "type": "FieldOptions", "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 } }, "nested": { @@ -269,6 +455,30 @@ "options": { "type": "EnumOptions", "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } } } }, @@ -325,11 +535,17 @@ }, "clientStreaming": { "type": "bool", - "id": 5 + "id": 5, + "options": { + "default": false + } }, "serverStreaming": { "type": "bool", - "id": 6 + "id": 6, + "options": { + "default": false + } } } }, @@ -345,7 +561,10 @@ }, "javaMultipleFiles": { "type": "bool", - "id": 10 + "id": 10, + "options": { + "default": false + } }, "javaGenerateEqualsAndHash": { "type": "bool", @@ -356,7 +575,10 @@ }, "javaStringCheckUtf8": { "type": "bool", - "id": 27 + "id": 27, + "options": { + "default": false + } }, "optimizeFor": { "type": "OptimizeMode", @@ -371,23 +593,45 @@ }, "ccGenericServices": { "type": "bool", - "id": 16 + "id": 16, + "options": { + "default": false + } }, "javaGenericServices": { "type": "bool", - "id": 17 + "id": 17, + "options": { + "default": false + } }, "pyGenericServices": { "type": "bool", - "id": 18 + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } }, "deprecated": { "type": "bool", - "id": 23 + "id": 23, + "options": { + "default": false + } }, "ccEnableArenas": { "type": "bool", - "id": 31 + "id": 31, + "options": { + "default": true + } }, "objcClassPrefix": { "type": "string", @@ -397,6 +641,26 @@ "type": "string", "id": 37 }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, "uninterpretedOption": { "rule": "repeated", "type": "UninterpretedOption", @@ -429,15 +693,24 @@ "fields": { "messageSetWireFormat": { "type": "bool", - "id": 1 + "id": 1, + "options": { + "default": false + } }, "noStandardDescriptorAccessor": { "type": "bool", - "id": 2 + "id": 2, + "options": { + "default": false + } }, "deprecated": { "type": "bool", - "id": 3 + "id": 3, + "options": { + "default": false + } }, "mapEntry": { "type": "bool", @@ -456,9 +729,25 @@ ] ], "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], [ 8, 8 + ], + [ + 9, + 9 ] ] }, @@ -484,15 +773,31 @@ }, "lazy": { "type": "bool", - "id": 5 + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } }, "deprecated": { "type": "bool", - "id": 3 + "id": 3, + "options": { + "default": false + } }, "weak": { "type": "bool", - "id": 10 + "id": 10, + "options": { + "default": false + } }, "uninterpretedOption": { "rule": "repeated", @@ -552,7 +857,10 @@ }, "deprecated": { "type": "bool", - "id": 3 + "id": 3, + "options": { + "default": false + } }, "uninterpretedOption": { "rule": "repeated", @@ -565,13 +873,22 @@ 1000, 536870911 ] + ], + "reserved": [ + [ + 5, + 5 + ] ] }, "EnumValueOptions": { "fields": { "deprecated": { "type": "bool", - "id": 1 + "id": 1, + "options": { + "default": false + } }, "uninterpretedOption": { "rule": "repeated", @@ -590,7 +907,10 @@ "fields": { "deprecated": { "type": "bool", - "id": 33 + "id": 33, + "options": { + "default": false + } }, "uninterpretedOption": { "rule": "repeated", @@ -609,7 +929,17 @@ "fields": { "deprecated": { "type": "bool", - "id": 33 + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } }, "uninterpretedOption": { "rule": "repeated", @@ -622,7 +952,16 @@ 1000, 536870911 ] - ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } }, "UninterpretedOption": { "fields": { @@ -687,209 +1026,72 @@ "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 - } - } - } - } - }, - "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 - } - } - }, - "Empty": { - "fields": {} - }, - "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 + "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 + } + } } } }, - "BytesValue": { + "GeneratedCodeInfo": { "fields": { - "value": { - "type": "bytes", + "annotation": { + "rule": "repeated", + "type": "Annotation", "id": 1 } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 + }, + "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 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } } } }, @@ -2494,6 +2696,59 @@ } } }, + "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 + } + } + } + } + }, "api": { "options": { "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", @@ -2509,12 +2764,50 @@ "id": 72295728, "extend": "google.protobuf.MethodOptions" }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7 + } + }, "Http": { "fields": { "rules": { "rule": "repeated", "type": "HttpRule", "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 } } }, @@ -2532,6 +2825,10 @@ } }, "fields": { + "selector": { + "type": "string", + "id": 1 + }, "get": { "type": "string", "id": 2 @@ -2556,14 +2853,14 @@ "type": "CustomHttpPattern", "id": 8 }, - "selector": { - "type": "string", - "id": 1 - }, "body": { "type": "string", "id": 7 }, + "responseBody": { + "type": "string", + "id": 12 + }, "additionalBindings": { "rule": "repeated", "type": "HttpRule", @@ -2583,40 +2880,6 @@ } } }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7 - } - }, "resourceReference": { "type": "google.api.ResourceReference", "id": 1055, @@ -2695,59 +2958,6 @@ } } } - }, - "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 - } - } - } - } } } }