From 5c0df9459dd20973f420d14109ce402e8c401fbe Mon Sep 17 00:00:00 2001 From: Santi Quiroga Date: Tue, 13 Oct 2026 11:04:41 +0000 Subject: [PATCH 1/2] fix(firestore,pubsub): align types and proto re-exports with -api packages ## Description Align handwritten `@google-cloud/firestore` type declarations and `@google-cloud/pubsub` proto re-exports with their underlying workspace `-api` packages (`@google-cloud/firestore-api` and `@google-cloud/pubsub-api`). ## Impact Eliminates cross-package type declaration drift and duplicate static protobuf definitions between handwritten veneer packages and their generated `-api` packages, unblocking workspace dependency linking (`Part 1 of 2` in the internal dependency floor stack). ## Changes - Update `handwritten/firestore/types/firestore.d.ts` so `FirebaseFirestore.v1beta1` references the local `./v1beta1/firestore_client` `FirestoreClient` declaration rather than a non-existent `v1beta1` export on `@google-cloud/firestore-api`. - Replace the duplicate static protobuf bundle in `handwritten/pubsub/protos/protos.js` and `handwritten/pubsub/protos/protos.d.ts` with direct re-exports from `@google-cloud/pubsub-api/build/protos/protos`. ## Testing - Compiled `handwritten/firestore` and `handwritten/pubsub` cleanly with zero TypeScript errors. - Verified strict repository linter checks (`GIT_DIFF_ARG=origin/main node ./bin/linter.mjs --strict`). ## Alternatives - Maintaining duplicate static protobuf code and out-of-sync `.d.ts` exports in `handwritten/firestore` and `handwritten/pubsub` was rejected because it causes TypeScript compilation failures when workspace packages link to current `-api` packages. --- handwritten/firestore/types/firestore.d.ts | 4 +- handwritten/pubsub/protos/protos.d.ts | 18952 +------ handwritten/pubsub/protos/protos.js | 52829 +------------------ 3 files changed, 7 insertions(+), 71778 deletions(-) diff --git a/handwritten/firestore/types/firestore.d.ts b/handwritten/firestore/types/firestore.d.ts index 6cadd2e970fb..8cbae7618e68 100644 --- a/handwritten/firestore/types/firestore.d.ts +++ b/handwritten/firestore/types/firestore.d.ts @@ -3168,7 +3168,9 @@ declare namespace FirebaseFirestore { * Firestore v1beta1 RPCs. * @deprecated Prefer the v1 client instead of the v1beta1 client. If your use case requires the v1beta1 client, it is published as part of the standalone @google-cloud/firestore-api package. */ - export const v1beta1: typeof import('@google-cloud/firestore-api').v1beta1; + export const v1beta1: { + FirestoreClient: typeof import('./v1beta1/firestore_client').FirestoreClient; + }; /** * The v1 Veneer clients. These clients provide access to the Firestore Admin * API and the underlying Firestore v1 RPCs. diff --git a/handwritten/pubsub/protos/protos.d.ts b/handwritten/pubsub/protos/protos.d.ts index 00d60a8e075b..9462abadd676 100644 --- a/handwritten/pubsub/protos/protos.d.ts +++ b/handwritten/pubsub/protos/protos.d.ts @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -12,18952 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -import type {protobuf as $protobuf} from "google-gax"; -import Long = require("long"); -/** Namespace google. */ -export namespace google { - - /** Namespace pubsub. */ - namespace pubsub { - - /** Namespace v1. */ - namespace v1 { - - /** Represents a Publisher */ - class Publisher extends $protobuf.rpc.Service { - - /** - * Constructs a new Publisher 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); - - /** - * Creates new Publisher service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Publisher; - - /** - * Calls CreateTopic. - * @param request Topic message or plain object - * @param callback Node-style callback called with the error, if any, and Topic - */ - public createTopic(request: google.pubsub.v1.ITopic, callback: google.pubsub.v1.Publisher.CreateTopicCallback): void; - - /** - * Calls CreateTopic. - * @param request Topic message or plain object - * @returns Promise - */ - public createTopic(request: google.pubsub.v1.ITopic): Promise; - - /** - * Calls UpdateTopic. - * @param request UpdateTopicRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Topic - */ - public updateTopic(request: google.pubsub.v1.IUpdateTopicRequest, callback: google.pubsub.v1.Publisher.UpdateTopicCallback): void; - - /** - * Calls UpdateTopic. - * @param request UpdateTopicRequest message or plain object - * @returns Promise - */ - public updateTopic(request: google.pubsub.v1.IUpdateTopicRequest): Promise; - - /** - * Calls Publish. - * @param request PublishRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PublishResponse - */ - public publish(request: google.pubsub.v1.IPublishRequest, callback: google.pubsub.v1.Publisher.PublishCallback): void; - - /** - * Calls Publish. - * @param request PublishRequest message or plain object - * @returns Promise - */ - public publish(request: google.pubsub.v1.IPublishRequest): Promise; - - /** - * Calls GetTopic. - * @param request GetTopicRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Topic - */ - public getTopic(request: google.pubsub.v1.IGetTopicRequest, callback: google.pubsub.v1.Publisher.GetTopicCallback): void; - - /** - * Calls GetTopic. - * @param request GetTopicRequest message or plain object - * @returns Promise - */ - public getTopic(request: google.pubsub.v1.IGetTopicRequest): Promise; - - /** - * Calls ListTopics. - * @param request ListTopicsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTopicsResponse - */ - public listTopics(request: google.pubsub.v1.IListTopicsRequest, callback: google.pubsub.v1.Publisher.ListTopicsCallback): void; - - /** - * Calls ListTopics. - * @param request ListTopicsRequest message or plain object - * @returns Promise - */ - public listTopics(request: google.pubsub.v1.IListTopicsRequest): Promise; - - /** - * Calls ListTopicSubscriptions. - * @param request ListTopicSubscriptionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTopicSubscriptionsResponse - */ - public listTopicSubscriptions(request: google.pubsub.v1.IListTopicSubscriptionsRequest, callback: google.pubsub.v1.Publisher.ListTopicSubscriptionsCallback): void; - - /** - * Calls ListTopicSubscriptions. - * @param request ListTopicSubscriptionsRequest message or plain object - * @returns Promise - */ - public listTopicSubscriptions(request: google.pubsub.v1.IListTopicSubscriptionsRequest): Promise; - - /** - * Calls ListTopicSnapshots. - * @param request ListTopicSnapshotsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListTopicSnapshotsResponse - */ - public listTopicSnapshots(request: google.pubsub.v1.IListTopicSnapshotsRequest, callback: google.pubsub.v1.Publisher.ListTopicSnapshotsCallback): void; - - /** - * Calls ListTopicSnapshots. - * @param request ListTopicSnapshotsRequest message or plain object - * @returns Promise - */ - public listTopicSnapshots(request: google.pubsub.v1.IListTopicSnapshotsRequest): Promise; - - /** - * Calls DeleteTopic. - * @param request DeleteTopicRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteTopic(request: google.pubsub.v1.IDeleteTopicRequest, callback: google.pubsub.v1.Publisher.DeleteTopicCallback): void; - - /** - * Calls DeleteTopic. - * @param request DeleteTopicRequest message or plain object - * @returns Promise - */ - public deleteTopic(request: google.pubsub.v1.IDeleteTopicRequest): Promise; - - /** - * Calls DetachSubscription. - * @param request DetachSubscriptionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and DetachSubscriptionResponse - */ - public detachSubscription(request: google.pubsub.v1.IDetachSubscriptionRequest, callback: google.pubsub.v1.Publisher.DetachSubscriptionCallback): void; - - /** - * Calls DetachSubscription. - * @param request DetachSubscriptionRequest message or plain object - * @returns Promise - */ - public detachSubscription(request: google.pubsub.v1.IDetachSubscriptionRequest): Promise; - } - - namespace Publisher { - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|createTopic}. - * @param error Error, if any - * @param [response] Topic - */ - type CreateTopicCallback = (error: (Error|null), response?: google.pubsub.v1.Topic) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|updateTopic}. - * @param error Error, if any - * @param [response] Topic - */ - type UpdateTopicCallback = (error: (Error|null), response?: google.pubsub.v1.Topic) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|publish}. - * @param error Error, if any - * @param [response] PublishResponse - */ - type PublishCallback = (error: (Error|null), response?: google.pubsub.v1.PublishResponse) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|getTopic}. - * @param error Error, if any - * @param [response] Topic - */ - type GetTopicCallback = (error: (Error|null), response?: google.pubsub.v1.Topic) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|listTopics}. - * @param error Error, if any - * @param [response] ListTopicsResponse - */ - type ListTopicsCallback = (error: (Error|null), response?: google.pubsub.v1.ListTopicsResponse) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|listTopicSubscriptions}. - * @param error Error, if any - * @param [response] ListTopicSubscriptionsResponse - */ - type ListTopicSubscriptionsCallback = (error: (Error|null), response?: google.pubsub.v1.ListTopicSubscriptionsResponse) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|listTopicSnapshots}. - * @param error Error, if any - * @param [response] ListTopicSnapshotsResponse - */ - type ListTopicSnapshotsCallback = (error: (Error|null), response?: google.pubsub.v1.ListTopicSnapshotsResponse) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|deleteTopic}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteTopicCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|detachSubscription}. - * @param error Error, if any - * @param [response] DetachSubscriptionResponse - */ - type DetachSubscriptionCallback = (error: (Error|null), response?: google.pubsub.v1.DetachSubscriptionResponse) => void; - } - - /** Properties of a MessageStoragePolicy. */ - interface IMessageStoragePolicy { - - /** MessageStoragePolicy allowedPersistenceRegions */ - allowedPersistenceRegions?: (string[]|null); - - /** MessageStoragePolicy enforceInTransit */ - enforceInTransit?: (boolean|null); - } - - /** Represents a MessageStoragePolicy. */ - class MessageStoragePolicy implements IMessageStoragePolicy { - - /** - * Constructs a new MessageStoragePolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IMessageStoragePolicy); - - /** MessageStoragePolicy allowedPersistenceRegions. */ - public allowedPersistenceRegions: string[]; - - /** MessageStoragePolicy enforceInTransit. */ - public enforceInTransit: boolean; - - /** - * Creates a new MessageStoragePolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageStoragePolicy instance - */ - public static create(properties?: google.pubsub.v1.IMessageStoragePolicy): google.pubsub.v1.MessageStoragePolicy; - - /** - * Encodes the specified MessageStoragePolicy message. Does not implicitly {@link google.pubsub.v1.MessageStoragePolicy.verify|verify} messages. - * @param message MessageStoragePolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IMessageStoragePolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageStoragePolicy message, length delimited. Does not implicitly {@link google.pubsub.v1.MessageStoragePolicy.verify|verify} messages. - * @param message MessageStoragePolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IMessageStoragePolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageStoragePolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageStoragePolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.MessageStoragePolicy; - - /** - * Decodes a MessageStoragePolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageStoragePolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.MessageStoragePolicy; - - /** - * Verifies a MessageStoragePolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageStoragePolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageStoragePolicy - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.MessageStoragePolicy; - - /** - * Creates a plain object from a MessageStoragePolicy message. Also converts values to other types if specified. - * @param message MessageStoragePolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.MessageStoragePolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageStoragePolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageStoragePolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SchemaSettings. */ - interface ISchemaSettings { - - /** SchemaSettings schema */ - schema?: (string|null); - - /** SchemaSettings encoding */ - encoding?: (google.pubsub.v1.Encoding|keyof typeof google.pubsub.v1.Encoding|null); - - /** SchemaSettings firstRevisionId */ - firstRevisionId?: (string|null); - - /** SchemaSettings lastRevisionId */ - lastRevisionId?: (string|null); - } - - /** Represents a SchemaSettings. */ - class SchemaSettings implements ISchemaSettings { - - /** - * Constructs a new SchemaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.ISchemaSettings); - - /** SchemaSettings schema. */ - public schema: string; - - /** SchemaSettings encoding. */ - public encoding: (google.pubsub.v1.Encoding|keyof typeof google.pubsub.v1.Encoding); - - /** SchemaSettings firstRevisionId. */ - public firstRevisionId: string; - - /** SchemaSettings lastRevisionId. */ - public lastRevisionId: string; - - /** - * Creates a new SchemaSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns SchemaSettings instance - */ - public static create(properties?: google.pubsub.v1.ISchemaSettings): google.pubsub.v1.SchemaSettings; - - /** - * Encodes the specified SchemaSettings message. Does not implicitly {@link google.pubsub.v1.SchemaSettings.verify|verify} messages. - * @param message SchemaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.ISchemaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SchemaSettings message, length delimited. Does not implicitly {@link google.pubsub.v1.SchemaSettings.verify|verify} messages. - * @param message SchemaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.ISchemaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SchemaSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchemaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.SchemaSettings; - - /** - * Decodes a SchemaSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchemaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.SchemaSettings; - - /** - * Verifies a SchemaSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SchemaSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchemaSettings - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.SchemaSettings; - - /** - * Creates a plain object from a SchemaSettings message. Also converts values to other types if specified. - * @param message SchemaSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.SchemaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SchemaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SchemaSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an IngestionDataSourceSettings. */ - interface IIngestionDataSourceSettings { - - /** IngestionDataSourceSettings awsKinesis */ - awsKinesis?: (google.pubsub.v1.IngestionDataSourceSettings.IAwsKinesis|null); - - /** IngestionDataSourceSettings cloudStorage */ - cloudStorage?: (google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage|null); - - /** IngestionDataSourceSettings azureEventHubs */ - azureEventHubs?: (google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs|null); - - /** IngestionDataSourceSettings awsMsk */ - awsMsk?: (google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk|null); - - /** IngestionDataSourceSettings confluentCloud */ - confluentCloud?: (google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud|null); - - /** IngestionDataSourceSettings platformLogsSettings */ - platformLogsSettings?: (google.pubsub.v1.IPlatformLogsSettings|null); - } - - /** Represents an IngestionDataSourceSettings. */ - class IngestionDataSourceSettings implements IIngestionDataSourceSettings { - - /** - * Constructs a new IngestionDataSourceSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IIngestionDataSourceSettings); - - /** IngestionDataSourceSettings awsKinesis. */ - public awsKinesis?: (google.pubsub.v1.IngestionDataSourceSettings.IAwsKinesis|null); - - /** IngestionDataSourceSettings cloudStorage. */ - public cloudStorage?: (google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage|null); - - /** IngestionDataSourceSettings azureEventHubs. */ - public azureEventHubs?: (google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs|null); - - /** IngestionDataSourceSettings awsMsk. */ - public awsMsk?: (google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk|null); - - /** IngestionDataSourceSettings confluentCloud. */ - public confluentCloud?: (google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud|null); - - /** IngestionDataSourceSettings platformLogsSettings. */ - public platformLogsSettings?: (google.pubsub.v1.IPlatformLogsSettings|null); - - /** IngestionDataSourceSettings source. */ - public source?: ("awsKinesis"|"cloudStorage"|"azureEventHubs"|"awsMsk"|"confluentCloud"); - - /** - * Creates a new IngestionDataSourceSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns IngestionDataSourceSettings instance - */ - public static create(properties?: google.pubsub.v1.IIngestionDataSourceSettings): google.pubsub.v1.IngestionDataSourceSettings; - - /** - * Encodes the specified IngestionDataSourceSettings message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.verify|verify} messages. - * @param message IngestionDataSourceSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IIngestionDataSourceSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IngestionDataSourceSettings message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.verify|verify} messages. - * @param message IngestionDataSourceSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IIngestionDataSourceSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IngestionDataSourceSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IngestionDataSourceSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionDataSourceSettings; - - /** - * Decodes an IngestionDataSourceSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IngestionDataSourceSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionDataSourceSettings; - - /** - * Verifies an IngestionDataSourceSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an IngestionDataSourceSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IngestionDataSourceSettings - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionDataSourceSettings; - - /** - * Creates a plain object from an IngestionDataSourceSettings message. Also converts values to other types if specified. - * @param message IngestionDataSourceSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionDataSourceSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IngestionDataSourceSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IngestionDataSourceSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace IngestionDataSourceSettings { - - /** Properties of an AwsKinesis. */ - interface IAwsKinesis { - - /** AwsKinesis state */ - state?: (google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State|null); - - /** AwsKinesis streamArn */ - streamArn?: (string|null); - - /** AwsKinesis consumerArn */ - consumerArn?: (string|null); - - /** AwsKinesis awsRoleArn */ - awsRoleArn?: (string|null); - - /** AwsKinesis gcpServiceAccount */ - gcpServiceAccount?: (string|null); - } - - /** Represents an AwsKinesis. */ - class AwsKinesis implements IAwsKinesis { - - /** - * Constructs a new AwsKinesis. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionDataSourceSettings.IAwsKinesis); - - /** AwsKinesis state. */ - public state: (google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State); - - /** AwsKinesis streamArn. */ - public streamArn: string; - - /** AwsKinesis consumerArn. */ - public consumerArn: string; - - /** AwsKinesis awsRoleArn. */ - public awsRoleArn: string; - - /** AwsKinesis gcpServiceAccount. */ - public gcpServiceAccount: string; - - /** - * Creates a new AwsKinesis instance using the specified properties. - * @param [properties] Properties to set - * @returns AwsKinesis instance - */ - public static create(properties?: google.pubsub.v1.IngestionDataSourceSettings.IAwsKinesis): google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis; - - /** - * Encodes the specified AwsKinesis message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.verify|verify} messages. - * @param message AwsKinesis message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionDataSourceSettings.IAwsKinesis, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AwsKinesis message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.verify|verify} messages. - * @param message AwsKinesis message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionDataSourceSettings.IAwsKinesis, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AwsKinesis message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AwsKinesis - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis; - - /** - * Decodes an AwsKinesis message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AwsKinesis - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis; - - /** - * Verifies an AwsKinesis message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AwsKinesis message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AwsKinesis - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis; - - /** - * Creates a plain object from an AwsKinesis message. Also converts values to other types if specified. - * @param message AwsKinesis - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AwsKinesis to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AwsKinesis - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AwsKinesis { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - KINESIS_PERMISSION_DENIED = 2, - PUBLISH_PERMISSION_DENIED = 3, - STREAM_NOT_FOUND = 4, - CONSUMER_NOT_FOUND = 5 - } - } - - /** Properties of a CloudStorage. */ - interface ICloudStorage { - - /** CloudStorage state */ - state?: (google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State|null); - - /** CloudStorage bucket */ - bucket?: (string|null); - - /** CloudStorage textFormat */ - textFormat?: (google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat|null); - - /** CloudStorage avroFormat */ - avroFormat?: (google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat|null); - - /** CloudStorage pubsubAvroFormat */ - pubsubAvroFormat?: (google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat|null); - - /** CloudStorage minimumObjectCreateTime */ - minimumObjectCreateTime?: (google.protobuf.ITimestamp|null); - - /** CloudStorage matchGlob */ - matchGlob?: (string|null); - } - - /** Represents a CloudStorage. */ - class CloudStorage implements ICloudStorage { - - /** - * Constructs a new CloudStorage. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage); - - /** CloudStorage state. */ - public state: (google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State); - - /** CloudStorage bucket. */ - public bucket: string; - - /** CloudStorage textFormat. */ - public textFormat?: (google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat|null); - - /** CloudStorage avroFormat. */ - public avroFormat?: (google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat|null); - - /** CloudStorage pubsubAvroFormat. */ - public pubsubAvroFormat?: (google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat|null); - - /** CloudStorage minimumObjectCreateTime. */ - public minimumObjectCreateTime?: (google.protobuf.ITimestamp|null); - - /** CloudStorage matchGlob. */ - public matchGlob: string; - - /** CloudStorage inputFormat. */ - public inputFormat?: ("textFormat"|"avroFormat"|"pubsubAvroFormat"); - - /** - * Creates a new CloudStorage instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudStorage instance - */ - public static create(properties?: google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage; - - /** - * Encodes the specified CloudStorage message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.verify|verify} messages. - * @param message CloudStorage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudStorage message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.verify|verify} messages. - * @param message CloudStorage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudStorage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudStorage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage; - - /** - * Decodes a CloudStorage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudStorage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage; - - /** - * Verifies a CloudStorage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudStorage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudStorage - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage; - - /** - * Creates a plain object from a CloudStorage message. Also converts values to other types if specified. - * @param message CloudStorage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudStorage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudStorage - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CloudStorage { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - CLOUD_STORAGE_PERMISSION_DENIED = 2, - PUBLISH_PERMISSION_DENIED = 3, - BUCKET_NOT_FOUND = 4, - TOO_MANY_OBJECTS = 5 - } - - /** Properties of a TextFormat. */ - interface ITextFormat { - - /** TextFormat delimiter */ - delimiter?: (string|null); - } - - /** Represents a TextFormat. */ - class TextFormat implements ITextFormat { - - /** - * Constructs a new TextFormat. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat); - - /** TextFormat delimiter. */ - public delimiter?: (string|null); - - /** - * Creates a new TextFormat instance using the specified properties. - * @param [properties] Properties to set - * @returns TextFormat instance - */ - public static create(properties?: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat; - - /** - * Encodes the specified TextFormat message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.verify|verify} messages. - * @param message TextFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TextFormat message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.verify|verify} messages. - * @param message TextFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TextFormat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TextFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat; - - /** - * Decodes a TextFormat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TextFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat; - - /** - * Verifies a TextFormat message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TextFormat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TextFormat - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat; - - /** - * Creates a plain object from a TextFormat message. Also converts values to other types if specified. - * @param message TextFormat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TextFormat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TextFormat - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AvroFormat. */ - interface IAvroFormat { - } - - /** Represents an AvroFormat. */ - class AvroFormat implements IAvroFormat { - - /** - * Constructs a new AvroFormat. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat); - - /** - * Creates a new AvroFormat instance using the specified properties. - * @param [properties] Properties to set - * @returns AvroFormat instance - */ - public static create(properties?: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat; - - /** - * Encodes the specified AvroFormat message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.verify|verify} messages. - * @param message AvroFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AvroFormat message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.verify|verify} messages. - * @param message AvroFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AvroFormat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AvroFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat; - - /** - * Decodes an AvroFormat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AvroFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat; - - /** - * Verifies an AvroFormat message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AvroFormat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AvroFormat - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat; - - /** - * Creates a plain object from an AvroFormat message. Also converts values to other types if specified. - * @param message AvroFormat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AvroFormat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AvroFormat - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PubSubAvroFormat. */ - interface IPubSubAvroFormat { - } - - /** Represents a PubSubAvroFormat. */ - class PubSubAvroFormat implements IPubSubAvroFormat { - - /** - * Constructs a new PubSubAvroFormat. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat); - - /** - * Creates a new PubSubAvroFormat instance using the specified properties. - * @param [properties] Properties to set - * @returns PubSubAvroFormat instance - */ - public static create(properties?: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat; - - /** - * Encodes the specified PubSubAvroFormat message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.verify|verify} messages. - * @param message PubSubAvroFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PubSubAvroFormat message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.verify|verify} messages. - * @param message PubSubAvroFormat message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PubSubAvroFormat message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PubSubAvroFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat; - - /** - * Decodes a PubSubAvroFormat message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PubSubAvroFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat; - - /** - * Verifies a PubSubAvroFormat message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PubSubAvroFormat message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PubSubAvroFormat - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat; - - /** - * Creates a plain object from a PubSubAvroFormat message. Also converts values to other types if specified. - * @param message PubSubAvroFormat - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PubSubAvroFormat to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PubSubAvroFormat - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an AzureEventHubs. */ - interface IAzureEventHubs { - - /** AzureEventHubs state */ - state?: (google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State|null); - - /** AzureEventHubs resourceGroup */ - resourceGroup?: (string|null); - - /** AzureEventHubs namespace */ - namespace?: (string|null); - - /** AzureEventHubs eventHub */ - eventHub?: (string|null); - - /** AzureEventHubs clientId */ - clientId?: (string|null); - - /** AzureEventHubs tenantId */ - tenantId?: (string|null); - - /** AzureEventHubs subscriptionId */ - subscriptionId?: (string|null); - - /** AzureEventHubs gcpServiceAccount */ - gcpServiceAccount?: (string|null); - } - - /** Represents an AzureEventHubs. */ - class AzureEventHubs implements IAzureEventHubs { - - /** - * Constructs a new AzureEventHubs. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs); - - /** AzureEventHubs state. */ - public state: (google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State); - - /** AzureEventHubs resourceGroup. */ - public resourceGroup: string; - - /** AzureEventHubs namespace. */ - public namespace: string; - - /** AzureEventHubs eventHub. */ - public eventHub: string; - - /** AzureEventHubs clientId. */ - public clientId: string; - - /** AzureEventHubs tenantId. */ - public tenantId: string; - - /** AzureEventHubs subscriptionId. */ - public subscriptionId: string; - - /** AzureEventHubs gcpServiceAccount. */ - public gcpServiceAccount: string; - - /** - * Creates a new AzureEventHubs instance using the specified properties. - * @param [properties] Properties to set - * @returns AzureEventHubs instance - */ - public static create(properties?: google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs): google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs; - - /** - * Encodes the specified AzureEventHubs message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.verify|verify} messages. - * @param message AzureEventHubs message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AzureEventHubs message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.verify|verify} messages. - * @param message AzureEventHubs message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AzureEventHubs message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AzureEventHubs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs; - - /** - * Decodes an AzureEventHubs message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AzureEventHubs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs; - - /** - * Verifies an AzureEventHubs message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AzureEventHubs message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AzureEventHubs - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs; - - /** - * Creates a plain object from an AzureEventHubs message. Also converts values to other types if specified. - * @param message AzureEventHubs - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AzureEventHubs to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AzureEventHubs - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AzureEventHubs { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - EVENT_HUBS_PERMISSION_DENIED = 2, - PUBLISH_PERMISSION_DENIED = 3, - NAMESPACE_NOT_FOUND = 4, - EVENT_HUB_NOT_FOUND = 5, - SUBSCRIPTION_NOT_FOUND = 6, - RESOURCE_GROUP_NOT_FOUND = 7 - } - } - - /** Properties of an AwsMsk. */ - interface IAwsMsk { - - /** AwsMsk state */ - state?: (google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State|null); - - /** AwsMsk clusterArn */ - clusterArn?: (string|null); - - /** AwsMsk topic */ - topic?: (string|null); - - /** AwsMsk awsRoleArn */ - awsRoleArn?: (string|null); - - /** AwsMsk gcpServiceAccount */ - gcpServiceAccount?: (string|null); - } - - /** Represents an AwsMsk. */ - class AwsMsk implements IAwsMsk { - - /** - * Constructs a new AwsMsk. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk); - - /** AwsMsk state. */ - public state: (google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State); - - /** AwsMsk clusterArn. */ - public clusterArn: string; - - /** AwsMsk topic. */ - public topic: string; - - /** AwsMsk awsRoleArn. */ - public awsRoleArn: string; - - /** AwsMsk gcpServiceAccount. */ - public gcpServiceAccount: string; - - /** - * Creates a new AwsMsk instance using the specified properties. - * @param [properties] Properties to set - * @returns AwsMsk instance - */ - public static create(properties?: google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk): google.pubsub.v1.IngestionDataSourceSettings.AwsMsk; - - /** - * Encodes the specified AwsMsk message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.verify|verify} messages. - * @param message AwsMsk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AwsMsk message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.verify|verify} messages. - * @param message AwsMsk message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AwsMsk message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AwsMsk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionDataSourceSettings.AwsMsk; - - /** - * Decodes an AwsMsk message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AwsMsk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionDataSourceSettings.AwsMsk; - - /** - * Verifies an AwsMsk message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AwsMsk message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AwsMsk - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionDataSourceSettings.AwsMsk; - - /** - * Creates a plain object from an AwsMsk message. Also converts values to other types if specified. - * @param message AwsMsk - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionDataSourceSettings.AwsMsk, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AwsMsk to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AwsMsk - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AwsMsk { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - MSK_PERMISSION_DENIED = 2, - PUBLISH_PERMISSION_DENIED = 3, - CLUSTER_NOT_FOUND = 4, - TOPIC_NOT_FOUND = 5 - } - } - - /** Properties of a ConfluentCloud. */ - interface IConfluentCloud { - - /** ConfluentCloud state */ - state?: (google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State|null); - - /** ConfluentCloud bootstrapServer */ - bootstrapServer?: (string|null); - - /** ConfluentCloud clusterId */ - clusterId?: (string|null); - - /** ConfluentCloud topic */ - topic?: (string|null); - - /** ConfluentCloud identityPoolId */ - identityPoolId?: (string|null); - - /** ConfluentCloud gcpServiceAccount */ - gcpServiceAccount?: (string|null); - } - - /** Represents a ConfluentCloud. */ - class ConfluentCloud implements IConfluentCloud { - - /** - * Constructs a new ConfluentCloud. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud); - - /** ConfluentCloud state. */ - public state: (google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State|keyof typeof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State); - - /** ConfluentCloud bootstrapServer. */ - public bootstrapServer: string; - - /** ConfluentCloud clusterId. */ - public clusterId: string; - - /** ConfluentCloud topic. */ - public topic: string; - - /** ConfluentCloud identityPoolId. */ - public identityPoolId: string; - - /** ConfluentCloud gcpServiceAccount. */ - public gcpServiceAccount: string; - - /** - * Creates a new ConfluentCloud instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfluentCloud instance - */ - public static create(properties?: google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud): google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud; - - /** - * Encodes the specified ConfluentCloud message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.verify|verify} messages. - * @param message ConfluentCloud message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConfluentCloud message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.verify|verify} messages. - * @param message ConfluentCloud message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConfluentCloud message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfluentCloud - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud; - - /** - * Decodes a ConfluentCloud message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfluentCloud - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud; - - /** - * Verifies a ConfluentCloud message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConfluentCloud message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfluentCloud - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud; - - /** - * Creates a plain object from a ConfluentCloud message. Also converts values to other types if specified. - * @param message ConfluentCloud - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConfluentCloud to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConfluentCloud - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ConfluentCloud { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - CONFLUENT_CLOUD_PERMISSION_DENIED = 2, - PUBLISH_PERMISSION_DENIED = 3, - UNREACHABLE_BOOTSTRAP_SERVER = 4, - CLUSTER_NOT_FOUND = 5, - TOPIC_NOT_FOUND = 6 - } - } - } - - /** Properties of a PlatformLogsSettings. */ - interface IPlatformLogsSettings { - - /** PlatformLogsSettings severity */ - severity?: (google.pubsub.v1.PlatformLogsSettings.Severity|keyof typeof google.pubsub.v1.PlatformLogsSettings.Severity|null); - } - - /** Represents a PlatformLogsSettings. */ - class PlatformLogsSettings implements IPlatformLogsSettings { - - /** - * Constructs a new PlatformLogsSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IPlatformLogsSettings); - - /** PlatformLogsSettings severity. */ - public severity: (google.pubsub.v1.PlatformLogsSettings.Severity|keyof typeof google.pubsub.v1.PlatformLogsSettings.Severity); - - /** - * Creates a new PlatformLogsSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PlatformLogsSettings instance - */ - public static create(properties?: google.pubsub.v1.IPlatformLogsSettings): google.pubsub.v1.PlatformLogsSettings; - - /** - * Encodes the specified PlatformLogsSettings message. Does not implicitly {@link google.pubsub.v1.PlatformLogsSettings.verify|verify} messages. - * @param message PlatformLogsSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IPlatformLogsSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PlatformLogsSettings message, length delimited. Does not implicitly {@link google.pubsub.v1.PlatformLogsSettings.verify|verify} messages. - * @param message PlatformLogsSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IPlatformLogsSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PlatformLogsSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PlatformLogsSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.PlatformLogsSettings; - - /** - * Decodes a PlatformLogsSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PlatformLogsSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.PlatformLogsSettings; - - /** - * Verifies a PlatformLogsSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PlatformLogsSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PlatformLogsSettings - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.PlatformLogsSettings; - - /** - * Creates a plain object from a PlatformLogsSettings message. Also converts values to other types if specified. - * @param message PlatformLogsSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.PlatformLogsSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PlatformLogsSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PlatformLogsSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PlatformLogsSettings { - - /** Severity enum. */ - enum Severity { - SEVERITY_UNSPECIFIED = 0, - DISABLED = 1, - DEBUG = 2, - INFO = 3, - WARNING = 4, - ERROR = 5 - } - } - - /** Properties of an IngestionFailureEvent. */ - interface IIngestionFailureEvent { - - /** IngestionFailureEvent topic */ - topic?: (string|null); - - /** IngestionFailureEvent errorMessage */ - errorMessage?: (string|null); - - /** IngestionFailureEvent cloudStorageFailure */ - cloudStorageFailure?: (google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure|null); - - /** IngestionFailureEvent awsMskFailure */ - awsMskFailure?: (google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason|null); - - /** IngestionFailureEvent azureEventHubsFailure */ - azureEventHubsFailure?: (google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason|null); - - /** IngestionFailureEvent confluentCloudFailure */ - confluentCloudFailure?: (google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason|null); - - /** IngestionFailureEvent awsKinesisFailure */ - awsKinesisFailure?: (google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason|null); - } - - /** Represents an IngestionFailureEvent. */ - class IngestionFailureEvent implements IIngestionFailureEvent { - - /** - * Constructs a new IngestionFailureEvent. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IIngestionFailureEvent); - - /** IngestionFailureEvent topic. */ - public topic: string; - - /** IngestionFailureEvent errorMessage. */ - public errorMessage: string; - - /** IngestionFailureEvent cloudStorageFailure. */ - public cloudStorageFailure?: (google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure|null); - - /** IngestionFailureEvent awsMskFailure. */ - public awsMskFailure?: (google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason|null); - - /** IngestionFailureEvent azureEventHubsFailure. */ - public azureEventHubsFailure?: (google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason|null); - - /** IngestionFailureEvent confluentCloudFailure. */ - public confluentCloudFailure?: (google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason|null); - - /** IngestionFailureEvent awsKinesisFailure. */ - public awsKinesisFailure?: (google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason|null); - - /** IngestionFailureEvent failure. */ - public failure?: ("cloudStorageFailure"|"awsMskFailure"|"azureEventHubsFailure"|"confluentCloudFailure"|"awsKinesisFailure"); - - /** - * Creates a new IngestionFailureEvent instance using the specified properties. - * @param [properties] Properties to set - * @returns IngestionFailureEvent instance - */ - public static create(properties?: google.pubsub.v1.IIngestionFailureEvent): google.pubsub.v1.IngestionFailureEvent; - - /** - * Encodes the specified IngestionFailureEvent message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.verify|verify} messages. - * @param message IngestionFailureEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IIngestionFailureEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IngestionFailureEvent message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.verify|verify} messages. - * @param message IngestionFailureEvent message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IIngestionFailureEvent, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IngestionFailureEvent message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IngestionFailureEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionFailureEvent; - - /** - * Decodes an IngestionFailureEvent message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IngestionFailureEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionFailureEvent; - - /** - * Verifies an IngestionFailureEvent message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an IngestionFailureEvent message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IngestionFailureEvent - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionFailureEvent; - - /** - * Creates a plain object from an IngestionFailureEvent message. Also converts values to other types if specified. - * @param message IngestionFailureEvent - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionFailureEvent, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IngestionFailureEvent to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IngestionFailureEvent - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace IngestionFailureEvent { - - /** Properties of an ApiViolationReason. */ - interface IApiViolationReason { - } - - /** Represents an ApiViolationReason. */ - class ApiViolationReason implements IApiViolationReason { - - /** - * Constructs a new ApiViolationReason. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionFailureEvent.IApiViolationReason); - - /** - * Creates a new ApiViolationReason instance using the specified properties. - * @param [properties] Properties to set - * @returns ApiViolationReason instance - */ - public static create(properties?: google.pubsub.v1.IngestionFailureEvent.IApiViolationReason): google.pubsub.v1.IngestionFailureEvent.ApiViolationReason; - - /** - * Encodes the specified ApiViolationReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify|verify} messages. - * @param message ApiViolationReason message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionFailureEvent.IApiViolationReason, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ApiViolationReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify|verify} messages. - * @param message ApiViolationReason message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionFailureEvent.IApiViolationReason, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ApiViolationReason message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ApiViolationReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionFailureEvent.ApiViolationReason; - - /** - * Decodes an ApiViolationReason message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ApiViolationReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionFailureEvent.ApiViolationReason; - - /** - * Verifies an ApiViolationReason message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ApiViolationReason message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ApiViolationReason - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionFailureEvent.ApiViolationReason; - - /** - * Creates a plain object from an ApiViolationReason message. Also converts values to other types if specified. - * @param message ApiViolationReason - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionFailureEvent.ApiViolationReason, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ApiViolationReason to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ApiViolationReason - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AvroFailureReason. */ - interface IAvroFailureReason { - } - - /** Represents an AvroFailureReason. */ - class AvroFailureReason implements IAvroFailureReason { - - /** - * Constructs a new AvroFailureReason. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason); - - /** - * Creates a new AvroFailureReason instance using the specified properties. - * @param [properties] Properties to set - * @returns AvroFailureReason instance - */ - public static create(properties?: google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason): google.pubsub.v1.IngestionFailureEvent.AvroFailureReason; - - /** - * Encodes the specified AvroFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify|verify} messages. - * @param message AvroFailureReason message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AvroFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify|verify} messages. - * @param message AvroFailureReason message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AvroFailureReason message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AvroFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionFailureEvent.AvroFailureReason; - - /** - * Decodes an AvroFailureReason message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AvroFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionFailureEvent.AvroFailureReason; - - /** - * Verifies an AvroFailureReason message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AvroFailureReason message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AvroFailureReason - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionFailureEvent.AvroFailureReason; - - /** - * Creates a plain object from an AvroFailureReason message. Also converts values to other types if specified. - * @param message AvroFailureReason - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionFailureEvent.AvroFailureReason, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AvroFailureReason to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AvroFailureReason - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SchemaViolationReason. */ - interface ISchemaViolationReason { - } - - /** Represents a SchemaViolationReason. */ - class SchemaViolationReason implements ISchemaViolationReason { - - /** - * Constructs a new SchemaViolationReason. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason); - - /** - * Creates a new SchemaViolationReason instance using the specified properties. - * @param [properties] Properties to set - * @returns SchemaViolationReason instance - */ - public static create(properties?: google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason): google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason; - - /** - * Encodes the specified SchemaViolationReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify|verify} messages. - * @param message SchemaViolationReason message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SchemaViolationReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify|verify} messages. - * @param message SchemaViolationReason message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SchemaViolationReason message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchemaViolationReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason; - - /** - * Decodes a SchemaViolationReason message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchemaViolationReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason; - - /** - * Verifies a SchemaViolationReason message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SchemaViolationReason message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchemaViolationReason - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason; - - /** - * Creates a plain object from a SchemaViolationReason message. Also converts values to other types if specified. - * @param message SchemaViolationReason - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SchemaViolationReason to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SchemaViolationReason - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MessageTransformationFailureReason. */ - interface IMessageTransformationFailureReason { - } - - /** Represents a MessageTransformationFailureReason. */ - class MessageTransformationFailureReason implements IMessageTransformationFailureReason { - - /** - * Constructs a new MessageTransformationFailureReason. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason); - - /** - * Creates a new MessageTransformationFailureReason instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageTransformationFailureReason instance - */ - public static create(properties?: google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason): google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason; - - /** - * Encodes the specified MessageTransformationFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.verify|verify} messages. - * @param message MessageTransformationFailureReason message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageTransformationFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.verify|verify} messages. - * @param message MessageTransformationFailureReason message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageTransformationFailureReason message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageTransformationFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason; - - /** - * Decodes a MessageTransformationFailureReason message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageTransformationFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason; - - /** - * Verifies a MessageTransformationFailureReason message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageTransformationFailureReason message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageTransformationFailureReason - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason; - - /** - * Creates a plain object from a MessageTransformationFailureReason message. Also converts values to other types if specified. - * @param message MessageTransformationFailureReason - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageTransformationFailureReason to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageTransformationFailureReason - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CloudStorageFailure. */ - interface ICloudStorageFailure { - - /** CloudStorageFailure bucket */ - bucket?: (string|null); - - /** CloudStorageFailure objectName */ - objectName?: (string|null); - - /** CloudStorageFailure objectGeneration */ - objectGeneration?: (number|Long|string|null); - - /** CloudStorageFailure avroFailureReason */ - avroFailureReason?: (google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason|null); - - /** CloudStorageFailure apiViolationReason */ - apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null); - - /** CloudStorageFailure schemaViolationReason */ - schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null); - - /** CloudStorageFailure messageTransformationFailureReason */ - messageTransformationFailureReason?: (google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null); - } - - /** Represents a CloudStorageFailure. */ - class CloudStorageFailure implements ICloudStorageFailure { - - /** - * Constructs a new CloudStorageFailure. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure); - - /** CloudStorageFailure bucket. */ - public bucket: string; - - /** CloudStorageFailure objectName. */ - public objectName: string; - - /** CloudStorageFailure objectGeneration. */ - public objectGeneration: (number|Long|string); - - /** CloudStorageFailure avroFailureReason. */ - public avroFailureReason?: (google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason|null); - - /** CloudStorageFailure apiViolationReason. */ - public apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null); - - /** CloudStorageFailure schemaViolationReason. */ - public schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null); - - /** CloudStorageFailure messageTransformationFailureReason. */ - public messageTransformationFailureReason?: (google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null); - - /** CloudStorageFailure reason. */ - public reason?: ("avroFailureReason"|"apiViolationReason"|"schemaViolationReason"|"messageTransformationFailureReason"); - - /** - * Creates a new CloudStorageFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudStorageFailure instance - */ - public static create(properties?: google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure): google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure; - - /** - * Encodes the specified CloudStorageFailure message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify|verify} messages. - * @param message CloudStorageFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudStorageFailure message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify|verify} messages. - * @param message CloudStorageFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudStorageFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudStorageFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure; - - /** - * Decodes a CloudStorageFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudStorageFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure; - - /** - * Verifies a CloudStorageFailure message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudStorageFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudStorageFailure - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure; - - /** - * Creates a plain object from a CloudStorageFailure message. Also converts values to other types if specified. - * @param message CloudStorageFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudStorageFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudStorageFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AwsMskFailureReason. */ - interface IAwsMskFailureReason { - - /** AwsMskFailureReason clusterArn */ - clusterArn?: (string|null); - - /** AwsMskFailureReason kafkaTopic */ - kafkaTopic?: (string|null); - - /** AwsMskFailureReason partitionId */ - partitionId?: (number|Long|string|null); - - /** AwsMskFailureReason offset */ - offset?: (number|Long|string|null); - - /** AwsMskFailureReason apiViolationReason */ - apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null); - - /** AwsMskFailureReason schemaViolationReason */ - schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null); - - /** AwsMskFailureReason messageTransformationFailureReason */ - messageTransformationFailureReason?: (google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null); - } - - /** Represents an AwsMskFailureReason. */ - class AwsMskFailureReason implements IAwsMskFailureReason { - - /** - * Constructs a new AwsMskFailureReason. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason); - - /** AwsMskFailureReason clusterArn. */ - public clusterArn: string; - - /** AwsMskFailureReason kafkaTopic. */ - public kafkaTopic: string; - - /** AwsMskFailureReason partitionId. */ - public partitionId: (number|Long|string); - - /** AwsMskFailureReason offset. */ - public offset: (number|Long|string); - - /** AwsMskFailureReason apiViolationReason. */ - public apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null); - - /** AwsMskFailureReason schemaViolationReason. */ - public schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null); - - /** AwsMskFailureReason messageTransformationFailureReason. */ - public messageTransformationFailureReason?: (google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null); - - /** AwsMskFailureReason reason. */ - public reason?: ("apiViolationReason"|"schemaViolationReason"|"messageTransformationFailureReason"); - - /** - * Creates a new AwsMskFailureReason instance using the specified properties. - * @param [properties] Properties to set - * @returns AwsMskFailureReason instance - */ - public static create(properties?: google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason): google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason; - - /** - * Encodes the specified AwsMskFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.verify|verify} messages. - * @param message AwsMskFailureReason message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AwsMskFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.verify|verify} messages. - * @param message AwsMskFailureReason message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AwsMskFailureReason message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AwsMskFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason; - - /** - * Decodes an AwsMskFailureReason message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AwsMskFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason; - - /** - * Verifies an AwsMskFailureReason message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AwsMskFailureReason message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AwsMskFailureReason - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason; - - /** - * Creates a plain object from an AwsMskFailureReason message. Also converts values to other types if specified. - * @param message AwsMskFailureReason - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AwsMskFailureReason to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AwsMskFailureReason - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AzureEventHubsFailureReason. */ - interface IAzureEventHubsFailureReason { - - /** AzureEventHubsFailureReason namespace */ - namespace?: (string|null); - - /** AzureEventHubsFailureReason eventHub */ - eventHub?: (string|null); - - /** AzureEventHubsFailureReason partitionId */ - partitionId?: (number|Long|string|null); - - /** AzureEventHubsFailureReason offset */ - offset?: (number|Long|string|null); - - /** AzureEventHubsFailureReason apiViolationReason */ - apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null); - - /** AzureEventHubsFailureReason schemaViolationReason */ - schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null); - - /** AzureEventHubsFailureReason messageTransformationFailureReason */ - messageTransformationFailureReason?: (google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null); - } - - /** Represents an AzureEventHubsFailureReason. */ - class AzureEventHubsFailureReason implements IAzureEventHubsFailureReason { - - /** - * Constructs a new AzureEventHubsFailureReason. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason); - - /** AzureEventHubsFailureReason namespace. */ - public namespace: string; - - /** AzureEventHubsFailureReason eventHub. */ - public eventHub: string; - - /** AzureEventHubsFailureReason partitionId. */ - public partitionId: (number|Long|string); - - /** AzureEventHubsFailureReason offset. */ - public offset: (number|Long|string); - - /** AzureEventHubsFailureReason apiViolationReason. */ - public apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null); - - /** AzureEventHubsFailureReason schemaViolationReason. */ - public schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null); - - /** AzureEventHubsFailureReason messageTransformationFailureReason. */ - public messageTransformationFailureReason?: (google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null); - - /** AzureEventHubsFailureReason reason. */ - public reason?: ("apiViolationReason"|"schemaViolationReason"|"messageTransformationFailureReason"); - - /** - * Creates a new AzureEventHubsFailureReason instance using the specified properties. - * @param [properties] Properties to set - * @returns AzureEventHubsFailureReason instance - */ - public static create(properties?: google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason): google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason; - - /** - * Encodes the specified AzureEventHubsFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.verify|verify} messages. - * @param message AzureEventHubsFailureReason message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AzureEventHubsFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.verify|verify} messages. - * @param message AzureEventHubsFailureReason message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AzureEventHubsFailureReason message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AzureEventHubsFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason; - - /** - * Decodes an AzureEventHubsFailureReason message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AzureEventHubsFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason; - - /** - * Verifies an AzureEventHubsFailureReason message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AzureEventHubsFailureReason message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AzureEventHubsFailureReason - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason; - - /** - * Creates a plain object from an AzureEventHubsFailureReason message. Also converts values to other types if specified. - * @param message AzureEventHubsFailureReason - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AzureEventHubsFailureReason to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AzureEventHubsFailureReason - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ConfluentCloudFailureReason. */ - interface IConfluentCloudFailureReason { - - /** ConfluentCloudFailureReason clusterId */ - clusterId?: (string|null); - - /** ConfluentCloudFailureReason kafkaTopic */ - kafkaTopic?: (string|null); - - /** ConfluentCloudFailureReason partitionId */ - partitionId?: (number|Long|string|null); - - /** ConfluentCloudFailureReason offset */ - offset?: (number|Long|string|null); - - /** ConfluentCloudFailureReason apiViolationReason */ - apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null); - - /** ConfluentCloudFailureReason schemaViolationReason */ - schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null); - - /** ConfluentCloudFailureReason messageTransformationFailureReason */ - messageTransformationFailureReason?: (google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null); - } - - /** Represents a ConfluentCloudFailureReason. */ - class ConfluentCloudFailureReason implements IConfluentCloudFailureReason { - - /** - * Constructs a new ConfluentCloudFailureReason. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason); - - /** ConfluentCloudFailureReason clusterId. */ - public clusterId: string; - - /** ConfluentCloudFailureReason kafkaTopic. */ - public kafkaTopic: string; - - /** ConfluentCloudFailureReason partitionId. */ - public partitionId: (number|Long|string); - - /** ConfluentCloudFailureReason offset. */ - public offset: (number|Long|string); - - /** ConfluentCloudFailureReason apiViolationReason. */ - public apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null); - - /** ConfluentCloudFailureReason schemaViolationReason. */ - public schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null); - - /** ConfluentCloudFailureReason messageTransformationFailureReason. */ - public messageTransformationFailureReason?: (google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null); - - /** ConfluentCloudFailureReason reason. */ - public reason?: ("apiViolationReason"|"schemaViolationReason"|"messageTransformationFailureReason"); - - /** - * Creates a new ConfluentCloudFailureReason instance using the specified properties. - * @param [properties] Properties to set - * @returns ConfluentCloudFailureReason instance - */ - public static create(properties?: google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason): google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason; - - /** - * Encodes the specified ConfluentCloudFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.verify|verify} messages. - * @param message ConfluentCloudFailureReason message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ConfluentCloudFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.verify|verify} messages. - * @param message ConfluentCloudFailureReason message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ConfluentCloudFailureReason message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ConfluentCloudFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason; - - /** - * Decodes a ConfluentCloudFailureReason message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ConfluentCloudFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason; - - /** - * Verifies a ConfluentCloudFailureReason message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ConfluentCloudFailureReason message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ConfluentCloudFailureReason - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason; - - /** - * Creates a plain object from a ConfluentCloudFailureReason message. Also converts values to other types if specified. - * @param message ConfluentCloudFailureReason - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ConfluentCloudFailureReason to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ConfluentCloudFailureReason - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AwsKinesisFailureReason. */ - interface IAwsKinesisFailureReason { - - /** AwsKinesisFailureReason streamArn */ - streamArn?: (string|null); - - /** AwsKinesisFailureReason partitionKey */ - partitionKey?: (string|null); - - /** AwsKinesisFailureReason sequenceNumber */ - sequenceNumber?: (string|null); - - /** AwsKinesisFailureReason schemaViolationReason */ - schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null); - - /** AwsKinesisFailureReason messageTransformationFailureReason */ - messageTransformationFailureReason?: (google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null); - - /** AwsKinesisFailureReason apiViolationReason */ - apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null); - } - - /** Represents an AwsKinesisFailureReason. */ - class AwsKinesisFailureReason implements IAwsKinesisFailureReason { - - /** - * Constructs a new AwsKinesisFailureReason. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason); - - /** AwsKinesisFailureReason streamArn. */ - public streamArn: string; - - /** AwsKinesisFailureReason partitionKey. */ - public partitionKey: string; - - /** AwsKinesisFailureReason sequenceNumber. */ - public sequenceNumber: string; - - /** AwsKinesisFailureReason schemaViolationReason. */ - public schemaViolationReason?: (google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null); - - /** AwsKinesisFailureReason messageTransformationFailureReason. */ - public messageTransformationFailureReason?: (google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null); - - /** AwsKinesisFailureReason apiViolationReason. */ - public apiViolationReason?: (google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null); - - /** AwsKinesisFailureReason reason. */ - public reason?: ("schemaViolationReason"|"messageTransformationFailureReason"|"apiViolationReason"); - - /** - * Creates a new AwsKinesisFailureReason instance using the specified properties. - * @param [properties] Properties to set - * @returns AwsKinesisFailureReason instance - */ - public static create(properties?: google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason): google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason; - - /** - * Encodes the specified AwsKinesisFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.verify|verify} messages. - * @param message AwsKinesisFailureReason message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AwsKinesisFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.verify|verify} messages. - * @param message AwsKinesisFailureReason message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AwsKinesisFailureReason message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AwsKinesisFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason; - - /** - * Decodes an AwsKinesisFailureReason message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AwsKinesisFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason; - - /** - * Verifies an AwsKinesisFailureReason message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AwsKinesisFailureReason message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AwsKinesisFailureReason - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason; - - /** - * Creates a plain object from an AwsKinesisFailureReason message. Also converts values to other types if specified. - * @param message AwsKinesisFailureReason - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AwsKinesisFailureReason to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AwsKinesisFailureReason - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a JavaScriptUDF. */ - interface IJavaScriptUDF { - - /** JavaScriptUDF functionName */ - functionName?: (string|null); - - /** JavaScriptUDF code */ - code?: (string|null); - } - - /** Represents a JavaScriptUDF. */ - class JavaScriptUDF implements IJavaScriptUDF { - - /** - * Constructs a new JavaScriptUDF. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IJavaScriptUDF); - - /** JavaScriptUDF functionName. */ - public functionName: string; - - /** JavaScriptUDF code. */ - public code: string; - - /** - * Creates a new JavaScriptUDF instance using the specified properties. - * @param [properties] Properties to set - * @returns JavaScriptUDF instance - */ - public static create(properties?: google.pubsub.v1.IJavaScriptUDF): google.pubsub.v1.JavaScriptUDF; - - /** - * Encodes the specified JavaScriptUDF message. Does not implicitly {@link google.pubsub.v1.JavaScriptUDF.verify|verify} messages. - * @param message JavaScriptUDF message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IJavaScriptUDF, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JavaScriptUDF message, length delimited. Does not implicitly {@link google.pubsub.v1.JavaScriptUDF.verify|verify} messages. - * @param message JavaScriptUDF message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IJavaScriptUDF, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JavaScriptUDF message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JavaScriptUDF - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.JavaScriptUDF; - - /** - * Decodes a JavaScriptUDF message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JavaScriptUDF - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.JavaScriptUDF; - - /** - * Verifies a JavaScriptUDF message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JavaScriptUDF message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JavaScriptUDF - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.JavaScriptUDF; - - /** - * Creates a plain object from a JavaScriptUDF message. Also converts values to other types if specified. - * @param message JavaScriptUDF - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.JavaScriptUDF, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JavaScriptUDF to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JavaScriptUDF - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a AIInference. */ - interface IAIInference { - - /** AIInference endpoint */ - endpoint?: (string|null); - - /** AIInference unstructuredInference */ - unstructuredInference?: (google.pubsub.v1.AIInference.IUnstructuredInference|null); - - /** AIInference serviceAccountEmail */ - serviceAccountEmail?: (string|null); - } - - /** Represents a AIInference. */ - class AIInference implements IAIInference { - - /** - * Constructs a new AIInference. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IAIInference); - - /** AIInference endpoint. */ - public endpoint: string; - - /** AIInference unstructuredInference. */ - public unstructuredInference?: (google.pubsub.v1.AIInference.IUnstructuredInference|null); - - /** AIInference serviceAccountEmail. */ - public serviceAccountEmail: string; - - /** AIInference inferenceMode. */ - public inferenceMode?: "unstructuredInference"; - - /** - * Creates a new AIInference instance using the specified properties. - * @param [properties] Properties to set - * @returns AIInference instance - */ - public static create(properties?: google.pubsub.v1.IAIInference): google.pubsub.v1.AIInference; - - /** - * Encodes the specified AIInference message. Does not implicitly {@link google.pubsub.v1.AIInference.verify|verify} messages. - * @param message AIInference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IAIInference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AIInference message, length delimited. Does not implicitly {@link google.pubsub.v1.AIInference.verify|verify} messages. - * @param message AIInference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IAIInference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a AIInference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AIInference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.AIInference; - - /** - * Decodes a AIInference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AIInference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.AIInference; - - /** - * Verifies a AIInference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a AIInference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AIInference - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.AIInference; - - /** - * Creates a plain object from a AIInference message. Also converts values to other types if specified. - * @param message AIInference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.AIInference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AIInference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AIInference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AIInference { - - /** Properties of an UnstructuredInference. */ - interface IUnstructuredInference { - - /** UnstructuredInference parameters */ - parameters?: (google.protobuf.IStruct|null); - } - - /** Represents an UnstructuredInference. */ - class UnstructuredInference implements IUnstructuredInference { - - /** - * Constructs a new UnstructuredInference. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.AIInference.IUnstructuredInference); - - /** UnstructuredInference parameters. */ - public parameters?: (google.protobuf.IStruct|null); - - /** - * Creates a new UnstructuredInference instance using the specified properties. - * @param [properties] Properties to set - * @returns UnstructuredInference instance - */ - public static create(properties?: google.pubsub.v1.AIInference.IUnstructuredInference): google.pubsub.v1.AIInference.UnstructuredInference; - - /** - * Encodes the specified UnstructuredInference message. Does not implicitly {@link google.pubsub.v1.AIInference.UnstructuredInference.verify|verify} messages. - * @param message UnstructuredInference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.AIInference.IUnstructuredInference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UnstructuredInference message, length delimited. Does not implicitly {@link google.pubsub.v1.AIInference.UnstructuredInference.verify|verify} messages. - * @param message UnstructuredInference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.AIInference.IUnstructuredInference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UnstructuredInference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UnstructuredInference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.AIInference.UnstructuredInference; - - /** - * Decodes an UnstructuredInference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UnstructuredInference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.AIInference.UnstructuredInference; - - /** - * Verifies an UnstructuredInference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UnstructuredInference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UnstructuredInference - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.AIInference.UnstructuredInference; - - /** - * Creates a plain object from an UnstructuredInference message. Also converts values to other types if specified. - * @param message UnstructuredInference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.AIInference.UnstructuredInference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UnstructuredInference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UnstructuredInference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a MessageTransform. */ - interface IMessageTransform { - - /** MessageTransform javascriptUdf */ - javascriptUdf?: (google.pubsub.v1.IJavaScriptUDF|null); - - /** MessageTransform aiInference */ - aiInference?: (google.pubsub.v1.IAIInference|null); - - /** MessageTransform enabled */ - enabled?: (boolean|null); - - /** MessageTransform disabled */ - disabled?: (boolean|null); - } - - /** Represents a MessageTransform. */ - class MessageTransform implements IMessageTransform { - - /** - * Constructs a new MessageTransform. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IMessageTransform); - - /** MessageTransform javascriptUdf. */ - public javascriptUdf?: (google.pubsub.v1.IJavaScriptUDF|null); - - /** MessageTransform aiInference. */ - public aiInference?: (google.pubsub.v1.IAIInference|null); - - /** MessageTransform enabled. */ - public enabled: boolean; - - /** MessageTransform disabled. */ - public disabled: boolean; - - /** MessageTransform transform. */ - public transform?: ("javascriptUdf"|"aiInference"); - - /** - * Creates a new MessageTransform instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageTransform instance - */ - public static create(properties?: google.pubsub.v1.IMessageTransform): google.pubsub.v1.MessageTransform; - - /** - * Encodes the specified MessageTransform message. Does not implicitly {@link google.pubsub.v1.MessageTransform.verify|verify} messages. - * @param message MessageTransform message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IMessageTransform, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageTransform message, length delimited. Does not implicitly {@link google.pubsub.v1.MessageTransform.verify|verify} messages. - * @param message MessageTransform message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IMessageTransform, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageTransform message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageTransform - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.MessageTransform; - - /** - * Decodes a MessageTransform message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageTransform - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.MessageTransform; - - /** - * Verifies a MessageTransform message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MessageTransform message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageTransform - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.MessageTransform; - - /** - * Creates a plain object from a MessageTransform message. Also converts values to other types if specified. - * @param message MessageTransform - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.MessageTransform, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageTransform to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageTransform - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Topic. */ - interface ITopic { - - /** Topic name */ - name?: (string|null); - - /** Topic labels */ - labels?: ({ [k: string]: string }|null); - - /** Topic messageStoragePolicy */ - messageStoragePolicy?: (google.pubsub.v1.IMessageStoragePolicy|null); - - /** Topic kmsKeyName */ - kmsKeyName?: (string|null); - - /** Topic schemaSettings */ - schemaSettings?: (google.pubsub.v1.ISchemaSettings|null); - - /** Topic satisfiesPzs */ - satisfiesPzs?: (boolean|null); - - /** Topic messageRetentionDuration */ - messageRetentionDuration?: (google.protobuf.IDuration|null); - - /** Topic state */ - state?: (google.pubsub.v1.Topic.State|keyof typeof google.pubsub.v1.Topic.State|null); - - /** Topic ingestionDataSourceSettings */ - ingestionDataSourceSettings?: (google.pubsub.v1.IIngestionDataSourceSettings|null); - - /** Topic messageTransforms */ - messageTransforms?: (google.pubsub.v1.IMessageTransform[]|null); - - /** Topic tags */ - tags?: ({ [k: string]: string }|null); - } - - /** Represents a Topic. */ - class Topic implements ITopic { - - /** - * Constructs a new Topic. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.ITopic); - - /** Topic name. */ - public name: string; - - /** Topic labels. */ - public labels: { [k: string]: string }; - - /** Topic messageStoragePolicy. */ - public messageStoragePolicy?: (google.pubsub.v1.IMessageStoragePolicy|null); - - /** Topic kmsKeyName. */ - public kmsKeyName: string; - - /** Topic schemaSettings. */ - public schemaSettings?: (google.pubsub.v1.ISchemaSettings|null); - - /** Topic satisfiesPzs. */ - public satisfiesPzs: boolean; - - /** Topic messageRetentionDuration. */ - public messageRetentionDuration?: (google.protobuf.IDuration|null); - - /** Topic state. */ - public state: (google.pubsub.v1.Topic.State|keyof typeof google.pubsub.v1.Topic.State); - - /** Topic ingestionDataSourceSettings. */ - public ingestionDataSourceSettings?: (google.pubsub.v1.IIngestionDataSourceSettings|null); - - /** Topic messageTransforms. */ - public messageTransforms: google.pubsub.v1.IMessageTransform[]; - - /** Topic tags. */ - public tags: { [k: string]: string }; - - /** - * Creates a new Topic instance using the specified properties. - * @param [properties] Properties to set - * @returns Topic instance - */ - public static create(properties?: google.pubsub.v1.ITopic): google.pubsub.v1.Topic; - - /** - * Encodes the specified Topic message. Does not implicitly {@link google.pubsub.v1.Topic.verify|verify} messages. - * @param message Topic message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.ITopic, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Topic message, length delimited. Does not implicitly {@link google.pubsub.v1.Topic.verify|verify} messages. - * @param message Topic message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.ITopic, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Topic message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Topic - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.Topic; - - /** - * Decodes a Topic message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Topic - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.Topic; - - /** - * Verifies a Topic message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Topic message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Topic - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.Topic; - - /** - * Creates a plain object from a Topic message. Also converts values to other types if specified. - * @param message Topic - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.Topic, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Topic to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Topic - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Topic { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - INGESTION_RESOURCE_ERROR = 2 - } - } - - /** Properties of a PubsubMessage. */ - interface IPubsubMessage { - - /** PubsubMessage data */ - data?: (Uint8Array|Buffer|string|null); - - /** PubsubMessage attributes */ - attributes?: ({ [k: string]: string }|null); - - /** PubsubMessage messageId */ - messageId?: (string|null); - - /** PubsubMessage publishTime */ - publishTime?: (google.protobuf.ITimestamp|null); - - /** PubsubMessage orderingKey */ - orderingKey?: (string|null); - } - - /** Represents a PubsubMessage. */ - class PubsubMessage implements IPubsubMessage { - - /** - * Constructs a new PubsubMessage. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IPubsubMessage); - - /** PubsubMessage data. */ - public data: (Uint8Array|Buffer|string); - - /** PubsubMessage attributes. */ - public attributes: { [k: string]: string }; - - /** PubsubMessage messageId. */ - public messageId: string; - - /** PubsubMessage publishTime. */ - public publishTime?: (google.protobuf.ITimestamp|null); - - /** PubsubMessage orderingKey. */ - public orderingKey: string; - - /** - * Creates a new PubsubMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns PubsubMessage instance - */ - public static create(properties?: google.pubsub.v1.IPubsubMessage): google.pubsub.v1.PubsubMessage; - - /** - * Encodes the specified PubsubMessage message. Does not implicitly {@link google.pubsub.v1.PubsubMessage.verify|verify} messages. - * @param message PubsubMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IPubsubMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PubsubMessage message, length delimited. Does not implicitly {@link google.pubsub.v1.PubsubMessage.verify|verify} messages. - * @param message PubsubMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IPubsubMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PubsubMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PubsubMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.PubsubMessage; - - /** - * Decodes a PubsubMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PubsubMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.PubsubMessage; - - /** - * Verifies a PubsubMessage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PubsubMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PubsubMessage - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.PubsubMessage; - - /** - * Creates a plain object from a PubsubMessage message. Also converts values to other types if specified. - * @param message PubsubMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.PubsubMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PubsubMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PubsubMessage - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetTopicRequest. */ - interface IGetTopicRequest { - - /** GetTopicRequest topic */ - topic?: (string|null); - } - - /** Represents a GetTopicRequest. */ - class GetTopicRequest implements IGetTopicRequest { - - /** - * Constructs a new GetTopicRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IGetTopicRequest); - - /** GetTopicRequest topic. */ - public topic: string; - - /** - * Creates a new GetTopicRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetTopicRequest instance - */ - public static create(properties?: google.pubsub.v1.IGetTopicRequest): google.pubsub.v1.GetTopicRequest; - - /** - * Encodes the specified GetTopicRequest message. Does not implicitly {@link google.pubsub.v1.GetTopicRequest.verify|verify} messages. - * @param message GetTopicRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IGetTopicRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetTopicRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.GetTopicRequest.verify|verify} messages. - * @param message GetTopicRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IGetTopicRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetTopicRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetTopicRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.GetTopicRequest; - - /** - * Decodes a GetTopicRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetTopicRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.GetTopicRequest; - - /** - * Verifies a GetTopicRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetTopicRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetTopicRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.GetTopicRequest; - - /** - * Creates a plain object from a GetTopicRequest message. Also converts values to other types if specified. - * @param message GetTopicRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.GetTopicRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetTopicRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetTopicRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateTopicRequest. */ - interface IUpdateTopicRequest { - - /** UpdateTopicRequest topic */ - topic?: (google.pubsub.v1.ITopic|null); - - /** UpdateTopicRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateTopicRequest. */ - class UpdateTopicRequest implements IUpdateTopicRequest { - - /** - * Constructs a new UpdateTopicRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IUpdateTopicRequest); - - /** UpdateTopicRequest topic. */ - public topic?: (google.pubsub.v1.ITopic|null); - - /** UpdateTopicRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateTopicRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateTopicRequest instance - */ - public static create(properties?: google.pubsub.v1.IUpdateTopicRequest): google.pubsub.v1.UpdateTopicRequest; - - /** - * Encodes the specified UpdateTopicRequest message. Does not implicitly {@link google.pubsub.v1.UpdateTopicRequest.verify|verify} messages. - * @param message UpdateTopicRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IUpdateTopicRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateTopicRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.UpdateTopicRequest.verify|verify} messages. - * @param message UpdateTopicRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IUpdateTopicRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateTopicRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateTopicRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.UpdateTopicRequest; - - /** - * Decodes an UpdateTopicRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateTopicRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.UpdateTopicRequest; - - /** - * Verifies an UpdateTopicRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateTopicRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateTopicRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.UpdateTopicRequest; - - /** - * Creates a plain object from an UpdateTopicRequest message. Also converts values to other types if specified. - * @param message UpdateTopicRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.UpdateTopicRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateTopicRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateTopicRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PublishRequest. */ - interface IPublishRequest { - - /** PublishRequest topic */ - topic?: (string|null); - - /** PublishRequest messages */ - messages?: (google.pubsub.v1.IPubsubMessage[]|null); - } - - /** Represents a PublishRequest. */ - class PublishRequest implements IPublishRequest { - - /** - * Constructs a new PublishRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IPublishRequest); - - /** PublishRequest topic. */ - public topic: string; - - /** PublishRequest messages. */ - public messages: google.pubsub.v1.IPubsubMessage[]; - - /** - * Creates a new PublishRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PublishRequest instance - */ - public static create(properties?: google.pubsub.v1.IPublishRequest): google.pubsub.v1.PublishRequest; - - /** - * Encodes the specified PublishRequest message. Does not implicitly {@link google.pubsub.v1.PublishRequest.verify|verify} messages. - * @param message PublishRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IPublishRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PublishRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.PublishRequest.verify|verify} messages. - * @param message PublishRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IPublishRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PublishRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PublishRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.PublishRequest; - - /** - * Decodes a PublishRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PublishRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.PublishRequest; - - /** - * Verifies a PublishRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PublishRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PublishRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.PublishRequest; - - /** - * Creates a plain object from a PublishRequest message. Also converts values to other types if specified. - * @param message PublishRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.PublishRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PublishRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PublishRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PublishResponse. */ - interface IPublishResponse { - - /** PublishResponse messageIds */ - messageIds?: (string[]|null); - } - - /** Represents a PublishResponse. */ - class PublishResponse implements IPublishResponse { - - /** - * Constructs a new PublishResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IPublishResponse); - - /** PublishResponse messageIds. */ - public messageIds: string[]; - - /** - * Creates a new PublishResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PublishResponse instance - */ - public static create(properties?: google.pubsub.v1.IPublishResponse): google.pubsub.v1.PublishResponse; - - /** - * Encodes the specified PublishResponse message. Does not implicitly {@link google.pubsub.v1.PublishResponse.verify|verify} messages. - * @param message PublishResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IPublishResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PublishResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.PublishResponse.verify|verify} messages. - * @param message PublishResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IPublishResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PublishResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PublishResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.PublishResponse; - - /** - * Decodes a PublishResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PublishResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.PublishResponse; - - /** - * Verifies a PublishResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PublishResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PublishResponse - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.PublishResponse; - - /** - * Creates a plain object from a PublishResponse message. Also converts values to other types if specified. - * @param message PublishResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.PublishResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PublishResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PublishResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTopicsRequest. */ - interface IListTopicsRequest { - - /** ListTopicsRequest project */ - project?: (string|null); - - /** ListTopicsRequest pageSize */ - pageSize?: (number|null); - - /** ListTopicsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListTopicsRequest. */ - class ListTopicsRequest implements IListTopicsRequest { - - /** - * Constructs a new ListTopicsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IListTopicsRequest); - - /** ListTopicsRequest project. */ - public project: string; - - /** ListTopicsRequest pageSize. */ - public pageSize: number; - - /** ListTopicsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListTopicsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTopicsRequest instance - */ - public static create(properties?: google.pubsub.v1.IListTopicsRequest): google.pubsub.v1.ListTopicsRequest; - - /** - * Encodes the specified ListTopicsRequest message. Does not implicitly {@link google.pubsub.v1.ListTopicsRequest.verify|verify} messages. - * @param message ListTopicsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IListTopicsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTopicsRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ListTopicsRequest.verify|verify} messages. - * @param message ListTopicsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IListTopicsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTopicsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTopicsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ListTopicsRequest; - - /** - * Decodes a ListTopicsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTopicsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ListTopicsRequest; - - /** - * Verifies a ListTopicsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTopicsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTopicsRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ListTopicsRequest; - - /** - * Creates a plain object from a ListTopicsRequest message. Also converts values to other types if specified. - * @param message ListTopicsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ListTopicsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTopicsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTopicsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTopicsResponse. */ - interface IListTopicsResponse { - - /** ListTopicsResponse topics */ - topics?: (google.pubsub.v1.ITopic[]|null); - - /** ListTopicsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListTopicsResponse. */ - class ListTopicsResponse implements IListTopicsResponse { - - /** - * Constructs a new ListTopicsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IListTopicsResponse); - - /** ListTopicsResponse topics. */ - public topics: google.pubsub.v1.ITopic[]; - - /** ListTopicsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListTopicsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTopicsResponse instance - */ - public static create(properties?: google.pubsub.v1.IListTopicsResponse): google.pubsub.v1.ListTopicsResponse; - - /** - * Encodes the specified ListTopicsResponse message. Does not implicitly {@link google.pubsub.v1.ListTopicsResponse.verify|verify} messages. - * @param message ListTopicsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IListTopicsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTopicsResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ListTopicsResponse.verify|verify} messages. - * @param message ListTopicsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IListTopicsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTopicsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTopicsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ListTopicsResponse; - - /** - * Decodes a ListTopicsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTopicsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ListTopicsResponse; - - /** - * Verifies a ListTopicsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTopicsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTopicsResponse - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ListTopicsResponse; - - /** - * Creates a plain object from a ListTopicsResponse message. Also converts values to other types if specified. - * @param message ListTopicsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ListTopicsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTopicsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTopicsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTopicSubscriptionsRequest. */ - interface IListTopicSubscriptionsRequest { - - /** ListTopicSubscriptionsRequest topic */ - topic?: (string|null); - - /** ListTopicSubscriptionsRequest pageSize */ - pageSize?: (number|null); - - /** ListTopicSubscriptionsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListTopicSubscriptionsRequest. */ - class ListTopicSubscriptionsRequest implements IListTopicSubscriptionsRequest { - - /** - * Constructs a new ListTopicSubscriptionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IListTopicSubscriptionsRequest); - - /** ListTopicSubscriptionsRequest topic. */ - public topic: string; - - /** ListTopicSubscriptionsRequest pageSize. */ - public pageSize: number; - - /** ListTopicSubscriptionsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListTopicSubscriptionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTopicSubscriptionsRequest instance - */ - public static create(properties?: google.pubsub.v1.IListTopicSubscriptionsRequest): google.pubsub.v1.ListTopicSubscriptionsRequest; - - /** - * Encodes the specified ListTopicSubscriptionsRequest message. Does not implicitly {@link google.pubsub.v1.ListTopicSubscriptionsRequest.verify|verify} messages. - * @param message ListTopicSubscriptionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IListTopicSubscriptionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTopicSubscriptionsRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ListTopicSubscriptionsRequest.verify|verify} messages. - * @param message ListTopicSubscriptionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IListTopicSubscriptionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTopicSubscriptionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTopicSubscriptionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ListTopicSubscriptionsRequest; - - /** - * Decodes a ListTopicSubscriptionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTopicSubscriptionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ListTopicSubscriptionsRequest; - - /** - * Verifies a ListTopicSubscriptionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTopicSubscriptionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTopicSubscriptionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ListTopicSubscriptionsRequest; - - /** - * Creates a plain object from a ListTopicSubscriptionsRequest message. Also converts values to other types if specified. - * @param message ListTopicSubscriptionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ListTopicSubscriptionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTopicSubscriptionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTopicSubscriptionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTopicSubscriptionsResponse. */ - interface IListTopicSubscriptionsResponse { - - /** ListTopicSubscriptionsResponse subscriptions */ - subscriptions?: (string[]|null); - - /** ListTopicSubscriptionsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListTopicSubscriptionsResponse. */ - class ListTopicSubscriptionsResponse implements IListTopicSubscriptionsResponse { - - /** - * Constructs a new ListTopicSubscriptionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IListTopicSubscriptionsResponse); - - /** ListTopicSubscriptionsResponse subscriptions. */ - public subscriptions: string[]; - - /** ListTopicSubscriptionsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListTopicSubscriptionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTopicSubscriptionsResponse instance - */ - public static create(properties?: google.pubsub.v1.IListTopicSubscriptionsResponse): google.pubsub.v1.ListTopicSubscriptionsResponse; - - /** - * Encodes the specified ListTopicSubscriptionsResponse message. Does not implicitly {@link google.pubsub.v1.ListTopicSubscriptionsResponse.verify|verify} messages. - * @param message ListTopicSubscriptionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IListTopicSubscriptionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTopicSubscriptionsResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ListTopicSubscriptionsResponse.verify|verify} messages. - * @param message ListTopicSubscriptionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IListTopicSubscriptionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTopicSubscriptionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTopicSubscriptionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ListTopicSubscriptionsResponse; - - /** - * Decodes a ListTopicSubscriptionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTopicSubscriptionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ListTopicSubscriptionsResponse; - - /** - * Verifies a ListTopicSubscriptionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTopicSubscriptionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTopicSubscriptionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ListTopicSubscriptionsResponse; - - /** - * Creates a plain object from a ListTopicSubscriptionsResponse message. Also converts values to other types if specified. - * @param message ListTopicSubscriptionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ListTopicSubscriptionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTopicSubscriptionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTopicSubscriptionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTopicSnapshotsRequest. */ - interface IListTopicSnapshotsRequest { - - /** ListTopicSnapshotsRequest topic */ - topic?: (string|null); - - /** ListTopicSnapshotsRequest pageSize */ - pageSize?: (number|null); - - /** ListTopicSnapshotsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListTopicSnapshotsRequest. */ - class ListTopicSnapshotsRequest implements IListTopicSnapshotsRequest { - - /** - * Constructs a new ListTopicSnapshotsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IListTopicSnapshotsRequest); - - /** ListTopicSnapshotsRequest topic. */ - public topic: string; - - /** ListTopicSnapshotsRequest pageSize. */ - public pageSize: number; - - /** ListTopicSnapshotsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListTopicSnapshotsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTopicSnapshotsRequest instance - */ - public static create(properties?: google.pubsub.v1.IListTopicSnapshotsRequest): google.pubsub.v1.ListTopicSnapshotsRequest; - - /** - * Encodes the specified ListTopicSnapshotsRequest message. Does not implicitly {@link google.pubsub.v1.ListTopicSnapshotsRequest.verify|verify} messages. - * @param message ListTopicSnapshotsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IListTopicSnapshotsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTopicSnapshotsRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ListTopicSnapshotsRequest.verify|verify} messages. - * @param message ListTopicSnapshotsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IListTopicSnapshotsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTopicSnapshotsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTopicSnapshotsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ListTopicSnapshotsRequest; - - /** - * Decodes a ListTopicSnapshotsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTopicSnapshotsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ListTopicSnapshotsRequest; - - /** - * Verifies a ListTopicSnapshotsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTopicSnapshotsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTopicSnapshotsRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ListTopicSnapshotsRequest; - - /** - * Creates a plain object from a ListTopicSnapshotsRequest message. Also converts values to other types if specified. - * @param message ListTopicSnapshotsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ListTopicSnapshotsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTopicSnapshotsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTopicSnapshotsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListTopicSnapshotsResponse. */ - interface IListTopicSnapshotsResponse { - - /** ListTopicSnapshotsResponse snapshots */ - snapshots?: (string[]|null); - - /** ListTopicSnapshotsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListTopicSnapshotsResponse. */ - class ListTopicSnapshotsResponse implements IListTopicSnapshotsResponse { - - /** - * Constructs a new ListTopicSnapshotsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IListTopicSnapshotsResponse); - - /** ListTopicSnapshotsResponse snapshots. */ - public snapshots: string[]; - - /** ListTopicSnapshotsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListTopicSnapshotsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListTopicSnapshotsResponse instance - */ - public static create(properties?: google.pubsub.v1.IListTopicSnapshotsResponse): google.pubsub.v1.ListTopicSnapshotsResponse; - - /** - * Encodes the specified ListTopicSnapshotsResponse message. Does not implicitly {@link google.pubsub.v1.ListTopicSnapshotsResponse.verify|verify} messages. - * @param message ListTopicSnapshotsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IListTopicSnapshotsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListTopicSnapshotsResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ListTopicSnapshotsResponse.verify|verify} messages. - * @param message ListTopicSnapshotsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IListTopicSnapshotsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListTopicSnapshotsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListTopicSnapshotsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ListTopicSnapshotsResponse; - - /** - * Decodes a ListTopicSnapshotsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListTopicSnapshotsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ListTopicSnapshotsResponse; - - /** - * Verifies a ListTopicSnapshotsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListTopicSnapshotsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListTopicSnapshotsResponse - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ListTopicSnapshotsResponse; - - /** - * Creates a plain object from a ListTopicSnapshotsResponse message. Also converts values to other types if specified. - * @param message ListTopicSnapshotsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ListTopicSnapshotsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListTopicSnapshotsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListTopicSnapshotsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteTopicRequest. */ - interface IDeleteTopicRequest { - - /** DeleteTopicRequest topic */ - topic?: (string|null); - } - - /** Represents a DeleteTopicRequest. */ - class DeleteTopicRequest implements IDeleteTopicRequest { - - /** - * Constructs a new DeleteTopicRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IDeleteTopicRequest); - - /** DeleteTopicRequest topic. */ - public topic: string; - - /** - * Creates a new DeleteTopicRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteTopicRequest instance - */ - public static create(properties?: google.pubsub.v1.IDeleteTopicRequest): google.pubsub.v1.DeleteTopicRequest; - - /** - * Encodes the specified DeleteTopicRequest message. Does not implicitly {@link google.pubsub.v1.DeleteTopicRequest.verify|verify} messages. - * @param message DeleteTopicRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IDeleteTopicRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteTopicRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.DeleteTopicRequest.verify|verify} messages. - * @param message DeleteTopicRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IDeleteTopicRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteTopicRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteTopicRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.DeleteTopicRequest; - - /** - * Decodes a DeleteTopicRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteTopicRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.DeleteTopicRequest; - - /** - * Verifies a DeleteTopicRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteTopicRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteTopicRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.DeleteTopicRequest; - - /** - * Creates a plain object from a DeleteTopicRequest message. Also converts values to other types if specified. - * @param message DeleteTopicRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.DeleteTopicRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteTopicRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteTopicRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DetachSubscriptionRequest. */ - interface IDetachSubscriptionRequest { - - /** DetachSubscriptionRequest subscription */ - subscription?: (string|null); - } - - /** Represents a DetachSubscriptionRequest. */ - class DetachSubscriptionRequest implements IDetachSubscriptionRequest { - - /** - * Constructs a new DetachSubscriptionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IDetachSubscriptionRequest); - - /** DetachSubscriptionRequest subscription. */ - public subscription: string; - - /** - * Creates a new DetachSubscriptionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DetachSubscriptionRequest instance - */ - public static create(properties?: google.pubsub.v1.IDetachSubscriptionRequest): google.pubsub.v1.DetachSubscriptionRequest; - - /** - * Encodes the specified DetachSubscriptionRequest message. Does not implicitly {@link google.pubsub.v1.DetachSubscriptionRequest.verify|verify} messages. - * @param message DetachSubscriptionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IDetachSubscriptionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DetachSubscriptionRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.DetachSubscriptionRequest.verify|verify} messages. - * @param message DetachSubscriptionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IDetachSubscriptionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DetachSubscriptionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DetachSubscriptionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.DetachSubscriptionRequest; - - /** - * Decodes a DetachSubscriptionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DetachSubscriptionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.DetachSubscriptionRequest; - - /** - * Verifies a DetachSubscriptionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DetachSubscriptionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DetachSubscriptionRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.DetachSubscriptionRequest; - - /** - * Creates a plain object from a DetachSubscriptionRequest message. Also converts values to other types if specified. - * @param message DetachSubscriptionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.DetachSubscriptionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DetachSubscriptionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DetachSubscriptionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DetachSubscriptionResponse. */ - interface IDetachSubscriptionResponse { - } - - /** Represents a DetachSubscriptionResponse. */ - class DetachSubscriptionResponse implements IDetachSubscriptionResponse { - - /** - * Constructs a new DetachSubscriptionResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IDetachSubscriptionResponse); - - /** - * Creates a new DetachSubscriptionResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DetachSubscriptionResponse instance - */ - public static create(properties?: google.pubsub.v1.IDetachSubscriptionResponse): google.pubsub.v1.DetachSubscriptionResponse; - - /** - * Encodes the specified DetachSubscriptionResponse message. Does not implicitly {@link google.pubsub.v1.DetachSubscriptionResponse.verify|verify} messages. - * @param message DetachSubscriptionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IDetachSubscriptionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DetachSubscriptionResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.DetachSubscriptionResponse.verify|verify} messages. - * @param message DetachSubscriptionResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IDetachSubscriptionResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DetachSubscriptionResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DetachSubscriptionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.DetachSubscriptionResponse; - - /** - * Decodes a DetachSubscriptionResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DetachSubscriptionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.DetachSubscriptionResponse; - - /** - * Verifies a DetachSubscriptionResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DetachSubscriptionResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DetachSubscriptionResponse - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.DetachSubscriptionResponse; - - /** - * Creates a plain object from a DetachSubscriptionResponse message. Also converts values to other types if specified. - * @param message DetachSubscriptionResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.DetachSubscriptionResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DetachSubscriptionResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DetachSubscriptionResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a Subscriber */ - class Subscriber extends $protobuf.rpc.Service { - - /** - * Constructs a new Subscriber 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); - - /** - * Creates new Subscriber service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Subscriber; - - /** - * Calls CreateSubscription. - * @param request Subscription message or plain object - * @param callback Node-style callback called with the error, if any, and Subscription - */ - public createSubscription(request: google.pubsub.v1.ISubscription, callback: google.pubsub.v1.Subscriber.CreateSubscriptionCallback): void; - - /** - * Calls CreateSubscription. - * @param request Subscription message or plain object - * @returns Promise - */ - public createSubscription(request: google.pubsub.v1.ISubscription): Promise; - - /** - * Calls GetSubscription. - * @param request GetSubscriptionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Subscription - */ - public getSubscription(request: google.pubsub.v1.IGetSubscriptionRequest, callback: google.pubsub.v1.Subscriber.GetSubscriptionCallback): void; - - /** - * Calls GetSubscription. - * @param request GetSubscriptionRequest message or plain object - * @returns Promise - */ - public getSubscription(request: google.pubsub.v1.IGetSubscriptionRequest): Promise; - - /** - * Calls UpdateSubscription. - * @param request UpdateSubscriptionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Subscription - */ - public updateSubscription(request: google.pubsub.v1.IUpdateSubscriptionRequest, callback: google.pubsub.v1.Subscriber.UpdateSubscriptionCallback): void; - - /** - * Calls UpdateSubscription. - * @param request UpdateSubscriptionRequest message or plain object - * @returns Promise - */ - public updateSubscription(request: google.pubsub.v1.IUpdateSubscriptionRequest): Promise; - - /** - * Calls ListSubscriptions. - * @param request ListSubscriptionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSubscriptionsResponse - */ - public listSubscriptions(request: google.pubsub.v1.IListSubscriptionsRequest, callback: google.pubsub.v1.Subscriber.ListSubscriptionsCallback): void; - - /** - * Calls ListSubscriptions. - * @param request ListSubscriptionsRequest message or plain object - * @returns Promise - */ - public listSubscriptions(request: google.pubsub.v1.IListSubscriptionsRequest): Promise; - - /** - * Calls DeleteSubscription. - * @param request DeleteSubscriptionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteSubscription(request: google.pubsub.v1.IDeleteSubscriptionRequest, callback: google.pubsub.v1.Subscriber.DeleteSubscriptionCallback): void; - - /** - * Calls DeleteSubscription. - * @param request DeleteSubscriptionRequest message or plain object - * @returns Promise - */ - public deleteSubscription(request: google.pubsub.v1.IDeleteSubscriptionRequest): Promise; - - /** - * Calls ModifyAckDeadline. - * @param request ModifyAckDeadlineRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public modifyAckDeadline(request: google.pubsub.v1.IModifyAckDeadlineRequest, callback: google.pubsub.v1.Subscriber.ModifyAckDeadlineCallback): void; - - /** - * Calls ModifyAckDeadline. - * @param request ModifyAckDeadlineRequest message or plain object - * @returns Promise - */ - public modifyAckDeadline(request: google.pubsub.v1.IModifyAckDeadlineRequest): Promise; - - /** - * Calls Acknowledge. - * @param request AcknowledgeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public acknowledge(request: google.pubsub.v1.IAcknowledgeRequest, callback: google.pubsub.v1.Subscriber.AcknowledgeCallback): void; - - /** - * Calls Acknowledge. - * @param request AcknowledgeRequest message or plain object - * @returns Promise - */ - public acknowledge(request: google.pubsub.v1.IAcknowledgeRequest): Promise; - - /** - * Calls Pull. - * @param request PullRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PullResponse - */ - public pull(request: google.pubsub.v1.IPullRequest, callback: google.pubsub.v1.Subscriber.PullCallback): void; - - /** - * Calls Pull. - * @param request PullRequest message or plain object - * @returns Promise - */ - public pull(request: google.pubsub.v1.IPullRequest): Promise; - - /** - * Calls StreamingPull. - * @param request StreamingPullRequest message or plain object - * @param callback Node-style callback called with the error, if any, and StreamingPullResponse - */ - public streamingPull(request: google.pubsub.v1.IStreamingPullRequest, callback: google.pubsub.v1.Subscriber.StreamingPullCallback): void; - - /** - * Calls StreamingPull. - * @param request StreamingPullRequest message or plain object - * @returns Promise - */ - public streamingPull(request: google.pubsub.v1.IStreamingPullRequest): Promise; - - /** - * Calls ModifyPushConfig. - * @param request ModifyPushConfigRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public modifyPushConfig(request: google.pubsub.v1.IModifyPushConfigRequest, callback: google.pubsub.v1.Subscriber.ModifyPushConfigCallback): void; - - /** - * Calls ModifyPushConfig. - * @param request ModifyPushConfigRequest message or plain object - * @returns Promise - */ - public modifyPushConfig(request: google.pubsub.v1.IModifyPushConfigRequest): Promise; - - /** - * Calls GetSnapshot. - * @param request GetSnapshotRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Snapshot - */ - public getSnapshot(request: google.pubsub.v1.IGetSnapshotRequest, callback: google.pubsub.v1.Subscriber.GetSnapshotCallback): void; - - /** - * Calls GetSnapshot. - * @param request GetSnapshotRequest message or plain object - * @returns Promise - */ - public getSnapshot(request: google.pubsub.v1.IGetSnapshotRequest): Promise; - - /** - * Calls ListSnapshots. - * @param request ListSnapshotsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSnapshotsResponse - */ - public listSnapshots(request: google.pubsub.v1.IListSnapshotsRequest, callback: google.pubsub.v1.Subscriber.ListSnapshotsCallback): void; - - /** - * Calls ListSnapshots. - * @param request ListSnapshotsRequest message or plain object - * @returns Promise - */ - public listSnapshots(request: google.pubsub.v1.IListSnapshotsRequest): Promise; - - /** - * Calls CreateSnapshot. - * @param request CreateSnapshotRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Snapshot - */ - public createSnapshot(request: google.pubsub.v1.ICreateSnapshotRequest, callback: google.pubsub.v1.Subscriber.CreateSnapshotCallback): void; - - /** - * Calls CreateSnapshot. - * @param request CreateSnapshotRequest message or plain object - * @returns Promise - */ - public createSnapshot(request: google.pubsub.v1.ICreateSnapshotRequest): Promise; - - /** - * Calls UpdateSnapshot. - * @param request UpdateSnapshotRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Snapshot - */ - public updateSnapshot(request: google.pubsub.v1.IUpdateSnapshotRequest, callback: google.pubsub.v1.Subscriber.UpdateSnapshotCallback): void; - - /** - * Calls UpdateSnapshot. - * @param request UpdateSnapshotRequest message or plain object - * @returns Promise - */ - public updateSnapshot(request: google.pubsub.v1.IUpdateSnapshotRequest): Promise; - - /** - * Calls DeleteSnapshot. - * @param request DeleteSnapshotRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteSnapshot(request: google.pubsub.v1.IDeleteSnapshotRequest, callback: google.pubsub.v1.Subscriber.DeleteSnapshotCallback): void; - - /** - * Calls DeleteSnapshot. - * @param request DeleteSnapshotRequest message or plain object - * @returns Promise - */ - public deleteSnapshot(request: google.pubsub.v1.IDeleteSnapshotRequest): Promise; - - /** - * Calls Seek. - * @param request SeekRequest message or plain object - * @param callback Node-style callback called with the error, if any, and SeekResponse - */ - public seek(request: google.pubsub.v1.ISeekRequest, callback: google.pubsub.v1.Subscriber.SeekCallback): void; - - /** - * Calls Seek. - * @param request SeekRequest message or plain object - * @returns Promise - */ - public seek(request: google.pubsub.v1.ISeekRequest): Promise; - } - - namespace Subscriber { - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|createSubscription}. - * @param error Error, if any - * @param [response] Subscription - */ - type CreateSubscriptionCallback = (error: (Error|null), response?: google.pubsub.v1.Subscription) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|getSubscription}. - * @param error Error, if any - * @param [response] Subscription - */ - type GetSubscriptionCallback = (error: (Error|null), response?: google.pubsub.v1.Subscription) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|updateSubscription}. - * @param error Error, if any - * @param [response] Subscription - */ - type UpdateSubscriptionCallback = (error: (Error|null), response?: google.pubsub.v1.Subscription) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|listSubscriptions}. - * @param error Error, if any - * @param [response] ListSubscriptionsResponse - */ - type ListSubscriptionsCallback = (error: (Error|null), response?: google.pubsub.v1.ListSubscriptionsResponse) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|deleteSubscription}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteSubscriptionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|modifyAckDeadline}. - * @param error Error, if any - * @param [response] Empty - */ - type ModifyAckDeadlineCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|acknowledge}. - * @param error Error, if any - * @param [response] Empty - */ - type AcknowledgeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|pull}. - * @param error Error, if any - * @param [response] PullResponse - */ - type PullCallback = (error: (Error|null), response?: google.pubsub.v1.PullResponse) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|streamingPull}. - * @param error Error, if any - * @param [response] StreamingPullResponse - */ - type StreamingPullCallback = (error: (Error|null), response?: google.pubsub.v1.StreamingPullResponse) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|modifyPushConfig}. - * @param error Error, if any - * @param [response] Empty - */ - type ModifyPushConfigCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|getSnapshot}. - * @param error Error, if any - * @param [response] Snapshot - */ - type GetSnapshotCallback = (error: (Error|null), response?: google.pubsub.v1.Snapshot) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|listSnapshots}. - * @param error Error, if any - * @param [response] ListSnapshotsResponse - */ - type ListSnapshotsCallback = (error: (Error|null), response?: google.pubsub.v1.ListSnapshotsResponse) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|createSnapshot}. - * @param error Error, if any - * @param [response] Snapshot - */ - type CreateSnapshotCallback = (error: (Error|null), response?: google.pubsub.v1.Snapshot) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|updateSnapshot}. - * @param error Error, if any - * @param [response] Snapshot - */ - type UpdateSnapshotCallback = (error: (Error|null), response?: google.pubsub.v1.Snapshot) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|deleteSnapshot}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteSnapshotCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|seek}. - * @param error Error, if any - * @param [response] SeekResponse - */ - type SeekCallback = (error: (Error|null), response?: google.pubsub.v1.SeekResponse) => void; - } - - /** Properties of a Subscription. */ - interface ISubscription { - - /** Subscription name */ - name?: (string|null); - - /** Subscription topic */ - topic?: (string|null); - - /** Subscription pushConfig */ - pushConfig?: (google.pubsub.v1.IPushConfig|null); - - /** Subscription bigqueryConfig */ - bigqueryConfig?: (google.pubsub.v1.IBigQueryConfig|null); - - /** Subscription cloudStorageConfig */ - cloudStorageConfig?: (google.pubsub.v1.ICloudStorageConfig|null); - - /** Subscription bigtableConfig */ - bigtableConfig?: (google.pubsub.v1.IBigtableConfig|null); - - /** Subscription ackDeadlineSeconds */ - ackDeadlineSeconds?: (number|null); - - /** Subscription retainAckedMessages */ - retainAckedMessages?: (boolean|null); - - /** Subscription messageRetentionDuration */ - messageRetentionDuration?: (google.protobuf.IDuration|null); - - /** Subscription labels */ - labels?: ({ [k: string]: string }|null); - - /** Subscription enableMessageOrdering */ - enableMessageOrdering?: (boolean|null); - - /** Subscription expirationPolicy */ - expirationPolicy?: (google.pubsub.v1.IExpirationPolicy|null); - - /** Subscription filter */ - filter?: (string|null); - - /** Subscription deadLetterPolicy */ - deadLetterPolicy?: (google.pubsub.v1.IDeadLetterPolicy|null); - - /** Subscription retryPolicy */ - retryPolicy?: (google.pubsub.v1.IRetryPolicy|null); - - /** Subscription detached */ - detached?: (boolean|null); - - /** Subscription enableExactlyOnceDelivery */ - enableExactlyOnceDelivery?: (boolean|null); - - /** Subscription topicMessageRetentionDuration */ - topicMessageRetentionDuration?: (google.protobuf.IDuration|null); - - /** Subscription state */ - state?: (google.pubsub.v1.Subscription.State|keyof typeof google.pubsub.v1.Subscription.State|null); - - /** Subscription analyticsHubSubscriptionInfo */ - analyticsHubSubscriptionInfo?: (google.pubsub.v1.Subscription.IAnalyticsHubSubscriptionInfo|null); - - /** Subscription messageTransforms */ - messageTransforms?: (google.pubsub.v1.IMessageTransform[]|null); - - /** Subscription tags */ - tags?: ({ [k: string]: string }|null); - } - - /** Represents a Subscription. */ - class Subscription implements ISubscription { - - /** - * Constructs a new Subscription. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.ISubscription); - - /** Subscription name. */ - public name: string; - - /** Subscription topic. */ - public topic: string; - - /** Subscription pushConfig. */ - public pushConfig?: (google.pubsub.v1.IPushConfig|null); - - /** Subscription bigqueryConfig. */ - public bigqueryConfig?: (google.pubsub.v1.IBigQueryConfig|null); - - /** Subscription cloudStorageConfig. */ - public cloudStorageConfig?: (google.pubsub.v1.ICloudStorageConfig|null); - - /** Subscription bigtableConfig. */ - public bigtableConfig?: (google.pubsub.v1.IBigtableConfig|null); - - /** Subscription ackDeadlineSeconds. */ - public ackDeadlineSeconds: number; - - /** Subscription retainAckedMessages. */ - public retainAckedMessages: boolean; - - /** Subscription messageRetentionDuration. */ - public messageRetentionDuration?: (google.protobuf.IDuration|null); - - /** Subscription labels. */ - public labels: { [k: string]: string }; - - /** Subscription enableMessageOrdering. */ - public enableMessageOrdering: boolean; - - /** Subscription expirationPolicy. */ - public expirationPolicy?: (google.pubsub.v1.IExpirationPolicy|null); - - /** Subscription filter. */ - public filter: string; - - /** Subscription deadLetterPolicy. */ - public deadLetterPolicy?: (google.pubsub.v1.IDeadLetterPolicy|null); - - /** Subscription retryPolicy. */ - public retryPolicy?: (google.pubsub.v1.IRetryPolicy|null); - - /** Subscription detached. */ - public detached: boolean; - - /** Subscription enableExactlyOnceDelivery. */ - public enableExactlyOnceDelivery: boolean; - - /** Subscription topicMessageRetentionDuration. */ - public topicMessageRetentionDuration?: (google.protobuf.IDuration|null); - - /** Subscription state. */ - public state: (google.pubsub.v1.Subscription.State|keyof typeof google.pubsub.v1.Subscription.State); - - /** Subscription analyticsHubSubscriptionInfo. */ - public analyticsHubSubscriptionInfo?: (google.pubsub.v1.Subscription.IAnalyticsHubSubscriptionInfo|null); - - /** Subscription messageTransforms. */ - public messageTransforms: google.pubsub.v1.IMessageTransform[]; - - /** Subscription tags. */ - public tags: { [k: string]: string }; - - /** - * Creates a new Subscription instance using the specified properties. - * @param [properties] Properties to set - * @returns Subscription instance - */ - public static create(properties?: google.pubsub.v1.ISubscription): google.pubsub.v1.Subscription; - - /** - * Encodes the specified Subscription message. Does not implicitly {@link google.pubsub.v1.Subscription.verify|verify} messages. - * @param message Subscription message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.ISubscription, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Subscription message, length delimited. Does not implicitly {@link google.pubsub.v1.Subscription.verify|verify} messages. - * @param message Subscription message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.ISubscription, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Subscription message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Subscription - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.Subscription; - - /** - * Decodes a Subscription message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Subscription - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.Subscription; - - /** - * Verifies a Subscription message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Subscription message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Subscription - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.Subscription; - - /** - * Creates a plain object from a Subscription message. Also converts values to other types if specified. - * @param message Subscription - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.Subscription, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Subscription to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Subscription - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Subscription { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - RESOURCE_ERROR = 2 - } - - /** Properties of an AnalyticsHubSubscriptionInfo. */ - interface IAnalyticsHubSubscriptionInfo { - - /** AnalyticsHubSubscriptionInfo listing */ - listing?: (string|null); - - /** AnalyticsHubSubscriptionInfo subscription */ - subscription?: (string|null); - } - - /** Represents an AnalyticsHubSubscriptionInfo. */ - class AnalyticsHubSubscriptionInfo implements IAnalyticsHubSubscriptionInfo { - - /** - * Constructs a new AnalyticsHubSubscriptionInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.Subscription.IAnalyticsHubSubscriptionInfo); - - /** AnalyticsHubSubscriptionInfo listing. */ - public listing: string; - - /** AnalyticsHubSubscriptionInfo subscription. */ - public subscription: string; - - /** - * Creates a new AnalyticsHubSubscriptionInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns AnalyticsHubSubscriptionInfo instance - */ - public static create(properties?: google.pubsub.v1.Subscription.IAnalyticsHubSubscriptionInfo): google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo; - - /** - * Encodes the specified AnalyticsHubSubscriptionInfo message. Does not implicitly {@link google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.verify|verify} messages. - * @param message AnalyticsHubSubscriptionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.Subscription.IAnalyticsHubSubscriptionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AnalyticsHubSubscriptionInfo message, length delimited. Does not implicitly {@link google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.verify|verify} messages. - * @param message AnalyticsHubSubscriptionInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.Subscription.IAnalyticsHubSubscriptionInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AnalyticsHubSubscriptionInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AnalyticsHubSubscriptionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo; - - /** - * Decodes an AnalyticsHubSubscriptionInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AnalyticsHubSubscriptionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo; - - /** - * Verifies an AnalyticsHubSubscriptionInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AnalyticsHubSubscriptionInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AnalyticsHubSubscriptionInfo - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo; - - /** - * Creates a plain object from an AnalyticsHubSubscriptionInfo message. Also converts values to other types if specified. - * @param message AnalyticsHubSubscriptionInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AnalyticsHubSubscriptionInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AnalyticsHubSubscriptionInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a RetryPolicy. */ - interface IRetryPolicy { - - /** RetryPolicy minimumBackoff */ - minimumBackoff?: (google.protobuf.IDuration|null); - - /** RetryPolicy maximumBackoff */ - maximumBackoff?: (google.protobuf.IDuration|null); - } - - /** Represents a RetryPolicy. */ - class RetryPolicy implements IRetryPolicy { - - /** - * Constructs a new RetryPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IRetryPolicy); - - /** RetryPolicy minimumBackoff. */ - public minimumBackoff?: (google.protobuf.IDuration|null); - - /** RetryPolicy maximumBackoff. */ - public maximumBackoff?: (google.protobuf.IDuration|null); - - /** - * Creates a new RetryPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns RetryPolicy instance - */ - public static create(properties?: google.pubsub.v1.IRetryPolicy): google.pubsub.v1.RetryPolicy; - - /** - * Encodes the specified RetryPolicy message. Does not implicitly {@link google.pubsub.v1.RetryPolicy.verify|verify} messages. - * @param message RetryPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IRetryPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RetryPolicy message, length delimited. Does not implicitly {@link google.pubsub.v1.RetryPolicy.verify|verify} messages. - * @param message RetryPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IRetryPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RetryPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RetryPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.RetryPolicy; - - /** - * Decodes a RetryPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RetryPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.RetryPolicy; - - /** - * Verifies a RetryPolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RetryPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RetryPolicy - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.RetryPolicy; - - /** - * Creates a plain object from a RetryPolicy message. Also converts values to other types if specified. - * @param message RetryPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.RetryPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RetryPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RetryPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeadLetterPolicy. */ - interface IDeadLetterPolicy { - - /** DeadLetterPolicy deadLetterTopic */ - deadLetterTopic?: (string|null); - - /** DeadLetterPolicy maxDeliveryAttempts */ - maxDeliveryAttempts?: (number|null); - } - - /** Represents a DeadLetterPolicy. */ - class DeadLetterPolicy implements IDeadLetterPolicy { - - /** - * Constructs a new DeadLetterPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IDeadLetterPolicy); - - /** DeadLetterPolicy deadLetterTopic. */ - public deadLetterTopic: string; - - /** DeadLetterPolicy maxDeliveryAttempts. */ - public maxDeliveryAttempts: number; - - /** - * Creates a new DeadLetterPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns DeadLetterPolicy instance - */ - public static create(properties?: google.pubsub.v1.IDeadLetterPolicy): google.pubsub.v1.DeadLetterPolicy; - - /** - * Encodes the specified DeadLetterPolicy message. Does not implicitly {@link google.pubsub.v1.DeadLetterPolicy.verify|verify} messages. - * @param message DeadLetterPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IDeadLetterPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeadLetterPolicy message, length delimited. Does not implicitly {@link google.pubsub.v1.DeadLetterPolicy.verify|verify} messages. - * @param message DeadLetterPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IDeadLetterPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeadLetterPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeadLetterPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.DeadLetterPolicy; - - /** - * Decodes a DeadLetterPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeadLetterPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.DeadLetterPolicy; - - /** - * Verifies a DeadLetterPolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeadLetterPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeadLetterPolicy - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.DeadLetterPolicy; - - /** - * Creates a plain object from a DeadLetterPolicy message. Also converts values to other types if specified. - * @param message DeadLetterPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.DeadLetterPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeadLetterPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeadLetterPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExpirationPolicy. */ - interface IExpirationPolicy { - - /** ExpirationPolicy ttl */ - ttl?: (google.protobuf.IDuration|null); - } - - /** Represents an ExpirationPolicy. */ - class ExpirationPolicy implements IExpirationPolicy { - - /** - * Constructs a new ExpirationPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IExpirationPolicy); - - /** ExpirationPolicy ttl. */ - public ttl?: (google.protobuf.IDuration|null); - - /** - * Creates a new ExpirationPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns ExpirationPolicy instance - */ - public static create(properties?: google.pubsub.v1.IExpirationPolicy): google.pubsub.v1.ExpirationPolicy; - - /** - * Encodes the specified ExpirationPolicy message. Does not implicitly {@link google.pubsub.v1.ExpirationPolicy.verify|verify} messages. - * @param message ExpirationPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IExpirationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExpirationPolicy message, length delimited. Does not implicitly {@link google.pubsub.v1.ExpirationPolicy.verify|verify} messages. - * @param message ExpirationPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IExpirationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExpirationPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExpirationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ExpirationPolicy; - - /** - * Decodes an ExpirationPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExpirationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ExpirationPolicy; - - /** - * Verifies an ExpirationPolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExpirationPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExpirationPolicy - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ExpirationPolicy; - - /** - * Creates a plain object from an ExpirationPolicy message. Also converts values to other types if specified. - * @param message ExpirationPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ExpirationPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExpirationPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExpirationPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PushConfig. */ - interface IPushConfig { - - /** PushConfig pushEndpoint */ - pushEndpoint?: (string|null); - - /** PushConfig attributes */ - attributes?: ({ [k: string]: string }|null); - - /** PushConfig oidcToken */ - oidcToken?: (google.pubsub.v1.PushConfig.IOidcToken|null); - - /** PushConfig pubsubWrapper */ - pubsubWrapper?: (google.pubsub.v1.PushConfig.IPubsubWrapper|null); - - /** PushConfig noWrapper */ - noWrapper?: (google.pubsub.v1.PushConfig.INoWrapper|null); - } - - /** Represents a PushConfig. */ - class PushConfig implements IPushConfig { - - /** - * Constructs a new PushConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IPushConfig); - - /** PushConfig pushEndpoint. */ - public pushEndpoint: string; - - /** PushConfig attributes. */ - public attributes: { [k: string]: string }; - - /** PushConfig oidcToken. */ - public oidcToken?: (google.pubsub.v1.PushConfig.IOidcToken|null); - - /** PushConfig pubsubWrapper. */ - public pubsubWrapper?: (google.pubsub.v1.PushConfig.IPubsubWrapper|null); - - /** PushConfig noWrapper. */ - public noWrapper?: (google.pubsub.v1.PushConfig.INoWrapper|null); - - /** PushConfig authenticationMethod. */ - public authenticationMethod?: "oidcToken"; - - /** PushConfig wrapper. */ - public wrapper?: ("pubsubWrapper"|"noWrapper"); - - /** - * Creates a new PushConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PushConfig instance - */ - public static create(properties?: google.pubsub.v1.IPushConfig): google.pubsub.v1.PushConfig; - - /** - * Encodes the specified PushConfig message. Does not implicitly {@link google.pubsub.v1.PushConfig.verify|verify} messages. - * @param message PushConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IPushConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PushConfig message, length delimited. Does not implicitly {@link google.pubsub.v1.PushConfig.verify|verify} messages. - * @param message PushConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IPushConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PushConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PushConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.PushConfig; - - /** - * Decodes a PushConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PushConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.PushConfig; - - /** - * Verifies a PushConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PushConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PushConfig - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.PushConfig; - - /** - * Creates a plain object from a PushConfig message. Also converts values to other types if specified. - * @param message PushConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.PushConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PushConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PushConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PushConfig { - - /** Properties of an OidcToken. */ - interface IOidcToken { - - /** OidcToken serviceAccountEmail */ - serviceAccountEmail?: (string|null); - - /** OidcToken audience */ - audience?: (string|null); - } - - /** Represents an OidcToken. */ - class OidcToken implements IOidcToken { - - /** - * Constructs a new OidcToken. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.PushConfig.IOidcToken); - - /** OidcToken serviceAccountEmail. */ - public serviceAccountEmail: string; - - /** OidcToken audience. */ - public audience: string; - - /** - * Creates a new OidcToken instance using the specified properties. - * @param [properties] Properties to set - * @returns OidcToken instance - */ - public static create(properties?: google.pubsub.v1.PushConfig.IOidcToken): google.pubsub.v1.PushConfig.OidcToken; - - /** - * Encodes the specified OidcToken message. Does not implicitly {@link google.pubsub.v1.PushConfig.OidcToken.verify|verify} messages. - * @param message OidcToken message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.PushConfig.IOidcToken, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OidcToken message, length delimited. Does not implicitly {@link google.pubsub.v1.PushConfig.OidcToken.verify|verify} messages. - * @param message OidcToken message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.PushConfig.IOidcToken, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OidcToken message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OidcToken - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.PushConfig.OidcToken; - - /** - * Decodes an OidcToken message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OidcToken - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.PushConfig.OidcToken; - - /** - * Verifies an OidcToken message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an OidcToken message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OidcToken - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.PushConfig.OidcToken; - - /** - * Creates a plain object from an OidcToken message. Also converts values to other types if specified. - * @param message OidcToken - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.PushConfig.OidcToken, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OidcToken to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OidcToken - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PubsubWrapper. */ - interface IPubsubWrapper { - } - - /** Represents a PubsubWrapper. */ - class PubsubWrapper implements IPubsubWrapper { - - /** - * Constructs a new PubsubWrapper. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.PushConfig.IPubsubWrapper); - - /** - * Creates a new PubsubWrapper instance using the specified properties. - * @param [properties] Properties to set - * @returns PubsubWrapper instance - */ - public static create(properties?: google.pubsub.v1.PushConfig.IPubsubWrapper): google.pubsub.v1.PushConfig.PubsubWrapper; - - /** - * Encodes the specified PubsubWrapper message. Does not implicitly {@link google.pubsub.v1.PushConfig.PubsubWrapper.verify|verify} messages. - * @param message PubsubWrapper message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.PushConfig.IPubsubWrapper, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PubsubWrapper message, length delimited. Does not implicitly {@link google.pubsub.v1.PushConfig.PubsubWrapper.verify|verify} messages. - * @param message PubsubWrapper message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.PushConfig.IPubsubWrapper, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PubsubWrapper message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PubsubWrapper - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.PushConfig.PubsubWrapper; - - /** - * Decodes a PubsubWrapper message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PubsubWrapper - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.PushConfig.PubsubWrapper; - - /** - * Verifies a PubsubWrapper message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PubsubWrapper message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PubsubWrapper - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.PushConfig.PubsubWrapper; - - /** - * Creates a plain object from a PubsubWrapper message. Also converts values to other types if specified. - * @param message PubsubWrapper - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.PushConfig.PubsubWrapper, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PubsubWrapper to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PubsubWrapper - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NoWrapper. */ - interface INoWrapper { - - /** NoWrapper writeMetadata */ - writeMetadata?: (boolean|null); - } - - /** Represents a NoWrapper. */ - class NoWrapper implements INoWrapper { - - /** - * Constructs a new NoWrapper. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.PushConfig.INoWrapper); - - /** NoWrapper writeMetadata. */ - public writeMetadata: boolean; - - /** - * Creates a new NoWrapper instance using the specified properties. - * @param [properties] Properties to set - * @returns NoWrapper instance - */ - public static create(properties?: google.pubsub.v1.PushConfig.INoWrapper): google.pubsub.v1.PushConfig.NoWrapper; - - /** - * Encodes the specified NoWrapper message. Does not implicitly {@link google.pubsub.v1.PushConfig.NoWrapper.verify|verify} messages. - * @param message NoWrapper message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.PushConfig.INoWrapper, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NoWrapper message, length delimited. Does not implicitly {@link google.pubsub.v1.PushConfig.NoWrapper.verify|verify} messages. - * @param message NoWrapper message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.PushConfig.INoWrapper, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NoWrapper message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NoWrapper - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.PushConfig.NoWrapper; - - /** - * Decodes a NoWrapper message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NoWrapper - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.PushConfig.NoWrapper; - - /** - * Verifies a NoWrapper message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NoWrapper message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NoWrapper - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.PushConfig.NoWrapper; - - /** - * Creates a plain object from a NoWrapper message. Also converts values to other types if specified. - * @param message NoWrapper - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.PushConfig.NoWrapper, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NoWrapper to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NoWrapper - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a BigQueryConfig. */ - interface IBigQueryConfig { - - /** BigQueryConfig table */ - table?: (string|null); - - /** BigQueryConfig useTopicSchema */ - useTopicSchema?: (boolean|null); - - /** BigQueryConfig writeMetadata */ - writeMetadata?: (boolean|null); - - /** BigQueryConfig dropUnknownFields */ - dropUnknownFields?: (boolean|null); - - /** BigQueryConfig state */ - state?: (google.pubsub.v1.BigQueryConfig.State|keyof typeof google.pubsub.v1.BigQueryConfig.State|null); - - /** BigQueryConfig useTableSchema */ - useTableSchema?: (boolean|null); - - /** BigQueryConfig serviceAccountEmail */ - serviceAccountEmail?: (string|null); - } - - /** Represents a BigQueryConfig. */ - class BigQueryConfig implements IBigQueryConfig { - - /** - * Constructs a new BigQueryConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IBigQueryConfig); - - /** BigQueryConfig table. */ - public table: string; - - /** BigQueryConfig useTopicSchema. */ - public useTopicSchema: boolean; - - /** BigQueryConfig writeMetadata. */ - public writeMetadata: boolean; - - /** BigQueryConfig dropUnknownFields. */ - public dropUnknownFields: boolean; - - /** BigQueryConfig state. */ - public state: (google.pubsub.v1.BigQueryConfig.State|keyof typeof google.pubsub.v1.BigQueryConfig.State); - - /** BigQueryConfig useTableSchema. */ - public useTableSchema: boolean; - - /** BigQueryConfig serviceAccountEmail. */ - public serviceAccountEmail: string; - - /** - * Creates a new BigQueryConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryConfig instance - */ - public static create(properties?: google.pubsub.v1.IBigQueryConfig): google.pubsub.v1.BigQueryConfig; - - /** - * Encodes the specified BigQueryConfig message. Does not implicitly {@link google.pubsub.v1.BigQueryConfig.verify|verify} messages. - * @param message BigQueryConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IBigQueryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryConfig message, length delimited. Does not implicitly {@link google.pubsub.v1.BigQueryConfig.verify|verify} messages. - * @param message BigQueryConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IBigQueryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.BigQueryConfig; - - /** - * Decodes a BigQueryConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.BigQueryConfig; - - /** - * Verifies a BigQueryConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigQueryConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryConfig - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.BigQueryConfig; - - /** - * Creates a plain object from a BigQueryConfig message. Also converts values to other types if specified. - * @param message BigQueryConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.BigQueryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BigQueryConfig { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - PERMISSION_DENIED = 2, - NOT_FOUND = 3, - SCHEMA_MISMATCH = 4, - IN_TRANSIT_LOCATION_RESTRICTION = 5, - VERTEX_AI_LOCATION_RESTRICTION = 6 - } - } - - /** Properties of a BigtableConfig. */ - interface IBigtableConfig { - - /** BigtableConfig table */ - table?: (string|null); - - /** BigtableConfig appProfileId */ - appProfileId?: (string|null); - - /** BigtableConfig serviceAccountEmail */ - serviceAccountEmail?: (string|null); - - /** BigtableConfig writeMetadata */ - writeMetadata?: (boolean|null); - - /** BigtableConfig state */ - state?: (google.pubsub.v1.BigtableConfig.State|keyof typeof google.pubsub.v1.BigtableConfig.State|null); - } - - /** Represents a BigtableConfig. */ - class BigtableConfig implements IBigtableConfig { - - /** - * Constructs a new BigtableConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IBigtableConfig); - - /** BigtableConfig table. */ - public table: string; - - /** BigtableConfig appProfileId. */ - public appProfileId: string; - - /** BigtableConfig serviceAccountEmail. */ - public serviceAccountEmail: string; - - /** BigtableConfig writeMetadata. */ - public writeMetadata: boolean; - - /** BigtableConfig state. */ - public state: (google.pubsub.v1.BigtableConfig.State|keyof typeof google.pubsub.v1.BigtableConfig.State); - - /** - * Creates a new BigtableConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns BigtableConfig instance - */ - public static create(properties?: google.pubsub.v1.IBigtableConfig): google.pubsub.v1.BigtableConfig; - - /** - * Encodes the specified BigtableConfig message. Does not implicitly {@link google.pubsub.v1.BigtableConfig.verify|verify} messages. - * @param message BigtableConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IBigtableConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigtableConfig message, length delimited. Does not implicitly {@link google.pubsub.v1.BigtableConfig.verify|verify} messages. - * @param message BigtableConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IBigtableConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigtableConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigtableConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.BigtableConfig; - - /** - * Decodes a BigtableConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigtableConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.BigtableConfig; - - /** - * Verifies a BigtableConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a BigtableConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigtableConfig - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.BigtableConfig; - - /** - * Creates a plain object from a BigtableConfig message. Also converts values to other types if specified. - * @param message BigtableConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.BigtableConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigtableConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigtableConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BigtableConfig { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - NOT_FOUND = 2, - APP_PROFILE_MISCONFIGURED = 3, - PERMISSION_DENIED = 4, - SCHEMA_MISMATCH = 5, - IN_TRANSIT_LOCATION_RESTRICTION = 6, - VERTEX_AI_LOCATION_RESTRICTION = 7 - } - } - - /** Properties of a CloudStorageConfig. */ - interface ICloudStorageConfig { - - /** CloudStorageConfig bucket */ - bucket?: (string|null); - - /** CloudStorageConfig filenamePrefix */ - filenamePrefix?: (string|null); - - /** CloudStorageConfig filenameSuffix */ - filenameSuffix?: (string|null); - - /** CloudStorageConfig filenameDatetimeFormat */ - filenameDatetimeFormat?: (string|null); - - /** CloudStorageConfig textConfig */ - textConfig?: (google.pubsub.v1.CloudStorageConfig.ITextConfig|null); - - /** CloudStorageConfig avroConfig */ - avroConfig?: (google.pubsub.v1.CloudStorageConfig.IAvroConfig|null); - - /** CloudStorageConfig maxDuration */ - maxDuration?: (google.protobuf.IDuration|null); - - /** CloudStorageConfig maxBytes */ - maxBytes?: (number|Long|string|null); - - /** CloudStorageConfig maxMessages */ - maxMessages?: (number|Long|string|null); - - /** CloudStorageConfig state */ - state?: (google.pubsub.v1.CloudStorageConfig.State|keyof typeof google.pubsub.v1.CloudStorageConfig.State|null); - - /** CloudStorageConfig serviceAccountEmail */ - serviceAccountEmail?: (string|null); - } - - /** Represents a CloudStorageConfig. */ - class CloudStorageConfig implements ICloudStorageConfig { - - /** - * Constructs a new CloudStorageConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.ICloudStorageConfig); - - /** CloudStorageConfig bucket. */ - public bucket: string; - - /** CloudStorageConfig filenamePrefix. */ - public filenamePrefix: string; - - /** CloudStorageConfig filenameSuffix. */ - public filenameSuffix: string; - - /** CloudStorageConfig filenameDatetimeFormat. */ - public filenameDatetimeFormat: string; - - /** CloudStorageConfig textConfig. */ - public textConfig?: (google.pubsub.v1.CloudStorageConfig.ITextConfig|null); - - /** CloudStorageConfig avroConfig. */ - public avroConfig?: (google.pubsub.v1.CloudStorageConfig.IAvroConfig|null); - - /** CloudStorageConfig maxDuration. */ - public maxDuration?: (google.protobuf.IDuration|null); - - /** CloudStorageConfig maxBytes. */ - public maxBytes: (number|Long|string); - - /** CloudStorageConfig maxMessages. */ - public maxMessages: (number|Long|string); - - /** CloudStorageConfig state. */ - public state: (google.pubsub.v1.CloudStorageConfig.State|keyof typeof google.pubsub.v1.CloudStorageConfig.State); - - /** CloudStorageConfig serviceAccountEmail. */ - public serviceAccountEmail: string; - - /** CloudStorageConfig outputFormat. */ - public outputFormat?: ("textConfig"|"avroConfig"); - - /** - * Creates a new CloudStorageConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudStorageConfig instance - */ - public static create(properties?: google.pubsub.v1.ICloudStorageConfig): google.pubsub.v1.CloudStorageConfig; - - /** - * Encodes the specified CloudStorageConfig message. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.verify|verify} messages. - * @param message CloudStorageConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.ICloudStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudStorageConfig message, length delimited. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.verify|verify} messages. - * @param message CloudStorageConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.ICloudStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudStorageConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudStorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.CloudStorageConfig; - - /** - * Decodes a CloudStorageConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudStorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.CloudStorageConfig; - - /** - * Verifies a CloudStorageConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudStorageConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudStorageConfig - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.CloudStorageConfig; - - /** - * Creates a plain object from a CloudStorageConfig message. Also converts values to other types if specified. - * @param message CloudStorageConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.CloudStorageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudStorageConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudStorageConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CloudStorageConfig { - - /** Properties of a TextConfig. */ - interface ITextConfig { - } - - /** Represents a TextConfig. */ - class TextConfig implements ITextConfig { - - /** - * Constructs a new TextConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.CloudStorageConfig.ITextConfig); - - /** - * Creates a new TextConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns TextConfig instance - */ - public static create(properties?: google.pubsub.v1.CloudStorageConfig.ITextConfig): google.pubsub.v1.CloudStorageConfig.TextConfig; - - /** - * Encodes the specified TextConfig message. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.TextConfig.verify|verify} messages. - * @param message TextConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.CloudStorageConfig.ITextConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TextConfig message, length delimited. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.TextConfig.verify|verify} messages. - * @param message TextConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.CloudStorageConfig.ITextConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TextConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TextConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.CloudStorageConfig.TextConfig; - - /** - * Decodes a TextConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TextConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.CloudStorageConfig.TextConfig; - - /** - * Verifies a TextConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TextConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TextConfig - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.CloudStorageConfig.TextConfig; - - /** - * Creates a plain object from a TextConfig message. Also converts values to other types if specified. - * @param message TextConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.CloudStorageConfig.TextConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TextConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TextConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AvroConfig. */ - interface IAvroConfig { - - /** AvroConfig writeMetadata */ - writeMetadata?: (boolean|null); - - /** AvroConfig useTopicSchema */ - useTopicSchema?: (boolean|null); - } - - /** Represents an AvroConfig. */ - class AvroConfig implements IAvroConfig { - - /** - * Constructs a new AvroConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.CloudStorageConfig.IAvroConfig); - - /** AvroConfig writeMetadata. */ - public writeMetadata: boolean; - - /** AvroConfig useTopicSchema. */ - public useTopicSchema: boolean; - - /** - * Creates a new AvroConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AvroConfig instance - */ - public static create(properties?: google.pubsub.v1.CloudStorageConfig.IAvroConfig): google.pubsub.v1.CloudStorageConfig.AvroConfig; - - /** - * Encodes the specified AvroConfig message. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.AvroConfig.verify|verify} messages. - * @param message AvroConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.CloudStorageConfig.IAvroConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AvroConfig message, length delimited. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.AvroConfig.verify|verify} messages. - * @param message AvroConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.CloudStorageConfig.IAvroConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AvroConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AvroConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.CloudStorageConfig.AvroConfig; - - /** - * Decodes an AvroConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AvroConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.CloudStorageConfig.AvroConfig; - - /** - * Verifies an AvroConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AvroConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AvroConfig - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.CloudStorageConfig.AvroConfig; - - /** - * Creates a plain object from an AvroConfig message. Also converts values to other types if specified. - * @param message AvroConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.CloudStorageConfig.AvroConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AvroConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AvroConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - PERMISSION_DENIED = 2, - NOT_FOUND = 3, - IN_TRANSIT_LOCATION_RESTRICTION = 4, - SCHEMA_MISMATCH = 5, - VERTEX_AI_LOCATION_RESTRICTION = 6 - } - } - - /** Properties of a ReceivedMessage. */ - interface IReceivedMessage { - - /** ReceivedMessage ackId */ - ackId?: (string|null); - - /** ReceivedMessage message */ - message?: (google.pubsub.v1.IPubsubMessage|null); - - /** ReceivedMessage deliveryAttempt */ - deliveryAttempt?: (number|null); - } - - /** Represents a ReceivedMessage. */ - class ReceivedMessage implements IReceivedMessage { - - /** - * Constructs a new ReceivedMessage. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IReceivedMessage); - - /** ReceivedMessage ackId. */ - public ackId: string; - - /** ReceivedMessage message. */ - public message?: (google.pubsub.v1.IPubsubMessage|null); - - /** ReceivedMessage deliveryAttempt. */ - public deliveryAttempt: number; - - /** - * Creates a new ReceivedMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns ReceivedMessage instance - */ - public static create(properties?: google.pubsub.v1.IReceivedMessage): google.pubsub.v1.ReceivedMessage; - - /** - * Encodes the specified ReceivedMessage message. Does not implicitly {@link google.pubsub.v1.ReceivedMessage.verify|verify} messages. - * @param message ReceivedMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IReceivedMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReceivedMessage message, length delimited. Does not implicitly {@link google.pubsub.v1.ReceivedMessage.verify|verify} messages. - * @param message ReceivedMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IReceivedMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReceivedMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReceivedMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ReceivedMessage; - - /** - * Decodes a ReceivedMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReceivedMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ReceivedMessage; - - /** - * Verifies a ReceivedMessage message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ReceivedMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReceivedMessage - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ReceivedMessage; - - /** - * Creates a plain object from a ReceivedMessage message. Also converts values to other types if specified. - * @param message ReceivedMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ReceivedMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReceivedMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReceivedMessage - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetSubscriptionRequest. */ - interface IGetSubscriptionRequest { - - /** GetSubscriptionRequest subscription */ - subscription?: (string|null); - } - - /** Represents a GetSubscriptionRequest. */ - class GetSubscriptionRequest implements IGetSubscriptionRequest { - - /** - * Constructs a new GetSubscriptionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IGetSubscriptionRequest); - - /** GetSubscriptionRequest subscription. */ - public subscription: string; - - /** - * Creates a new GetSubscriptionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSubscriptionRequest instance - */ - public static create(properties?: google.pubsub.v1.IGetSubscriptionRequest): google.pubsub.v1.GetSubscriptionRequest; - - /** - * Encodes the specified GetSubscriptionRequest message. Does not implicitly {@link google.pubsub.v1.GetSubscriptionRequest.verify|verify} messages. - * @param message GetSubscriptionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IGetSubscriptionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSubscriptionRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.GetSubscriptionRequest.verify|verify} messages. - * @param message GetSubscriptionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IGetSubscriptionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSubscriptionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSubscriptionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.GetSubscriptionRequest; - - /** - * Decodes a GetSubscriptionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSubscriptionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.GetSubscriptionRequest; - - /** - * Verifies a GetSubscriptionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSubscriptionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSubscriptionRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.GetSubscriptionRequest; - - /** - * Creates a plain object from a GetSubscriptionRequest message. Also converts values to other types if specified. - * @param message GetSubscriptionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.GetSubscriptionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSubscriptionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetSubscriptionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateSubscriptionRequest. */ - interface IUpdateSubscriptionRequest { - - /** UpdateSubscriptionRequest subscription */ - subscription?: (google.pubsub.v1.ISubscription|null); - - /** UpdateSubscriptionRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateSubscriptionRequest. */ - class UpdateSubscriptionRequest implements IUpdateSubscriptionRequest { - - /** - * Constructs a new UpdateSubscriptionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IUpdateSubscriptionRequest); - - /** UpdateSubscriptionRequest subscription. */ - public subscription?: (google.pubsub.v1.ISubscription|null); - - /** UpdateSubscriptionRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateSubscriptionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateSubscriptionRequest instance - */ - public static create(properties?: google.pubsub.v1.IUpdateSubscriptionRequest): google.pubsub.v1.UpdateSubscriptionRequest; - - /** - * Encodes the specified UpdateSubscriptionRequest message. Does not implicitly {@link google.pubsub.v1.UpdateSubscriptionRequest.verify|verify} messages. - * @param message UpdateSubscriptionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IUpdateSubscriptionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateSubscriptionRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.UpdateSubscriptionRequest.verify|verify} messages. - * @param message UpdateSubscriptionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IUpdateSubscriptionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateSubscriptionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateSubscriptionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.UpdateSubscriptionRequest; - - /** - * Decodes an UpdateSubscriptionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateSubscriptionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.UpdateSubscriptionRequest; - - /** - * Verifies an UpdateSubscriptionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateSubscriptionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateSubscriptionRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.UpdateSubscriptionRequest; - - /** - * Creates a plain object from an UpdateSubscriptionRequest message. Also converts values to other types if specified. - * @param message UpdateSubscriptionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.UpdateSubscriptionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateSubscriptionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateSubscriptionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSubscriptionsRequest. */ - interface IListSubscriptionsRequest { - - /** ListSubscriptionsRequest project */ - project?: (string|null); - - /** ListSubscriptionsRequest pageSize */ - pageSize?: (number|null); - - /** ListSubscriptionsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListSubscriptionsRequest. */ - class ListSubscriptionsRequest implements IListSubscriptionsRequest { - - /** - * Constructs a new ListSubscriptionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IListSubscriptionsRequest); - - /** ListSubscriptionsRequest project. */ - public project: string; - - /** ListSubscriptionsRequest pageSize. */ - public pageSize: number; - - /** ListSubscriptionsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListSubscriptionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSubscriptionsRequest instance - */ - public static create(properties?: google.pubsub.v1.IListSubscriptionsRequest): google.pubsub.v1.ListSubscriptionsRequest; - - /** - * Encodes the specified ListSubscriptionsRequest message. Does not implicitly {@link google.pubsub.v1.ListSubscriptionsRequest.verify|verify} messages. - * @param message ListSubscriptionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IListSubscriptionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSubscriptionsRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSubscriptionsRequest.verify|verify} messages. - * @param message ListSubscriptionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IListSubscriptionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSubscriptionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSubscriptionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ListSubscriptionsRequest; - - /** - * Decodes a ListSubscriptionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSubscriptionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ListSubscriptionsRequest; - - /** - * Verifies a ListSubscriptionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSubscriptionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSubscriptionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ListSubscriptionsRequest; - - /** - * Creates a plain object from a ListSubscriptionsRequest message. Also converts values to other types if specified. - * @param message ListSubscriptionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ListSubscriptionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSubscriptionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSubscriptionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSubscriptionsResponse. */ - interface IListSubscriptionsResponse { - - /** ListSubscriptionsResponse subscriptions */ - subscriptions?: (google.pubsub.v1.ISubscription[]|null); - - /** ListSubscriptionsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListSubscriptionsResponse. */ - class ListSubscriptionsResponse implements IListSubscriptionsResponse { - - /** - * Constructs a new ListSubscriptionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IListSubscriptionsResponse); - - /** ListSubscriptionsResponse subscriptions. */ - public subscriptions: google.pubsub.v1.ISubscription[]; - - /** ListSubscriptionsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListSubscriptionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSubscriptionsResponse instance - */ - public static create(properties?: google.pubsub.v1.IListSubscriptionsResponse): google.pubsub.v1.ListSubscriptionsResponse; - - /** - * Encodes the specified ListSubscriptionsResponse message. Does not implicitly {@link google.pubsub.v1.ListSubscriptionsResponse.verify|verify} messages. - * @param message ListSubscriptionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IListSubscriptionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSubscriptionsResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSubscriptionsResponse.verify|verify} messages. - * @param message ListSubscriptionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IListSubscriptionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSubscriptionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSubscriptionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ListSubscriptionsResponse; - - /** - * Decodes a ListSubscriptionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSubscriptionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ListSubscriptionsResponse; - - /** - * Verifies a ListSubscriptionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSubscriptionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSubscriptionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ListSubscriptionsResponse; - - /** - * Creates a plain object from a ListSubscriptionsResponse message. Also converts values to other types if specified. - * @param message ListSubscriptionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ListSubscriptionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSubscriptionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSubscriptionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteSubscriptionRequest. */ - interface IDeleteSubscriptionRequest { - - /** DeleteSubscriptionRequest subscription */ - subscription?: (string|null); - } - - /** Represents a DeleteSubscriptionRequest. */ - class DeleteSubscriptionRequest implements IDeleteSubscriptionRequest { - - /** - * Constructs a new DeleteSubscriptionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IDeleteSubscriptionRequest); - - /** DeleteSubscriptionRequest subscription. */ - public subscription: string; - - /** - * Creates a new DeleteSubscriptionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteSubscriptionRequest instance - */ - public static create(properties?: google.pubsub.v1.IDeleteSubscriptionRequest): google.pubsub.v1.DeleteSubscriptionRequest; - - /** - * Encodes the specified DeleteSubscriptionRequest message. Does not implicitly {@link google.pubsub.v1.DeleteSubscriptionRequest.verify|verify} messages. - * @param message DeleteSubscriptionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IDeleteSubscriptionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteSubscriptionRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.DeleteSubscriptionRequest.verify|verify} messages. - * @param message DeleteSubscriptionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IDeleteSubscriptionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteSubscriptionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteSubscriptionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.DeleteSubscriptionRequest; - - /** - * Decodes a DeleteSubscriptionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteSubscriptionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.DeleteSubscriptionRequest; - - /** - * Verifies a DeleteSubscriptionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteSubscriptionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteSubscriptionRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.DeleteSubscriptionRequest; - - /** - * Creates a plain object from a DeleteSubscriptionRequest message. Also converts values to other types if specified. - * @param message DeleteSubscriptionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.DeleteSubscriptionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteSubscriptionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteSubscriptionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ModifyPushConfigRequest. */ - interface IModifyPushConfigRequest { - - /** ModifyPushConfigRequest subscription */ - subscription?: (string|null); - - /** ModifyPushConfigRequest pushConfig */ - pushConfig?: (google.pubsub.v1.IPushConfig|null); - } - - /** Represents a ModifyPushConfigRequest. */ - class ModifyPushConfigRequest implements IModifyPushConfigRequest { - - /** - * Constructs a new ModifyPushConfigRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IModifyPushConfigRequest); - - /** ModifyPushConfigRequest subscription. */ - public subscription: string; - - /** ModifyPushConfigRequest pushConfig. */ - public pushConfig?: (google.pubsub.v1.IPushConfig|null); - - /** - * Creates a new ModifyPushConfigRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ModifyPushConfigRequest instance - */ - public static create(properties?: google.pubsub.v1.IModifyPushConfigRequest): google.pubsub.v1.ModifyPushConfigRequest; - - /** - * Encodes the specified ModifyPushConfigRequest message. Does not implicitly {@link google.pubsub.v1.ModifyPushConfigRequest.verify|verify} messages. - * @param message ModifyPushConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IModifyPushConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ModifyPushConfigRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ModifyPushConfigRequest.verify|verify} messages. - * @param message ModifyPushConfigRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IModifyPushConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ModifyPushConfigRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ModifyPushConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ModifyPushConfigRequest; - - /** - * Decodes a ModifyPushConfigRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ModifyPushConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ModifyPushConfigRequest; - - /** - * Verifies a ModifyPushConfigRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ModifyPushConfigRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModifyPushConfigRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ModifyPushConfigRequest; - - /** - * Creates a plain object from a ModifyPushConfigRequest message. Also converts values to other types if specified. - * @param message ModifyPushConfigRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ModifyPushConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ModifyPushConfigRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ModifyPushConfigRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PullRequest. */ - interface IPullRequest { - - /** PullRequest subscription */ - subscription?: (string|null); - - /** PullRequest returnImmediately */ - returnImmediately?: (boolean|null); - - /** PullRequest maxMessages */ - maxMessages?: (number|null); - } - - /** Represents a PullRequest. */ - class PullRequest implements IPullRequest { - - /** - * Constructs a new PullRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IPullRequest); - - /** PullRequest subscription. */ - public subscription: string; - - /** PullRequest returnImmediately. */ - public returnImmediately: boolean; - - /** PullRequest maxMessages. */ - public maxMessages: number; - - /** - * Creates a new PullRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PullRequest instance - */ - public static create(properties?: google.pubsub.v1.IPullRequest): google.pubsub.v1.PullRequest; - - /** - * Encodes the specified PullRequest message. Does not implicitly {@link google.pubsub.v1.PullRequest.verify|verify} messages. - * @param message PullRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IPullRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PullRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.PullRequest.verify|verify} messages. - * @param message PullRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IPullRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PullRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PullRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.PullRequest; - - /** - * Decodes a PullRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PullRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.PullRequest; - - /** - * Verifies a PullRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PullRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PullRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.PullRequest; - - /** - * Creates a plain object from a PullRequest message. Also converts values to other types if specified. - * @param message PullRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.PullRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PullRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PullRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PullResponse. */ - interface IPullResponse { - - /** PullResponse receivedMessages */ - receivedMessages?: (google.pubsub.v1.IReceivedMessage[]|null); - } - - /** Represents a PullResponse. */ - class PullResponse implements IPullResponse { - - /** - * Constructs a new PullResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IPullResponse); - - /** PullResponse receivedMessages. */ - public receivedMessages: google.pubsub.v1.IReceivedMessage[]; - - /** - * Creates a new PullResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PullResponse instance - */ - public static create(properties?: google.pubsub.v1.IPullResponse): google.pubsub.v1.PullResponse; - - /** - * Encodes the specified PullResponse message. Does not implicitly {@link google.pubsub.v1.PullResponse.verify|verify} messages. - * @param message PullResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IPullResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PullResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.PullResponse.verify|verify} messages. - * @param message PullResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IPullResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PullResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PullResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.PullResponse; - - /** - * Decodes a PullResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PullResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.PullResponse; - - /** - * Verifies a PullResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PullResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PullResponse - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.PullResponse; - - /** - * Creates a plain object from a PullResponse message. Also converts values to other types if specified. - * @param message PullResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.PullResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PullResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PullResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ModifyAckDeadlineRequest. */ - interface IModifyAckDeadlineRequest { - - /** ModifyAckDeadlineRequest subscription */ - subscription?: (string|null); - - /** ModifyAckDeadlineRequest ackIds */ - ackIds?: (string[]|null); - - /** ModifyAckDeadlineRequest ackDeadlineSeconds */ - ackDeadlineSeconds?: (number|null); - } - - /** Represents a ModifyAckDeadlineRequest. */ - class ModifyAckDeadlineRequest implements IModifyAckDeadlineRequest { - - /** - * Constructs a new ModifyAckDeadlineRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IModifyAckDeadlineRequest); - - /** ModifyAckDeadlineRequest subscription. */ - public subscription: string; - - /** ModifyAckDeadlineRequest ackIds. */ - public ackIds: string[]; - - /** ModifyAckDeadlineRequest ackDeadlineSeconds. */ - public ackDeadlineSeconds: number; - - /** - * Creates a new ModifyAckDeadlineRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ModifyAckDeadlineRequest instance - */ - public static create(properties?: google.pubsub.v1.IModifyAckDeadlineRequest): google.pubsub.v1.ModifyAckDeadlineRequest; - - /** - * Encodes the specified ModifyAckDeadlineRequest message. Does not implicitly {@link google.pubsub.v1.ModifyAckDeadlineRequest.verify|verify} messages. - * @param message ModifyAckDeadlineRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IModifyAckDeadlineRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ModifyAckDeadlineRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ModifyAckDeadlineRequest.verify|verify} messages. - * @param message ModifyAckDeadlineRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IModifyAckDeadlineRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ModifyAckDeadlineRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ModifyAckDeadlineRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ModifyAckDeadlineRequest; - - /** - * Decodes a ModifyAckDeadlineRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ModifyAckDeadlineRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ModifyAckDeadlineRequest; - - /** - * Verifies a ModifyAckDeadlineRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ModifyAckDeadlineRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModifyAckDeadlineRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ModifyAckDeadlineRequest; - - /** - * Creates a plain object from a ModifyAckDeadlineRequest message. Also converts values to other types if specified. - * @param message ModifyAckDeadlineRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ModifyAckDeadlineRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ModifyAckDeadlineRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ModifyAckDeadlineRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AcknowledgeRequest. */ - interface IAcknowledgeRequest { - - /** AcknowledgeRequest subscription */ - subscription?: (string|null); - - /** AcknowledgeRequest ackIds */ - ackIds?: (string[]|null); - } - - /** Represents an AcknowledgeRequest. */ - class AcknowledgeRequest implements IAcknowledgeRequest { - - /** - * Constructs a new AcknowledgeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IAcknowledgeRequest); - - /** AcknowledgeRequest subscription. */ - public subscription: string; - - /** AcknowledgeRequest ackIds. */ - public ackIds: string[]; - - /** - * Creates a new AcknowledgeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns AcknowledgeRequest instance - */ - public static create(properties?: google.pubsub.v1.IAcknowledgeRequest): google.pubsub.v1.AcknowledgeRequest; - - /** - * Encodes the specified AcknowledgeRequest message. Does not implicitly {@link google.pubsub.v1.AcknowledgeRequest.verify|verify} messages. - * @param message AcknowledgeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IAcknowledgeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AcknowledgeRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.AcknowledgeRequest.verify|verify} messages. - * @param message AcknowledgeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IAcknowledgeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AcknowledgeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AcknowledgeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.AcknowledgeRequest; - - /** - * Decodes an AcknowledgeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AcknowledgeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.AcknowledgeRequest; - - /** - * Verifies an AcknowledgeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AcknowledgeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AcknowledgeRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.AcknowledgeRequest; - - /** - * Creates a plain object from an AcknowledgeRequest message. Also converts values to other types if specified. - * @param message AcknowledgeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.AcknowledgeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AcknowledgeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AcknowledgeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StreamingPullRequest. */ - interface IStreamingPullRequest { - - /** StreamingPullRequest subscription */ - subscription?: (string|null); - - /** StreamingPullRequest ackIds */ - ackIds?: (string[]|null); - - /** StreamingPullRequest modifyDeadlineSeconds */ - modifyDeadlineSeconds?: (number[]|null); - - /** StreamingPullRequest modifyDeadlineAckIds */ - modifyDeadlineAckIds?: (string[]|null); - - /** StreamingPullRequest streamAckDeadlineSeconds */ - streamAckDeadlineSeconds?: (number|null); - - /** StreamingPullRequest clientId */ - clientId?: (string|null); - - /** StreamingPullRequest maxOutstandingMessages */ - maxOutstandingMessages?: (number|Long|string|null); - - /** StreamingPullRequest maxOutstandingBytes */ - maxOutstandingBytes?: (number|Long|string|null); - - /** StreamingPullRequest protocolVersion */ - protocolVersion?: (number|Long|string|null); - } - - /** Represents a StreamingPullRequest. */ - class StreamingPullRequest implements IStreamingPullRequest { - - /** - * Constructs a new StreamingPullRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IStreamingPullRequest); - - /** StreamingPullRequest subscription. */ - public subscription: string; - - /** StreamingPullRequest ackIds. */ - public ackIds: string[]; - - /** StreamingPullRequest modifyDeadlineSeconds. */ - public modifyDeadlineSeconds: number[]; - - /** StreamingPullRequest modifyDeadlineAckIds. */ - public modifyDeadlineAckIds: string[]; - - /** StreamingPullRequest streamAckDeadlineSeconds. */ - public streamAckDeadlineSeconds: number; - - /** StreamingPullRequest clientId. */ - public clientId: string; - - /** StreamingPullRequest maxOutstandingMessages. */ - public maxOutstandingMessages: (number|Long|string); - - /** StreamingPullRequest maxOutstandingBytes. */ - public maxOutstandingBytes: (number|Long|string); - - /** StreamingPullRequest protocolVersion. */ - public protocolVersion: (number|Long|string); - - /** - * Creates a new StreamingPullRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StreamingPullRequest instance - */ - public static create(properties?: google.pubsub.v1.IStreamingPullRequest): google.pubsub.v1.StreamingPullRequest; - - /** - * Encodes the specified StreamingPullRequest message. Does not implicitly {@link google.pubsub.v1.StreamingPullRequest.verify|verify} messages. - * @param message StreamingPullRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IStreamingPullRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StreamingPullRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.StreamingPullRequest.verify|verify} messages. - * @param message StreamingPullRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IStreamingPullRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StreamingPullRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StreamingPullRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.StreamingPullRequest; - - /** - * Decodes a StreamingPullRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StreamingPullRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.StreamingPullRequest; - - /** - * Verifies a StreamingPullRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StreamingPullRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StreamingPullRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.StreamingPullRequest; - - /** - * Creates a plain object from a StreamingPullRequest message. Also converts values to other types if specified. - * @param message StreamingPullRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.StreamingPullRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StreamingPullRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StreamingPullRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StreamingPullResponse. */ - interface IStreamingPullResponse { - - /** StreamingPullResponse receivedMessages */ - receivedMessages?: (google.pubsub.v1.IReceivedMessage[]|null); - - /** StreamingPullResponse acknowledgeConfirmation */ - acknowledgeConfirmation?: (google.pubsub.v1.StreamingPullResponse.IAcknowledgeConfirmation|null); - - /** StreamingPullResponse modifyAckDeadlineConfirmation */ - modifyAckDeadlineConfirmation?: (google.pubsub.v1.StreamingPullResponse.IModifyAckDeadlineConfirmation|null); - - /** StreamingPullResponse subscriptionProperties */ - subscriptionProperties?: (google.pubsub.v1.StreamingPullResponse.ISubscriptionProperties|null); - } - - /** Represents a StreamingPullResponse. */ - class StreamingPullResponse implements IStreamingPullResponse { - - /** - * Constructs a new StreamingPullResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IStreamingPullResponse); - - /** StreamingPullResponse receivedMessages. */ - public receivedMessages: google.pubsub.v1.IReceivedMessage[]; - - /** StreamingPullResponse acknowledgeConfirmation. */ - public acknowledgeConfirmation?: (google.pubsub.v1.StreamingPullResponse.IAcknowledgeConfirmation|null); - - /** StreamingPullResponse modifyAckDeadlineConfirmation. */ - public modifyAckDeadlineConfirmation?: (google.pubsub.v1.StreamingPullResponse.IModifyAckDeadlineConfirmation|null); - - /** StreamingPullResponse subscriptionProperties. */ - public subscriptionProperties?: (google.pubsub.v1.StreamingPullResponse.ISubscriptionProperties|null); - - /** - * Creates a new StreamingPullResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StreamingPullResponse instance - */ - public static create(properties?: google.pubsub.v1.IStreamingPullResponse): google.pubsub.v1.StreamingPullResponse; - - /** - * Encodes the specified StreamingPullResponse message. Does not implicitly {@link google.pubsub.v1.StreamingPullResponse.verify|verify} messages. - * @param message StreamingPullResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IStreamingPullResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StreamingPullResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.StreamingPullResponse.verify|verify} messages. - * @param message StreamingPullResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IStreamingPullResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StreamingPullResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StreamingPullResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.StreamingPullResponse; - - /** - * Decodes a StreamingPullResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StreamingPullResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.StreamingPullResponse; - - /** - * Verifies a StreamingPullResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StreamingPullResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StreamingPullResponse - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.StreamingPullResponse; - - /** - * Creates a plain object from a StreamingPullResponse message. Also converts values to other types if specified. - * @param message StreamingPullResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.StreamingPullResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StreamingPullResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StreamingPullResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace StreamingPullResponse { - - /** Properties of an AcknowledgeConfirmation. */ - interface IAcknowledgeConfirmation { - - /** AcknowledgeConfirmation ackIds */ - ackIds?: (string[]|null); - - /** AcknowledgeConfirmation invalidAckIds */ - invalidAckIds?: (string[]|null); - - /** AcknowledgeConfirmation unorderedAckIds */ - unorderedAckIds?: (string[]|null); - - /** AcknowledgeConfirmation temporaryFailedAckIds */ - temporaryFailedAckIds?: (string[]|null); - } - - /** Represents an AcknowledgeConfirmation. */ - class AcknowledgeConfirmation implements IAcknowledgeConfirmation { - - /** - * Constructs a new AcknowledgeConfirmation. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.StreamingPullResponse.IAcknowledgeConfirmation); - - /** AcknowledgeConfirmation ackIds. */ - public ackIds: string[]; - - /** AcknowledgeConfirmation invalidAckIds. */ - public invalidAckIds: string[]; - - /** AcknowledgeConfirmation unorderedAckIds. */ - public unorderedAckIds: string[]; - - /** AcknowledgeConfirmation temporaryFailedAckIds. */ - public temporaryFailedAckIds: string[]; - - /** - * Creates a new AcknowledgeConfirmation instance using the specified properties. - * @param [properties] Properties to set - * @returns AcknowledgeConfirmation instance - */ - public static create(properties?: google.pubsub.v1.StreamingPullResponse.IAcknowledgeConfirmation): google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation; - - /** - * Encodes the specified AcknowledgeConfirmation message. Does not implicitly {@link google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.verify|verify} messages. - * @param message AcknowledgeConfirmation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.StreamingPullResponse.IAcknowledgeConfirmation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AcknowledgeConfirmation message, length delimited. Does not implicitly {@link google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.verify|verify} messages. - * @param message AcknowledgeConfirmation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.StreamingPullResponse.IAcknowledgeConfirmation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AcknowledgeConfirmation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AcknowledgeConfirmation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation; - - /** - * Decodes an AcknowledgeConfirmation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AcknowledgeConfirmation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation; - - /** - * Verifies an AcknowledgeConfirmation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AcknowledgeConfirmation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AcknowledgeConfirmation - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation; - - /** - * Creates a plain object from an AcknowledgeConfirmation message. Also converts values to other types if specified. - * @param message AcknowledgeConfirmation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AcknowledgeConfirmation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AcknowledgeConfirmation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ModifyAckDeadlineConfirmation. */ - interface IModifyAckDeadlineConfirmation { - - /** ModifyAckDeadlineConfirmation ackIds */ - ackIds?: (string[]|null); - - /** ModifyAckDeadlineConfirmation invalidAckIds */ - invalidAckIds?: (string[]|null); - - /** ModifyAckDeadlineConfirmation temporaryFailedAckIds */ - temporaryFailedAckIds?: (string[]|null); - } - - /** Represents a ModifyAckDeadlineConfirmation. */ - class ModifyAckDeadlineConfirmation implements IModifyAckDeadlineConfirmation { - - /** - * Constructs a new ModifyAckDeadlineConfirmation. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.StreamingPullResponse.IModifyAckDeadlineConfirmation); - - /** ModifyAckDeadlineConfirmation ackIds. */ - public ackIds: string[]; - - /** ModifyAckDeadlineConfirmation invalidAckIds. */ - public invalidAckIds: string[]; - - /** ModifyAckDeadlineConfirmation temporaryFailedAckIds. */ - public temporaryFailedAckIds: string[]; - - /** - * Creates a new ModifyAckDeadlineConfirmation instance using the specified properties. - * @param [properties] Properties to set - * @returns ModifyAckDeadlineConfirmation instance - */ - public static create(properties?: google.pubsub.v1.StreamingPullResponse.IModifyAckDeadlineConfirmation): google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation; - - /** - * Encodes the specified ModifyAckDeadlineConfirmation message. Does not implicitly {@link google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.verify|verify} messages. - * @param message ModifyAckDeadlineConfirmation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.StreamingPullResponse.IModifyAckDeadlineConfirmation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ModifyAckDeadlineConfirmation message, length delimited. Does not implicitly {@link google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.verify|verify} messages. - * @param message ModifyAckDeadlineConfirmation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.StreamingPullResponse.IModifyAckDeadlineConfirmation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ModifyAckDeadlineConfirmation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ModifyAckDeadlineConfirmation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation; - - /** - * Decodes a ModifyAckDeadlineConfirmation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ModifyAckDeadlineConfirmation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation; - - /** - * Verifies a ModifyAckDeadlineConfirmation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ModifyAckDeadlineConfirmation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ModifyAckDeadlineConfirmation - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation; - - /** - * Creates a plain object from a ModifyAckDeadlineConfirmation message. Also converts values to other types if specified. - * @param message ModifyAckDeadlineConfirmation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ModifyAckDeadlineConfirmation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ModifyAckDeadlineConfirmation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SubscriptionProperties. */ - interface ISubscriptionProperties { - - /** SubscriptionProperties exactlyOnceDeliveryEnabled */ - exactlyOnceDeliveryEnabled?: (boolean|null); - - /** SubscriptionProperties messageOrderingEnabled */ - messageOrderingEnabled?: (boolean|null); - } - - /** Represents a SubscriptionProperties. */ - class SubscriptionProperties implements ISubscriptionProperties { - - /** - * Constructs a new SubscriptionProperties. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.StreamingPullResponse.ISubscriptionProperties); - - /** SubscriptionProperties exactlyOnceDeliveryEnabled. */ - public exactlyOnceDeliveryEnabled: boolean; - - /** SubscriptionProperties messageOrderingEnabled. */ - public messageOrderingEnabled: boolean; - - /** - * Creates a new SubscriptionProperties instance using the specified properties. - * @param [properties] Properties to set - * @returns SubscriptionProperties instance - */ - public static create(properties?: google.pubsub.v1.StreamingPullResponse.ISubscriptionProperties): google.pubsub.v1.StreamingPullResponse.SubscriptionProperties; - - /** - * Encodes the specified SubscriptionProperties message. Does not implicitly {@link google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.verify|verify} messages. - * @param message SubscriptionProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.StreamingPullResponse.ISubscriptionProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SubscriptionProperties message, length delimited. Does not implicitly {@link google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.verify|verify} messages. - * @param message SubscriptionProperties message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.StreamingPullResponse.ISubscriptionProperties, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SubscriptionProperties message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SubscriptionProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.StreamingPullResponse.SubscriptionProperties; - - /** - * Decodes a SubscriptionProperties message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SubscriptionProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.StreamingPullResponse.SubscriptionProperties; - - /** - * Verifies a SubscriptionProperties message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SubscriptionProperties message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SubscriptionProperties - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.StreamingPullResponse.SubscriptionProperties; - - /** - * Creates a plain object from a SubscriptionProperties message. Also converts values to other types if specified. - * @param message SubscriptionProperties - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.StreamingPullResponse.SubscriptionProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SubscriptionProperties to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SubscriptionProperties - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CreateSnapshotRequest. */ - interface ICreateSnapshotRequest { - - /** CreateSnapshotRequest name */ - name?: (string|null); - - /** CreateSnapshotRequest subscription */ - subscription?: (string|null); - - /** CreateSnapshotRequest labels */ - labels?: ({ [k: string]: string }|null); - - /** CreateSnapshotRequest tags */ - tags?: ({ [k: string]: string }|null); - } - - /** Represents a CreateSnapshotRequest. */ - class CreateSnapshotRequest implements ICreateSnapshotRequest { - - /** - * Constructs a new CreateSnapshotRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.ICreateSnapshotRequest); - - /** CreateSnapshotRequest name. */ - public name: string; - - /** CreateSnapshotRequest subscription. */ - public subscription: string; - - /** CreateSnapshotRequest labels. */ - public labels: { [k: string]: string }; - - /** CreateSnapshotRequest tags. */ - public tags: { [k: string]: string }; - - /** - * Creates a new CreateSnapshotRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateSnapshotRequest instance - */ - public static create(properties?: google.pubsub.v1.ICreateSnapshotRequest): google.pubsub.v1.CreateSnapshotRequest; - - /** - * Encodes the specified CreateSnapshotRequest message. Does not implicitly {@link google.pubsub.v1.CreateSnapshotRequest.verify|verify} messages. - * @param message CreateSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.ICreateSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateSnapshotRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.CreateSnapshotRequest.verify|verify} messages. - * @param message CreateSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.ICreateSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateSnapshotRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.CreateSnapshotRequest; - - /** - * Decodes a CreateSnapshotRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.CreateSnapshotRequest; - - /** - * Verifies a CreateSnapshotRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateSnapshotRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.CreateSnapshotRequest; - - /** - * Creates a plain object from a CreateSnapshotRequest message. Also converts values to other types if specified. - * @param message CreateSnapshotRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.CreateSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateSnapshotRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateSnapshotRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateSnapshotRequest. */ - interface IUpdateSnapshotRequest { - - /** UpdateSnapshotRequest snapshot */ - snapshot?: (google.pubsub.v1.ISnapshot|null); - - /** UpdateSnapshotRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateSnapshotRequest. */ - class UpdateSnapshotRequest implements IUpdateSnapshotRequest { - - /** - * Constructs a new UpdateSnapshotRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IUpdateSnapshotRequest); - - /** UpdateSnapshotRequest snapshot. */ - public snapshot?: (google.pubsub.v1.ISnapshot|null); - - /** UpdateSnapshotRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateSnapshotRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateSnapshotRequest instance - */ - public static create(properties?: google.pubsub.v1.IUpdateSnapshotRequest): google.pubsub.v1.UpdateSnapshotRequest; - - /** - * Encodes the specified UpdateSnapshotRequest message. Does not implicitly {@link google.pubsub.v1.UpdateSnapshotRequest.verify|verify} messages. - * @param message UpdateSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IUpdateSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateSnapshotRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.UpdateSnapshotRequest.verify|verify} messages. - * @param message UpdateSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IUpdateSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateSnapshotRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.UpdateSnapshotRequest; - - /** - * Decodes an UpdateSnapshotRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.UpdateSnapshotRequest; - - /** - * Verifies an UpdateSnapshotRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an UpdateSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateSnapshotRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.UpdateSnapshotRequest; - - /** - * Creates a plain object from an UpdateSnapshotRequest message. Also converts values to other types if specified. - * @param message UpdateSnapshotRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.UpdateSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateSnapshotRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateSnapshotRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Snapshot. */ - interface ISnapshot { - - /** Snapshot name */ - name?: (string|null); - - /** Snapshot topic */ - topic?: (string|null); - - /** Snapshot expireTime */ - expireTime?: (google.protobuf.ITimestamp|null); - - /** Snapshot labels */ - labels?: ({ [k: string]: string }|null); - } - - /** Represents a Snapshot. */ - class Snapshot implements ISnapshot { - - /** - * Constructs a new Snapshot. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.ISnapshot); - - /** Snapshot name. */ - public name: string; - - /** Snapshot topic. */ - public topic: string; - - /** Snapshot expireTime. */ - public expireTime?: (google.protobuf.ITimestamp|null); - - /** Snapshot labels. */ - public labels: { [k: string]: string }; - - /** - * Creates a new Snapshot instance using the specified properties. - * @param [properties] Properties to set - * @returns Snapshot instance - */ - public static create(properties?: google.pubsub.v1.ISnapshot): google.pubsub.v1.Snapshot; - - /** - * Encodes the specified Snapshot message. Does not implicitly {@link google.pubsub.v1.Snapshot.verify|verify} messages. - * @param message Snapshot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.ISnapshot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link google.pubsub.v1.Snapshot.verify|verify} messages. - * @param message Snapshot message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.ISnapshot, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Snapshot message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Snapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.Snapshot; - - /** - * Decodes a Snapshot message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Snapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.Snapshot; - - /** - * Verifies a Snapshot message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Snapshot - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.Snapshot; - - /** - * Creates a plain object from a Snapshot message. Also converts values to other types if specified. - * @param message Snapshot - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.Snapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Snapshot to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Snapshot - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetSnapshotRequest. */ - interface IGetSnapshotRequest { - - /** GetSnapshotRequest snapshot */ - snapshot?: (string|null); - } - - /** Represents a GetSnapshotRequest. */ - class GetSnapshotRequest implements IGetSnapshotRequest { - - /** - * Constructs a new GetSnapshotRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IGetSnapshotRequest); - - /** GetSnapshotRequest snapshot. */ - public snapshot: string; - - /** - * Creates a new GetSnapshotRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSnapshotRequest instance - */ - public static create(properties?: google.pubsub.v1.IGetSnapshotRequest): google.pubsub.v1.GetSnapshotRequest; - - /** - * Encodes the specified GetSnapshotRequest message. Does not implicitly {@link google.pubsub.v1.GetSnapshotRequest.verify|verify} messages. - * @param message GetSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IGetSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSnapshotRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.GetSnapshotRequest.verify|verify} messages. - * @param message GetSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IGetSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSnapshotRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.GetSnapshotRequest; - - /** - * Decodes a GetSnapshotRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.GetSnapshotRequest; - - /** - * Verifies a GetSnapshotRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSnapshotRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.GetSnapshotRequest; - - /** - * Creates a plain object from a GetSnapshotRequest message. Also converts values to other types if specified. - * @param message GetSnapshotRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.GetSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSnapshotRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetSnapshotRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSnapshotsRequest. */ - interface IListSnapshotsRequest { - - /** ListSnapshotsRequest project */ - project?: (string|null); - - /** ListSnapshotsRequest pageSize */ - pageSize?: (number|null); - - /** ListSnapshotsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListSnapshotsRequest. */ - class ListSnapshotsRequest implements IListSnapshotsRequest { - - /** - * Constructs a new ListSnapshotsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IListSnapshotsRequest); - - /** ListSnapshotsRequest project. */ - public project: string; - - /** ListSnapshotsRequest pageSize. */ - public pageSize: number; - - /** ListSnapshotsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListSnapshotsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSnapshotsRequest instance - */ - public static create(properties?: google.pubsub.v1.IListSnapshotsRequest): google.pubsub.v1.ListSnapshotsRequest; - - /** - * Encodes the specified ListSnapshotsRequest message. Does not implicitly {@link google.pubsub.v1.ListSnapshotsRequest.verify|verify} messages. - * @param message ListSnapshotsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IListSnapshotsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSnapshotsRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSnapshotsRequest.verify|verify} messages. - * @param message ListSnapshotsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IListSnapshotsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSnapshotsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSnapshotsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ListSnapshotsRequest; - - /** - * Decodes a ListSnapshotsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSnapshotsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ListSnapshotsRequest; - - /** - * Verifies a ListSnapshotsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSnapshotsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSnapshotsRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ListSnapshotsRequest; - - /** - * Creates a plain object from a ListSnapshotsRequest message. Also converts values to other types if specified. - * @param message ListSnapshotsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ListSnapshotsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSnapshotsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSnapshotsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSnapshotsResponse. */ - interface IListSnapshotsResponse { - - /** ListSnapshotsResponse snapshots */ - snapshots?: (google.pubsub.v1.ISnapshot[]|null); - - /** ListSnapshotsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListSnapshotsResponse. */ - class ListSnapshotsResponse implements IListSnapshotsResponse { - - /** - * Constructs a new ListSnapshotsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IListSnapshotsResponse); - - /** ListSnapshotsResponse snapshots. */ - public snapshots: google.pubsub.v1.ISnapshot[]; - - /** ListSnapshotsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListSnapshotsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSnapshotsResponse instance - */ - public static create(properties?: google.pubsub.v1.IListSnapshotsResponse): google.pubsub.v1.ListSnapshotsResponse; - - /** - * Encodes the specified ListSnapshotsResponse message. Does not implicitly {@link google.pubsub.v1.ListSnapshotsResponse.verify|verify} messages. - * @param message ListSnapshotsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IListSnapshotsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSnapshotsResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSnapshotsResponse.verify|verify} messages. - * @param message ListSnapshotsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IListSnapshotsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSnapshotsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSnapshotsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ListSnapshotsResponse; - - /** - * Decodes a ListSnapshotsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSnapshotsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ListSnapshotsResponse; - - /** - * Verifies a ListSnapshotsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSnapshotsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSnapshotsResponse - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ListSnapshotsResponse; - - /** - * Creates a plain object from a ListSnapshotsResponse message. Also converts values to other types if specified. - * @param message ListSnapshotsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ListSnapshotsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSnapshotsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSnapshotsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteSnapshotRequest. */ - interface IDeleteSnapshotRequest { - - /** DeleteSnapshotRequest snapshot */ - snapshot?: (string|null); - } - - /** Represents a DeleteSnapshotRequest. */ - class DeleteSnapshotRequest implements IDeleteSnapshotRequest { - - /** - * Constructs a new DeleteSnapshotRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IDeleteSnapshotRequest); - - /** DeleteSnapshotRequest snapshot. */ - public snapshot: string; - - /** - * Creates a new DeleteSnapshotRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteSnapshotRequest instance - */ - public static create(properties?: google.pubsub.v1.IDeleteSnapshotRequest): google.pubsub.v1.DeleteSnapshotRequest; - - /** - * Encodes the specified DeleteSnapshotRequest message. Does not implicitly {@link google.pubsub.v1.DeleteSnapshotRequest.verify|verify} messages. - * @param message DeleteSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IDeleteSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteSnapshotRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.DeleteSnapshotRequest.verify|verify} messages. - * @param message DeleteSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IDeleteSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteSnapshotRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.DeleteSnapshotRequest; - - /** - * Decodes a DeleteSnapshotRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.DeleteSnapshotRequest; - - /** - * Verifies a DeleteSnapshotRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteSnapshotRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.DeleteSnapshotRequest; - - /** - * Creates a plain object from a DeleteSnapshotRequest message. Also converts values to other types if specified. - * @param message DeleteSnapshotRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.DeleteSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteSnapshotRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteSnapshotRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SeekRequest. */ - interface ISeekRequest { - - /** SeekRequest subscription */ - subscription?: (string|null); - - /** SeekRequest time */ - time?: (google.protobuf.ITimestamp|null); - - /** SeekRequest snapshot */ - snapshot?: (string|null); - } - - /** Represents a SeekRequest. */ - class SeekRequest implements ISeekRequest { - - /** - * Constructs a new SeekRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.ISeekRequest); - - /** SeekRequest subscription. */ - public subscription: string; - - /** SeekRequest time. */ - public time?: (google.protobuf.ITimestamp|null); - - /** SeekRequest snapshot. */ - public snapshot?: (string|null); - - /** SeekRequest target. */ - public target?: ("time"|"snapshot"); - - /** - * Creates a new SeekRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SeekRequest instance - */ - public static create(properties?: google.pubsub.v1.ISeekRequest): google.pubsub.v1.SeekRequest; - - /** - * Encodes the specified SeekRequest message. Does not implicitly {@link google.pubsub.v1.SeekRequest.verify|verify} messages. - * @param message SeekRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.ISeekRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SeekRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.SeekRequest.verify|verify} messages. - * @param message SeekRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.ISeekRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SeekRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SeekRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.SeekRequest; - - /** - * Decodes a SeekRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SeekRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.SeekRequest; - - /** - * Verifies a SeekRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SeekRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SeekRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.SeekRequest; - - /** - * Creates a plain object from a SeekRequest message. Also converts values to other types if specified. - * @param message SeekRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.SeekRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SeekRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SeekRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SeekResponse. */ - interface ISeekResponse { - } - - /** Represents a SeekResponse. */ - class SeekResponse implements ISeekResponse { - - /** - * Constructs a new SeekResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.ISeekResponse); - - /** - * Creates a new SeekResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SeekResponse instance - */ - public static create(properties?: google.pubsub.v1.ISeekResponse): google.pubsub.v1.SeekResponse; - - /** - * Encodes the specified SeekResponse message. Does not implicitly {@link google.pubsub.v1.SeekResponse.verify|verify} messages. - * @param message SeekResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.ISeekResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SeekResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.SeekResponse.verify|verify} messages. - * @param message SeekResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.ISeekResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SeekResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SeekResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.SeekResponse; - - /** - * Decodes a SeekResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SeekResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.SeekResponse; - - /** - * Verifies a SeekResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SeekResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SeekResponse - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.SeekResponse; - - /** - * Creates a plain object from a SeekResponse message. Also converts values to other types if specified. - * @param message SeekResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.SeekResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SeekResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SeekResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a SchemaService */ - class SchemaService extends $protobuf.rpc.Service { - - /** - * Constructs a new SchemaService 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); - - /** - * Creates new SchemaService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SchemaService; - - /** - * Calls CreateSchema. - * @param request CreateSchemaRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Schema - */ - public createSchema(request: google.pubsub.v1.ICreateSchemaRequest, callback: google.pubsub.v1.SchemaService.CreateSchemaCallback): void; - - /** - * Calls CreateSchema. - * @param request CreateSchemaRequest message or plain object - * @returns Promise - */ - public createSchema(request: google.pubsub.v1.ICreateSchemaRequest): Promise; - - /** - * Calls GetSchema. - * @param request GetSchemaRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Schema - */ - public getSchema(request: google.pubsub.v1.IGetSchemaRequest, callback: google.pubsub.v1.SchemaService.GetSchemaCallback): void; - - /** - * Calls GetSchema. - * @param request GetSchemaRequest message or plain object - * @returns Promise - */ - public getSchema(request: google.pubsub.v1.IGetSchemaRequest): Promise; - - /** - * Calls ListSchemas. - * @param request ListSchemasRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSchemasResponse - */ - public listSchemas(request: google.pubsub.v1.IListSchemasRequest, callback: google.pubsub.v1.SchemaService.ListSchemasCallback): void; - - /** - * Calls ListSchemas. - * @param request ListSchemasRequest message or plain object - * @returns Promise - */ - public listSchemas(request: google.pubsub.v1.IListSchemasRequest): Promise; - - /** - * Calls ListSchemaRevisions. - * @param request ListSchemaRevisionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListSchemaRevisionsResponse - */ - public listSchemaRevisions(request: google.pubsub.v1.IListSchemaRevisionsRequest, callback: google.pubsub.v1.SchemaService.ListSchemaRevisionsCallback): void; - - /** - * Calls ListSchemaRevisions. - * @param request ListSchemaRevisionsRequest message or plain object - * @returns Promise - */ - public listSchemaRevisions(request: google.pubsub.v1.IListSchemaRevisionsRequest): Promise; - - /** - * Calls CommitSchema. - * @param request CommitSchemaRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Schema - */ - public commitSchema(request: google.pubsub.v1.ICommitSchemaRequest, callback: google.pubsub.v1.SchemaService.CommitSchemaCallback): void; - - /** - * Calls CommitSchema. - * @param request CommitSchemaRequest message or plain object - * @returns Promise - */ - public commitSchema(request: google.pubsub.v1.ICommitSchemaRequest): Promise; - - /** - * Calls RollbackSchema. - * @param request RollbackSchemaRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Schema - */ - public rollbackSchema(request: google.pubsub.v1.IRollbackSchemaRequest, callback: google.pubsub.v1.SchemaService.RollbackSchemaCallback): void; - - /** - * Calls RollbackSchema. - * @param request RollbackSchemaRequest message or plain object - * @returns Promise - */ - public rollbackSchema(request: google.pubsub.v1.IRollbackSchemaRequest): Promise; - - /** - * Calls DeleteSchemaRevision. - * @param request DeleteSchemaRevisionRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Schema - */ - public deleteSchemaRevision(request: google.pubsub.v1.IDeleteSchemaRevisionRequest, callback: google.pubsub.v1.SchemaService.DeleteSchemaRevisionCallback): void; - - /** - * Calls DeleteSchemaRevision. - * @param request DeleteSchemaRevisionRequest message or plain object - * @returns Promise - */ - public deleteSchemaRevision(request: google.pubsub.v1.IDeleteSchemaRevisionRequest): Promise; - - /** - * Calls DeleteSchema. - * @param request DeleteSchemaRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteSchema(request: google.pubsub.v1.IDeleteSchemaRequest, callback: google.pubsub.v1.SchemaService.DeleteSchemaCallback): void; - - /** - * Calls DeleteSchema. - * @param request DeleteSchemaRequest message or plain object - * @returns Promise - */ - public deleteSchema(request: google.pubsub.v1.IDeleteSchemaRequest): Promise; - - /** - * Calls ValidateSchema. - * @param request ValidateSchemaRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ValidateSchemaResponse - */ - public validateSchema(request: google.pubsub.v1.IValidateSchemaRequest, callback: google.pubsub.v1.SchemaService.ValidateSchemaCallback): void; - - /** - * Calls ValidateSchema. - * @param request ValidateSchemaRequest message or plain object - * @returns Promise - */ - public validateSchema(request: google.pubsub.v1.IValidateSchemaRequest): Promise; - - /** - * Calls ValidateMessage. - * @param request ValidateMessageRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ValidateMessageResponse - */ - public validateMessage(request: google.pubsub.v1.IValidateMessageRequest, callback: google.pubsub.v1.SchemaService.ValidateMessageCallback): void; - - /** - * Calls ValidateMessage. - * @param request ValidateMessageRequest message or plain object - * @returns Promise - */ - public validateMessage(request: google.pubsub.v1.IValidateMessageRequest): Promise; - } - - namespace SchemaService { - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|createSchema}. - * @param error Error, if any - * @param [response] Schema - */ - type CreateSchemaCallback = (error: (Error|null), response?: google.pubsub.v1.Schema) => void; - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|getSchema}. - * @param error Error, if any - * @param [response] Schema - */ - type GetSchemaCallback = (error: (Error|null), response?: google.pubsub.v1.Schema) => void; - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|listSchemas}. - * @param error Error, if any - * @param [response] ListSchemasResponse - */ - type ListSchemasCallback = (error: (Error|null), response?: google.pubsub.v1.ListSchemasResponse) => void; - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|listSchemaRevisions}. - * @param error Error, if any - * @param [response] ListSchemaRevisionsResponse - */ - type ListSchemaRevisionsCallback = (error: (Error|null), response?: google.pubsub.v1.ListSchemaRevisionsResponse) => void; - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|commitSchema}. - * @param error Error, if any - * @param [response] Schema - */ - type CommitSchemaCallback = (error: (Error|null), response?: google.pubsub.v1.Schema) => void; - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|rollbackSchema}. - * @param error Error, if any - * @param [response] Schema - */ - type RollbackSchemaCallback = (error: (Error|null), response?: google.pubsub.v1.Schema) => void; - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|deleteSchemaRevision}. - * @param error Error, if any - * @param [response] Schema - */ - type DeleteSchemaRevisionCallback = (error: (Error|null), response?: google.pubsub.v1.Schema) => void; - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|deleteSchema}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteSchemaCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|validateSchema}. - * @param error Error, if any - * @param [response] ValidateSchemaResponse - */ - type ValidateSchemaCallback = (error: (Error|null), response?: google.pubsub.v1.ValidateSchemaResponse) => void; - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|validateMessage}. - * @param error Error, if any - * @param [response] ValidateMessageResponse - */ - type ValidateMessageCallback = (error: (Error|null), response?: google.pubsub.v1.ValidateMessageResponse) => void; - } - - /** Properties of a Schema. */ - interface ISchema { - - /** Schema name */ - name?: (string|null); - - /** Schema type */ - type?: (google.pubsub.v1.Schema.Type|keyof typeof google.pubsub.v1.Schema.Type|null); - - /** Schema definition */ - definition?: (string|null); - - /** Schema revisionId */ - revisionId?: (string|null); - - /** Schema revisionCreateTime */ - revisionCreateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a Schema. */ - class Schema implements ISchema { - - /** - * Constructs a new Schema. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.ISchema); - - /** Schema name. */ - public name: string; - - /** Schema type. */ - public type: (google.pubsub.v1.Schema.Type|keyof typeof google.pubsub.v1.Schema.Type); - - /** Schema definition. */ - public definition: string; - - /** Schema revisionId. */ - public revisionId: string; - - /** Schema revisionCreateTime. */ - public revisionCreateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new Schema instance using the specified properties. - * @param [properties] Properties to set - * @returns Schema instance - */ - public static create(properties?: google.pubsub.v1.ISchema): google.pubsub.v1.Schema; - - /** - * Encodes the specified Schema message. Does not implicitly {@link google.pubsub.v1.Schema.verify|verify} messages. - * @param message Schema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.pubsub.v1.Schema.verify|verify} messages. - * @param message Schema message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.ISchema, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Schema message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Schema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.Schema; - - /** - * Decodes a Schema message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Schema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.Schema; - - /** - * Verifies a Schema message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Schema message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Schema - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.Schema; - - /** - * Creates a plain object from a Schema message. Also converts values to other types if specified. - * @param message Schema - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.Schema, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Schema to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Schema - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Schema { - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - PROTOCOL_BUFFER = 1, - AVRO = 2 - } - } - - /** SchemaView enum. */ - enum SchemaView { - SCHEMA_VIEW_UNSPECIFIED = 0, - BASIC = 1, - FULL = 2 - } - - /** Properties of a CreateSchemaRequest. */ - interface ICreateSchemaRequest { - - /** CreateSchemaRequest parent */ - parent?: (string|null); - - /** CreateSchemaRequest schema */ - schema?: (google.pubsub.v1.ISchema|null); - - /** CreateSchemaRequest schemaId */ - schemaId?: (string|null); - } - - /** Represents a CreateSchemaRequest. */ - class CreateSchemaRequest implements ICreateSchemaRequest { - - /** - * Constructs a new CreateSchemaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.ICreateSchemaRequest); - - /** CreateSchemaRequest parent. */ - public parent: string; - - /** CreateSchemaRequest schema. */ - public schema?: (google.pubsub.v1.ISchema|null); - - /** CreateSchemaRequest schemaId. */ - public schemaId: string; - - /** - * Creates a new CreateSchemaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateSchemaRequest instance - */ - public static create(properties?: google.pubsub.v1.ICreateSchemaRequest): google.pubsub.v1.CreateSchemaRequest; - - /** - * Encodes the specified CreateSchemaRequest message. Does not implicitly {@link google.pubsub.v1.CreateSchemaRequest.verify|verify} messages. - * @param message CreateSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.ICreateSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateSchemaRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.CreateSchemaRequest.verify|verify} messages. - * @param message CreateSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.ICreateSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateSchemaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.CreateSchemaRequest; - - /** - * Decodes a CreateSchemaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.CreateSchemaRequest; - - /** - * Verifies a CreateSchemaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateSchemaRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.CreateSchemaRequest; - - /** - * Creates a plain object from a CreateSchemaRequest message. Also converts values to other types if specified. - * @param message CreateSchemaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.CreateSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateSchemaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateSchemaRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetSchemaRequest. */ - interface IGetSchemaRequest { - - /** GetSchemaRequest name */ - name?: (string|null); - - /** GetSchemaRequest view */ - view?: (google.pubsub.v1.SchemaView|keyof typeof google.pubsub.v1.SchemaView|null); - } - - /** Represents a GetSchemaRequest. */ - class GetSchemaRequest implements IGetSchemaRequest { - - /** - * Constructs a new GetSchemaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IGetSchemaRequest); - - /** GetSchemaRequest name. */ - public name: string; - - /** GetSchemaRequest view. */ - public view: (google.pubsub.v1.SchemaView|keyof typeof google.pubsub.v1.SchemaView); - - /** - * Creates a new GetSchemaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetSchemaRequest instance - */ - public static create(properties?: google.pubsub.v1.IGetSchemaRequest): google.pubsub.v1.GetSchemaRequest; - - /** - * Encodes the specified GetSchemaRequest message. Does not implicitly {@link google.pubsub.v1.GetSchemaRequest.verify|verify} messages. - * @param message GetSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.GetSchemaRequest.verify|verify} messages. - * @param message GetSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IGetSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.GetSchemaRequest; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.GetSchemaRequest; - - /** - * Verifies a GetSchemaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetSchemaRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.GetSchemaRequest; - - /** - * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. - * @param message GetSchemaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.GetSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetSchemaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetSchemaRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSchemasRequest. */ - interface IListSchemasRequest { - - /** ListSchemasRequest parent */ - parent?: (string|null); - - /** ListSchemasRequest view */ - view?: (google.pubsub.v1.SchemaView|keyof typeof google.pubsub.v1.SchemaView|null); - - /** ListSchemasRequest pageSize */ - pageSize?: (number|null); - - /** ListSchemasRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListSchemasRequest. */ - class ListSchemasRequest implements IListSchemasRequest { - - /** - * Constructs a new ListSchemasRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IListSchemasRequest); - - /** ListSchemasRequest parent. */ - public parent: string; - - /** ListSchemasRequest view. */ - public view: (google.pubsub.v1.SchemaView|keyof typeof google.pubsub.v1.SchemaView); - - /** ListSchemasRequest pageSize. */ - public pageSize: number; - - /** ListSchemasRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListSchemasRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSchemasRequest instance - */ - public static create(properties?: google.pubsub.v1.IListSchemasRequest): google.pubsub.v1.ListSchemasRequest; - - /** - * Encodes the specified ListSchemasRequest message. Does not implicitly {@link google.pubsub.v1.ListSchemasRequest.verify|verify} messages. - * @param message ListSchemasRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IListSchemasRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSchemasRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSchemasRequest.verify|verify} messages. - * @param message ListSchemasRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IListSchemasRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSchemasRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSchemasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ListSchemasRequest; - - /** - * Decodes a ListSchemasRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSchemasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ListSchemasRequest; - - /** - * Verifies a ListSchemasRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSchemasRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSchemasRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ListSchemasRequest; - - /** - * Creates a plain object from a ListSchemasRequest message. Also converts values to other types if specified. - * @param message ListSchemasRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ListSchemasRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSchemasRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSchemasRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSchemasResponse. */ - interface IListSchemasResponse { - - /** ListSchemasResponse schemas */ - schemas?: (google.pubsub.v1.ISchema[]|null); - - /** ListSchemasResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListSchemasResponse. */ - class ListSchemasResponse implements IListSchemasResponse { - - /** - * Constructs a new ListSchemasResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IListSchemasResponse); - - /** ListSchemasResponse schemas. */ - public schemas: google.pubsub.v1.ISchema[]; - - /** ListSchemasResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListSchemasResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSchemasResponse instance - */ - public static create(properties?: google.pubsub.v1.IListSchemasResponse): google.pubsub.v1.ListSchemasResponse; - - /** - * Encodes the specified ListSchemasResponse message. Does not implicitly {@link google.pubsub.v1.ListSchemasResponse.verify|verify} messages. - * @param message ListSchemasResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IListSchemasResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSchemasResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSchemasResponse.verify|verify} messages. - * @param message ListSchemasResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IListSchemasResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSchemasResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSchemasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ListSchemasResponse; - - /** - * Decodes a ListSchemasResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSchemasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ListSchemasResponse; - - /** - * Verifies a ListSchemasResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSchemasResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSchemasResponse - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ListSchemasResponse; - - /** - * Creates a plain object from a ListSchemasResponse message. Also converts values to other types if specified. - * @param message ListSchemasResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ListSchemasResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSchemasResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSchemasResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSchemaRevisionsRequest. */ - interface IListSchemaRevisionsRequest { - - /** ListSchemaRevisionsRequest name */ - name?: (string|null); - - /** ListSchemaRevisionsRequest view */ - view?: (google.pubsub.v1.SchemaView|keyof typeof google.pubsub.v1.SchemaView|null); - - /** ListSchemaRevisionsRequest pageSize */ - pageSize?: (number|null); - - /** ListSchemaRevisionsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListSchemaRevisionsRequest. */ - class ListSchemaRevisionsRequest implements IListSchemaRevisionsRequest { - - /** - * Constructs a new ListSchemaRevisionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IListSchemaRevisionsRequest); - - /** ListSchemaRevisionsRequest name. */ - public name: string; - - /** ListSchemaRevisionsRequest view. */ - public view: (google.pubsub.v1.SchemaView|keyof typeof google.pubsub.v1.SchemaView); - - /** ListSchemaRevisionsRequest pageSize. */ - public pageSize: number; - - /** ListSchemaRevisionsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListSchemaRevisionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSchemaRevisionsRequest instance - */ - public static create(properties?: google.pubsub.v1.IListSchemaRevisionsRequest): google.pubsub.v1.ListSchemaRevisionsRequest; - - /** - * Encodes the specified ListSchemaRevisionsRequest message. Does not implicitly {@link google.pubsub.v1.ListSchemaRevisionsRequest.verify|verify} messages. - * @param message ListSchemaRevisionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IListSchemaRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSchemaRevisionsRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSchemaRevisionsRequest.verify|verify} messages. - * @param message ListSchemaRevisionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IListSchemaRevisionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSchemaRevisionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSchemaRevisionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ListSchemaRevisionsRequest; - - /** - * Decodes a ListSchemaRevisionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSchemaRevisionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ListSchemaRevisionsRequest; - - /** - * Verifies a ListSchemaRevisionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSchemaRevisionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSchemaRevisionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ListSchemaRevisionsRequest; - - /** - * Creates a plain object from a ListSchemaRevisionsRequest message. Also converts values to other types if specified. - * @param message ListSchemaRevisionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ListSchemaRevisionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSchemaRevisionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSchemaRevisionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListSchemaRevisionsResponse. */ - interface IListSchemaRevisionsResponse { - - /** ListSchemaRevisionsResponse schemas */ - schemas?: (google.pubsub.v1.ISchema[]|null); - - /** ListSchemaRevisionsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListSchemaRevisionsResponse. */ - class ListSchemaRevisionsResponse implements IListSchemaRevisionsResponse { - - /** - * Constructs a new ListSchemaRevisionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IListSchemaRevisionsResponse); - - /** ListSchemaRevisionsResponse schemas. */ - public schemas: google.pubsub.v1.ISchema[]; - - /** ListSchemaRevisionsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListSchemaRevisionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListSchemaRevisionsResponse instance - */ - public static create(properties?: google.pubsub.v1.IListSchemaRevisionsResponse): google.pubsub.v1.ListSchemaRevisionsResponse; - - /** - * Encodes the specified ListSchemaRevisionsResponse message. Does not implicitly {@link google.pubsub.v1.ListSchemaRevisionsResponse.verify|verify} messages. - * @param message ListSchemaRevisionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IListSchemaRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListSchemaRevisionsResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSchemaRevisionsResponse.verify|verify} messages. - * @param message ListSchemaRevisionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IListSchemaRevisionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListSchemaRevisionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListSchemaRevisionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ListSchemaRevisionsResponse; - - /** - * Decodes a ListSchemaRevisionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListSchemaRevisionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ListSchemaRevisionsResponse; - - /** - * Verifies a ListSchemaRevisionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListSchemaRevisionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListSchemaRevisionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ListSchemaRevisionsResponse; - - /** - * Creates a plain object from a ListSchemaRevisionsResponse message. Also converts values to other types if specified. - * @param message ListSchemaRevisionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ListSchemaRevisionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListSchemaRevisionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListSchemaRevisionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CommitSchemaRequest. */ - interface ICommitSchemaRequest { - - /** CommitSchemaRequest name */ - name?: (string|null); - - /** CommitSchemaRequest schema */ - schema?: (google.pubsub.v1.ISchema|null); - } - - /** Represents a CommitSchemaRequest. */ - class CommitSchemaRequest implements ICommitSchemaRequest { - - /** - * Constructs a new CommitSchemaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.ICommitSchemaRequest); - - /** CommitSchemaRequest name. */ - public name: string; - - /** CommitSchemaRequest schema. */ - public schema?: (google.pubsub.v1.ISchema|null); - - /** - * Creates a new CommitSchemaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CommitSchemaRequest instance - */ - public static create(properties?: google.pubsub.v1.ICommitSchemaRequest): google.pubsub.v1.CommitSchemaRequest; - - /** - * Encodes the specified CommitSchemaRequest message. Does not implicitly {@link google.pubsub.v1.CommitSchemaRequest.verify|verify} messages. - * @param message CommitSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.ICommitSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommitSchemaRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.CommitSchemaRequest.verify|verify} messages. - * @param message CommitSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.ICommitSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommitSchemaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommitSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.CommitSchemaRequest; - - /** - * Decodes a CommitSchemaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommitSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.CommitSchemaRequest; - - /** - * Verifies a CommitSchemaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommitSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommitSchemaRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.CommitSchemaRequest; - - /** - * Creates a plain object from a CommitSchemaRequest message. Also converts values to other types if specified. - * @param message CommitSchemaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.CommitSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommitSchemaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommitSchemaRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RollbackSchemaRequest. */ - interface IRollbackSchemaRequest { - - /** RollbackSchemaRequest name */ - name?: (string|null); - - /** RollbackSchemaRequest revisionId */ - revisionId?: (string|null); - } - - /** Represents a RollbackSchemaRequest. */ - class RollbackSchemaRequest implements IRollbackSchemaRequest { - - /** - * Constructs a new RollbackSchemaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IRollbackSchemaRequest); - - /** RollbackSchemaRequest name. */ - public name: string; - - /** RollbackSchemaRequest revisionId. */ - public revisionId: string; - - /** - * Creates a new RollbackSchemaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RollbackSchemaRequest instance - */ - public static create(properties?: google.pubsub.v1.IRollbackSchemaRequest): google.pubsub.v1.RollbackSchemaRequest; - - /** - * Encodes the specified RollbackSchemaRequest message. Does not implicitly {@link google.pubsub.v1.RollbackSchemaRequest.verify|verify} messages. - * @param message RollbackSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IRollbackSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RollbackSchemaRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.RollbackSchemaRequest.verify|verify} messages. - * @param message RollbackSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IRollbackSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RollbackSchemaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RollbackSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.RollbackSchemaRequest; - - /** - * Decodes a RollbackSchemaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RollbackSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.RollbackSchemaRequest; - - /** - * Verifies a RollbackSchemaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RollbackSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RollbackSchemaRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.RollbackSchemaRequest; - - /** - * Creates a plain object from a RollbackSchemaRequest message. Also converts values to other types if specified. - * @param message RollbackSchemaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.RollbackSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RollbackSchemaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RollbackSchemaRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteSchemaRevisionRequest. */ - interface IDeleteSchemaRevisionRequest { - - /** DeleteSchemaRevisionRequest name */ - name?: (string|null); - - /** DeleteSchemaRevisionRequest revisionId */ - revisionId?: (string|null); - } - - /** Represents a DeleteSchemaRevisionRequest. */ - class DeleteSchemaRevisionRequest implements IDeleteSchemaRevisionRequest { - - /** - * Constructs a new DeleteSchemaRevisionRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IDeleteSchemaRevisionRequest); - - /** DeleteSchemaRevisionRequest name. */ - public name: string; - - /** DeleteSchemaRevisionRequest revisionId. */ - public revisionId: string; - - /** - * Creates a new DeleteSchemaRevisionRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteSchemaRevisionRequest instance - */ - public static create(properties?: google.pubsub.v1.IDeleteSchemaRevisionRequest): google.pubsub.v1.DeleteSchemaRevisionRequest; - - /** - * Encodes the specified DeleteSchemaRevisionRequest message. Does not implicitly {@link google.pubsub.v1.DeleteSchemaRevisionRequest.verify|verify} messages. - * @param message DeleteSchemaRevisionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IDeleteSchemaRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteSchemaRevisionRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.DeleteSchemaRevisionRequest.verify|verify} messages. - * @param message DeleteSchemaRevisionRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IDeleteSchemaRevisionRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteSchemaRevisionRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteSchemaRevisionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.DeleteSchemaRevisionRequest; - - /** - * Decodes a DeleteSchemaRevisionRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteSchemaRevisionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.DeleteSchemaRevisionRequest; - - /** - * Verifies a DeleteSchemaRevisionRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteSchemaRevisionRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteSchemaRevisionRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.DeleteSchemaRevisionRequest; - - /** - * Creates a plain object from a DeleteSchemaRevisionRequest message. Also converts values to other types if specified. - * @param message DeleteSchemaRevisionRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.DeleteSchemaRevisionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteSchemaRevisionRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteSchemaRevisionRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteSchemaRequest. */ - interface IDeleteSchemaRequest { - - /** DeleteSchemaRequest name */ - name?: (string|null); - } - - /** Represents a DeleteSchemaRequest. */ - class DeleteSchemaRequest implements IDeleteSchemaRequest { - - /** - * Constructs a new DeleteSchemaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IDeleteSchemaRequest); - - /** DeleteSchemaRequest name. */ - public name: string; - - /** - * Creates a new DeleteSchemaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteSchemaRequest instance - */ - public static create(properties?: google.pubsub.v1.IDeleteSchemaRequest): google.pubsub.v1.DeleteSchemaRequest; - - /** - * Encodes the specified DeleteSchemaRequest message. Does not implicitly {@link google.pubsub.v1.DeleteSchemaRequest.verify|verify} messages. - * @param message DeleteSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IDeleteSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteSchemaRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.DeleteSchemaRequest.verify|verify} messages. - * @param message DeleteSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IDeleteSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteSchemaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.DeleteSchemaRequest; - - /** - * Decodes a DeleteSchemaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.DeleteSchemaRequest; - - /** - * Verifies a DeleteSchemaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteSchemaRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.DeleteSchemaRequest; - - /** - * Creates a plain object from a DeleteSchemaRequest message. Also converts values to other types if specified. - * @param message DeleteSchemaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.DeleteSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteSchemaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteSchemaRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ValidateSchemaRequest. */ - interface IValidateSchemaRequest { - - /** ValidateSchemaRequest parent */ - parent?: (string|null); - - /** ValidateSchemaRequest schema */ - schema?: (google.pubsub.v1.ISchema|null); - } - - /** Represents a ValidateSchemaRequest. */ - class ValidateSchemaRequest implements IValidateSchemaRequest { - - /** - * Constructs a new ValidateSchemaRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IValidateSchemaRequest); - - /** ValidateSchemaRequest parent. */ - public parent: string; - - /** ValidateSchemaRequest schema. */ - public schema?: (google.pubsub.v1.ISchema|null); - - /** - * Creates a new ValidateSchemaRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidateSchemaRequest instance - */ - public static create(properties?: google.pubsub.v1.IValidateSchemaRequest): google.pubsub.v1.ValidateSchemaRequest; - - /** - * Encodes the specified ValidateSchemaRequest message. Does not implicitly {@link google.pubsub.v1.ValidateSchemaRequest.verify|verify} messages. - * @param message ValidateSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IValidateSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidateSchemaRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ValidateSchemaRequest.verify|verify} messages. - * @param message ValidateSchemaRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IValidateSchemaRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidateSchemaRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidateSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ValidateSchemaRequest; - - /** - * Decodes a ValidateSchemaRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidateSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ValidateSchemaRequest; - - /** - * Verifies a ValidateSchemaRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidateSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidateSchemaRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ValidateSchemaRequest; - - /** - * Creates a plain object from a ValidateSchemaRequest message. Also converts values to other types if specified. - * @param message ValidateSchemaRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ValidateSchemaRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidateSchemaRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ValidateSchemaRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ValidateSchemaResponse. */ - interface IValidateSchemaResponse { - } - - /** Represents a ValidateSchemaResponse. */ - class ValidateSchemaResponse implements IValidateSchemaResponse { - - /** - * Constructs a new ValidateSchemaResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IValidateSchemaResponse); - - /** - * Creates a new ValidateSchemaResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidateSchemaResponse instance - */ - public static create(properties?: google.pubsub.v1.IValidateSchemaResponse): google.pubsub.v1.ValidateSchemaResponse; - - /** - * Encodes the specified ValidateSchemaResponse message. Does not implicitly {@link google.pubsub.v1.ValidateSchemaResponse.verify|verify} messages. - * @param message ValidateSchemaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IValidateSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidateSchemaResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ValidateSchemaResponse.verify|verify} messages. - * @param message ValidateSchemaResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IValidateSchemaResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidateSchemaResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidateSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ValidateSchemaResponse; - - /** - * Decodes a ValidateSchemaResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidateSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ValidateSchemaResponse; - - /** - * Verifies a ValidateSchemaResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidateSchemaResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidateSchemaResponse - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ValidateSchemaResponse; - - /** - * Creates a plain object from a ValidateSchemaResponse message. Also converts values to other types if specified. - * @param message ValidateSchemaResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ValidateSchemaResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidateSchemaResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ValidateSchemaResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ValidateMessageRequest. */ - interface IValidateMessageRequest { - - /** ValidateMessageRequest parent */ - parent?: (string|null); - - /** ValidateMessageRequest name */ - name?: (string|null); - - /** ValidateMessageRequest schema */ - schema?: (google.pubsub.v1.ISchema|null); - - /** ValidateMessageRequest message */ - message?: (Uint8Array|Buffer|string|null); - - /** ValidateMessageRequest encoding */ - encoding?: (google.pubsub.v1.Encoding|keyof typeof google.pubsub.v1.Encoding|null); - } - - /** Represents a ValidateMessageRequest. */ - class ValidateMessageRequest implements IValidateMessageRequest { - - /** - * Constructs a new ValidateMessageRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IValidateMessageRequest); - - /** ValidateMessageRequest parent. */ - public parent: string; - - /** ValidateMessageRequest name. */ - public name?: (string|null); - - /** ValidateMessageRequest schema. */ - public schema?: (google.pubsub.v1.ISchema|null); - - /** ValidateMessageRequest message. */ - public message: (Uint8Array|Buffer|string); - - /** ValidateMessageRequest encoding. */ - public encoding: (google.pubsub.v1.Encoding|keyof typeof google.pubsub.v1.Encoding); - - /** ValidateMessageRequest schemaSpec. */ - public schemaSpec?: ("name"|"schema"); - - /** - * Creates a new ValidateMessageRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidateMessageRequest instance - */ - public static create(properties?: google.pubsub.v1.IValidateMessageRequest): google.pubsub.v1.ValidateMessageRequest; - - /** - * Encodes the specified ValidateMessageRequest message. Does not implicitly {@link google.pubsub.v1.ValidateMessageRequest.verify|verify} messages. - * @param message ValidateMessageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IValidateMessageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidateMessageRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ValidateMessageRequest.verify|verify} messages. - * @param message ValidateMessageRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IValidateMessageRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidateMessageRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidateMessageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ValidateMessageRequest; - - /** - * Decodes a ValidateMessageRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidateMessageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ValidateMessageRequest; - - /** - * Verifies a ValidateMessageRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidateMessageRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidateMessageRequest - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ValidateMessageRequest; - - /** - * Creates a plain object from a ValidateMessageRequest message. Also converts values to other types if specified. - * @param message ValidateMessageRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ValidateMessageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidateMessageRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ValidateMessageRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ValidateMessageResponse. */ - interface IValidateMessageResponse { - } - - /** Represents a ValidateMessageResponse. */ - class ValidateMessageResponse implements IValidateMessageResponse { - - /** - * Constructs a new ValidateMessageResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.pubsub.v1.IValidateMessageResponse); - - /** - * Creates a new ValidateMessageResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ValidateMessageResponse instance - */ - public static create(properties?: google.pubsub.v1.IValidateMessageResponse): google.pubsub.v1.ValidateMessageResponse; - - /** - * Encodes the specified ValidateMessageResponse message. Does not implicitly {@link google.pubsub.v1.ValidateMessageResponse.verify|verify} messages. - * @param message ValidateMessageResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.pubsub.v1.IValidateMessageResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ValidateMessageResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ValidateMessageResponse.verify|verify} messages. - * @param message ValidateMessageResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.pubsub.v1.IValidateMessageResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ValidateMessageResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ValidateMessageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.ValidateMessageResponse; - - /** - * Decodes a ValidateMessageResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ValidateMessageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.ValidateMessageResponse; - - /** - * Verifies a ValidateMessageResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ValidateMessageResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ValidateMessageResponse - */ - public static fromObject(object: { [k: string]: any }): google.pubsub.v1.ValidateMessageResponse; - - /** - * Creates a plain object from a ValidateMessageResponse message. Also converts values to other types if specified. - * @param message ValidateMessageResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.pubsub.v1.ValidateMessageResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ValidateMessageResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ValidateMessageResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Encoding enum. */ - enum Encoding { - ENCODING_UNSPECIFIED = 0, - JSON = 1, - BINARY = 2 - } - } - } - - /** Namespace api. */ - namespace api { - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; - - /** - * Verifies a Http message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * 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.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * 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 HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule responseBody */ - responseBody?: (string|null); - - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; - - /** - * Verifies a HttpRule message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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 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.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * 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 CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * 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.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * 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; - } - - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { - - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); - - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); - - /** CommonLanguageSettings selectiveGapicGeneration */ - selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); - } - - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { - - /** - * Constructs a new CommonLanguageSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICommonLanguageSettings); - - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; - - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; - - /** CommonLanguageSettings selectiveGapicGeneration. */ - public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CommonLanguageSettings instance - */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; - - /** - * Verifies a CommonLanguageSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommonLanguageSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommonLanguageSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { - - /** ClientLibrarySettings version */ - version?: (string|null); - - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); - - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|null); - } - - /** Represents a ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { - - /** - * Constructs a new ClientLibrarySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IClientLibrarySettings); - - /** ClientLibrarySettings version. */ - public version: string; - - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; - - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|null); - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientLibrarySettings instance - */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; - - /** - * Verifies a ClientLibrarySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientLibrarySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientLibrarySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Publishing. */ - interface IPublishing { - - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); - - /** Publishing newIssueUri */ - newIssueUri?: (string|null); - - /** Publishing documentationUri */ - documentationUri?: (string|null); - - /** Publishing apiShortName */ - apiShortName?: (string|null); - - /** Publishing githubLabel */ - githubLabel?: (string|null); - - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); - - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); - - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); - - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); - - /** Publishing restReferenceDocumentationUri */ - restReferenceDocumentationUri?: (string|null); - } - - /** Represents a Publishing. */ - class Publishing implements IPublishing { - - /** - * Constructs a new Publishing. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPublishing); - - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; - - /** Publishing newIssueUri. */ - public newIssueUri: string; - - /** Publishing documentationUri. */ - public documentationUri: string; - - /** Publishing apiShortName. */ - public apiShortName: string; - - /** Publishing githubLabel. */ - public githubLabel: string; - - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; - - /** Publishing docTagPrefix. */ - public docTagPrefix: string; - - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; - - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; - - /** Publishing restReferenceDocumentationUri. */ - public restReferenceDocumentationUri: string; - - /** - * Creates a new Publishing instance using the specified properties. - * @param [properties] Properties to set - * @returns Publishing instance - */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; - - /** - * Verifies a Publishing message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Publishing - */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Publishing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Publishing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JavaSettings. */ - interface IJavaSettings { - - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); - - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); - - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { - - /** - * Constructs a new JavaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJavaSettings); - - /** JavaSettings libraryPackage. */ - public libraryPackage: string; - - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; - - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new JavaSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns JavaSettings instance - */ - public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; - - /** - * Verifies a JavaSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JavaSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @param message JavaSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JavaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JavaSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CppSettings. */ - interface ICppSettings { - - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { - - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); - - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new CppSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CppSettings instance - */ - public static create(properties?: google.api.ICppSettings): google.api.CppSettings; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; - - /** - * Verifies a CppSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CppSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CppSettings; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @param message CppSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CppSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CppSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PhpSettings. */ - interface IPhpSettings { - - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PhpSettings. */ - class PhpSettings implements IPhpSettings { - - /** - * Constructs a new PhpSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPhpSettings); - - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PhpSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PhpSettings instance - */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; - - /** - * Verifies a PhpSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhpSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhpSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PhpSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PythonSettings. */ - interface IPythonSettings { - - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** PythonSettings experimentalFeatures */ - experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); - } - - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { - - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); - - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** PythonSettings experimentalFeatures. */ - public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); - - /** - * Creates a new PythonSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonSettings instance - */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; - - /** - * Verifies a PythonSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PythonSettings { - - /** Properties of an ExperimentalFeatures. */ - interface IExperimentalFeatures { - - /** ExperimentalFeatures restAsyncIoEnabled */ - restAsyncIoEnabled?: (boolean|null); - - /** ExperimentalFeatures protobufPythonicTypesEnabled */ - protobufPythonicTypesEnabled?: (boolean|null); - - /** ExperimentalFeatures unversionedPackageDisabled */ - unversionedPackageDisabled?: (boolean|null); - } - - /** Represents an ExperimentalFeatures. */ - class ExperimentalFeatures implements IExperimentalFeatures { - - /** - * Constructs a new ExperimentalFeatures. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); - - /** ExperimentalFeatures restAsyncIoEnabled. */ - public restAsyncIoEnabled: boolean; - - /** ExperimentalFeatures protobufPythonicTypesEnabled. */ - public protobufPythonicTypesEnabled: boolean; - - /** ExperimentalFeatures unversionedPackageDisabled. */ - public unversionedPackageDisabled: boolean; - - /** - * Creates a new ExperimentalFeatures instance using the specified properties. - * @param [properties] Properties to set - * @returns ExperimentalFeatures instance - */ - public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; - - /** - * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. - * @param message ExperimentalFeatures message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. - * @param message ExperimentalFeatures message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExperimentalFeatures message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExperimentalFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings.ExperimentalFeatures; - - /** - * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExperimentalFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings.ExperimentalFeatures; - - /** - * Verifies an ExperimentalFeatures message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExperimentalFeatures - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; - - /** - * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. - * @param message ExperimentalFeatures - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExperimentalFeatures to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExperimentalFeatures - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a NodeSettings. */ - interface INodeSettings { - - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { - - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); - - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new NodeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeSettings instance - */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; - - /** - * Verifies a NodeSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); - - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); - - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); - - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); - } - - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { - - /** - * Constructs a new DotnetSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDotnetSettings); - - /** DotnetSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** DotnetSettings renamedResources. */ - public renamedResources: { [k: string]: string }; - - /** DotnetSettings ignoredResources. */ - public ignoredResources: string[]; - - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; - - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns DotnetSettings instance - */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; - - /** - * Verifies a DotnetSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DotnetSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DotnetSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DotnetSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RubySettings. */ - interface IRubySettings { - - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { - - /** - * Constructs a new RubySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IRubySettings); - - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new RubySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns RubySettings instance - */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; - - /** - * Verifies a RubySettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RubySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RubySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RubySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GoSettings. */ - interface IGoSettings { - - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** GoSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - } - - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { - - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); - - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** GoSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** - * Creates a new GoSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GoSettings instance - */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; - - /** - * Verifies a GoSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); - - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); - } - - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { - - /** - * Constructs a new MethodSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMethodSettings); - - /** MethodSettings selector. */ - public selector: string; - - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodSettings instance - */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; - - /** - * Verifies a MethodSettings message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodSettings { - - /** Properties of a LongRunning. */ - interface ILongRunning { - - /** LongRunning initialPollDelay */ - initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier */ - pollDelayMultiplier?: (number|null); - - /** LongRunning maxPollDelay */ - maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a LongRunning. */ - class LongRunning implements ILongRunning { - - /** - * Constructs a new LongRunning. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MethodSettings.ILongRunning); - - /** LongRunning initialPollDelay. */ - public initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; - - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new LongRunning instance using the specified properties. - * @param [properties] Properties to set - * @returns LongRunning instance - */ - public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; - - /** - * Verifies a LongRunning message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LongRunning - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @param message LongRunning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LongRunning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** ClientLibraryOrganization enum. */ - enum ClientLibraryOrganization { - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, - CLOUD = 1, - ADS = 2, - PHOTOS = 3, - STREET_VIEW = 4, - SHOPPING = 5, - GEO = 6, - GENERATIVE_AI = 7 - } - - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } - - /** Properties of a SelectiveGapicGeneration. */ - interface ISelectiveGapicGeneration { - - /** SelectiveGapicGeneration methods */ - methods?: (string[]|null); - - /** SelectiveGapicGeneration generateOmittedAsInternal */ - generateOmittedAsInternal?: (boolean|null); - } - - /** Represents a SelectiveGapicGeneration. */ - class SelectiveGapicGeneration implements ISelectiveGapicGeneration { - - /** - * Constructs a new SelectiveGapicGeneration. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ISelectiveGapicGeneration); - - /** SelectiveGapicGeneration methods. */ - public methods: string[]; - - /** SelectiveGapicGeneration generateOmittedAsInternal. */ - public generateOmittedAsInternal: boolean; - - /** - * Creates a new SelectiveGapicGeneration instance using the specified properties. - * @param [properties] Properties to set - * @returns SelectiveGapicGeneration instance - */ - public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; - - /** - * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. - * @param message SelectiveGapicGeneration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. - * @param message SelectiveGapicGeneration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SelectiveGapicGeneration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.SelectiveGapicGeneration; - - /** - * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SelectiveGapicGeneration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.SelectiveGapicGeneration; - - /** - * Verifies a SelectiveGapicGeneration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SelectiveGapicGeneration - */ - public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; - - /** - * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. - * @param message SelectiveGapicGeneration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SelectiveGapicGeneration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SelectiveGapicGeneration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof 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 ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * 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.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * 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 ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - - /** - * Verifies a ResourceReference message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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; - - /** - * 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 }; - - /** - * 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; - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|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; - - /** - * 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 }; - - /** - * 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; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_LEGACY = 900, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** 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 optionDependency */ - optionDependency?: (string[]|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?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @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 optionDependency. */ - public optionDependency: string[]; - - /** 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: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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; - - /** - * 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 }; - - /** - * 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; - } - - /** 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); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - - /** DescriptorProto visibility */ - visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @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[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** DescriptorProto visibility. */ - public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (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; - - /** - * 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 }; - - /** - * 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 DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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 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 }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** 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 new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|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; - - /** - * 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); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|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[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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; - - /** - * 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 }; - - /** - * 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 ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Verifies a Declaration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof 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 a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof 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; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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; - - /** - * 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 }; - - /** - * 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 FieldDescriptorProto { - - /** Type enum. */ - enum Type { - 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 enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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 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 }; - - /** - * 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 EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|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); - - /** EnumDescriptorProto visibility */ - visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** 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[]; - - /** EnumDescriptorProto visibility. */ - public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|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; - - /** - * 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 a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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; - } - } - - /** 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 EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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 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 }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (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; - - /** - * 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 }; - - /** - * 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 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); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @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; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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 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 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 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); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @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; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; - - /** - * Verifies a FileOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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; - - /** - * 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 }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - 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; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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; - - /** - * 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 }; - - /** - * 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 FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions featureSupport */ - featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|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 FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof 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 debugRedact. */ - public debugRedact: boolean; - - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; - - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; - - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions featureSupport. */ - public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; - - /** - * Verifies a FieldOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - - /** OptionRetention enum. */ - enum OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2 - } - - /** OptionTargetType enum. */ - enum OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9 - } - - /** Properties of an EditionDefault. */ - interface IEditionDefault { - - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** EditionDefault value */ - value?: (string|null); - } - - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { - - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** EditionDefault value. */ - public value: string; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns EditionDefault instance - */ - public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; - - /** - * Verifies an EditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @param message EditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FeatureSupport. */ - interface IFeatureSupport { - - /** FeatureSupport editionIntroduced */ - editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSupport editionDeprecated */ - editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSupport deprecationWarning */ - deprecationWarning?: (string|null); - - /** FeatureSupport editionRemoved */ - editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FeatureSupport. */ - class FeatureSupport implements IFeatureSupport { - - /** - * Constructs a new FeatureSupport. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); - - /** FeatureSupport editionIntroduced. */ - public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSupport editionDeprecated. */ - public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSupport deprecationWarning. */ - public deprecationWarning: string; - - /** FeatureSupport editionRemoved. */ - public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FeatureSupport instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSupport instance - */ - public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; - - /** - * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. - * @param message FeatureSupport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. - * @param message FeatureSupport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSupport message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSupport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.FeatureSupport; - - /** - * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSupport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.FeatureSupport; - - /** - * Verifies a FeatureSupport message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSupport - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; - - /** - * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. - * @param message FeatureSupport - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSupport to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSupport - * @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 { - - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** OneofOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; - - /** - * Verifies an OneofOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (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; - - /** - * 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 }; - - /** - * 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 EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; - - /** - * Verifies an EnumOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|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; - - /** - * 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 }; - - /** - * 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 an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact */ - debugRedact?: (boolean|null); - - /** EnumValueOptions featureSupport */ - featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); - - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** EnumValueOptions deprecated. */ - public deprecated: boolean; - - /** EnumValueOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact. */ - public debugRedact: boolean; - - /** EnumValueOptions featureSupport. */ - public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; - - /** - * Verifies an EnumValueOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (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; - - /** - * 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 }; - - /** - * 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 ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions features */ - features?: (google.protobuf.IFeatureSet|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); - - /** ServiceOptions .google.api.apiVersion */ - ".google.api.apiVersion"?: (string|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; - - /** - * Verifies a ServiceOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (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; - - /** - * 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 }; - - /** - * 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 MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions features */ - features?: (google.protobuf.IFeatureSet|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); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - - /** MethodOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; - - /** - * Verifies a MethodOptions message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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; - - /** - * 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 }; - - /** - * 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; - } - - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|Buffer|string|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|Buffer|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|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; - - /** - * 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 }; - - /** - * 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; - } - - 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 new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (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; - - /** - * 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 FeatureSet. */ - interface IFeatureSet { - - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); - - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); - - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); - - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); - - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - - /** FeatureSet enforceNamingStyle */ - enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); - - /** FeatureSet defaultSymbolVisibility */ - defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null); - } - - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { - - /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSet); - - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); - - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); - - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); - - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); - - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); - - /** FeatureSet enforceNamingStyle. */ - public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); - - /** FeatureSet defaultSymbolVisibility. */ - public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); - - /** - * Creates a new FeatureSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSet instance - */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; - - /** - * Verifies a FeatureSet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSet { - - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } - - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } - - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } - - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } - - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } - - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - - /** EnforceNamingStyle enum. */ - enum EnforceNamingStyle { - ENFORCE_NAMING_STYLE_UNKNOWN = 0, - STYLE2024 = 1, - STYLE_LEGACY = 2 - } - - /** Properties of a VisibilityFeature. */ - interface IVisibilityFeature { - } - - /** Represents a VisibilityFeature. */ - class VisibilityFeature implements IVisibilityFeature { - - /** - * Constructs a new VisibilityFeature. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); - - /** - * Creates a new VisibilityFeature instance using the specified properties. - * @param [properties] Properties to set - * @returns VisibilityFeature instance - */ - public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; - - /** - * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. - * @param message VisibilityFeature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. - * @param message VisibilityFeature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VisibilityFeature message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VisibilityFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet.VisibilityFeature; - - /** - * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VisibilityFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet.VisibilityFeature; - - /** - * Verifies a VisibilityFeature message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VisibilityFeature - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; - - /** - * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. - * @param message VisibilityFeature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VisibilityFeature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VisibilityFeature - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace VisibilityFeature { - - /** DefaultSymbolVisibility enum. */ - enum DefaultSymbolVisibility { - DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, - EXPORT_ALL = 1, - EXPORT_TOP_LEVEL = 2, - LOCAL_ALL = 3, - STRICT = 4 - } - } - } - - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { - - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { - - /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); - - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetDefaults instance - */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; - - /** - * Verifies a FeatureSetDefaults message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetDefaults - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSetDefaults { - - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { - - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetEditionDefault overridableFeatures */ - overridableFeatures?: (google.protobuf.IFeatureSet|null); - - /** FeatureSetEditionDefault fixedFeatures */ - fixedFeatures?: (google.protobuf.IFeatureSet|null); - } - - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetEditionDefault overridableFeatures. */ - public overridableFeatures?: (google.protobuf.IFeatureSet|null); - - /** FeatureSetEditionDefault fixedFeatures. */ - public fixedFeatures?: (google.protobuf.IFeatureSet|null); - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance - */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Verifies a FeatureSetEditionDefault message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetEditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @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 { - - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (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; - - /** - * 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 }; - - /** - * 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; - } - - 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[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|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 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 GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|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; - - /** - * 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 }; - - /** - * 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 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); - - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof 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|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Verifies an Annotation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|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; - - /** - * 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. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } - - /** SymbolVisibility enum. */ - enum SymbolVisibility { - VISIBILITY_UNSET = 0, - VISIBILITY_LOCAL = 1, - VISIBILITY_EXPORT = 2 - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|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|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; - - /** - * Verifies a Duration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; - - /** - * Verifies an Empty message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (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; - - /** - * 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 }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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; - } - - /** Properties of a FieldMask. */ - interface IFieldMask { - - /** FieldMask paths */ - paths?: (string[]|null); - } - - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { - - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; - - /** - * Creates a new FieldMask instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldMask instance - */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; - - /** - * Verifies a FieldMask message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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; - - /** - * 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 }; - - /** - * Converts this FieldMask to JSON. - * @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 Struct. */ - interface IStruct { - - /** Struct fields */ - fields?: ({ [k: string]: google.protobuf.IValue }|null); - } - - /** Represents a Struct. */ - class Struct implements IStruct { - - /** - * Constructs a new Struct. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IStruct); - - /** Struct fields. */ - public fields: { [k: string]: google.protobuf.IValue }; - - /** - * Creates a new Struct instance using the specified properties. - * @param [properties] Properties to set - * @returns Struct instance - */ - public static create(properties?: google.protobuf.IStruct): google.protobuf.Struct; - - /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @param message Struct message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IStruct, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Struct message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Struct; - - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Struct; - - /** - * Verifies a Struct message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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; - - /** - * 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 }; - - /** - * Converts this Struct to JSON. - * @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. */ - interface IValue { - - /** Value nullValue */ - nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue */ - numberValue?: (number|null); - - /** Value stringValue */ - stringValue?: (string|null); - - /** Value boolValue */ - boolValue?: (boolean|null); - - /** Value structValue */ - structValue?: (google.protobuf.IStruct|null); - - /** Value listValue */ - listValue?: (google.protobuf.IListValue|null); - } - - /** Represents a Value. */ - class Value implements IValue { - - /** - * Constructs a new Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IValue); - - /** Value nullValue. */ - public nullValue?: (google.protobuf.NullValue|keyof typeof google.protobuf.NullValue|null); - - /** Value numberValue. */ - public numberValue?: (number|null); - - /** Value stringValue. */ - public stringValue?: (string|null); - - /** Value boolValue. */ - public boolValue?: (boolean|null); - - /** Value structValue. */ - public structValue?: (google.protobuf.IStruct|null); - - /** Value listValue. */ - public listValue?: (google.protobuf.IListValue|null); - - /** Value kind. */ - public kind?: ("nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"); - - /** - * Creates a new Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Value instance - */ - public static create(properties?: google.protobuf.IValue): google.protobuf.Value; - - /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Value; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Value; - - /** - * Verifies a Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|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; - - /** - * 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 }; - - /** - * 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; - } - - /** NullValue enum. */ - enum NullValue { - NULL_VALUE = 0 - } - - /** Properties of a ListValue. */ - interface IListValue { - - /** ListValue values */ - values?: (google.protobuf.IValue[]|null); - } - - /** Represents a ListValue. */ - class ListValue implements IListValue { - - /** - * Constructs a new ListValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IListValue); - - /** ListValue values. */ - public values: google.protobuf.IValue[]; - - /** - * Creates a new ListValue instance using the specified properties. - * @param [properties] Properties to set - * @returns ListValue instance - */ - public static create(properties?: google.protobuf.IListValue): google.protobuf.ListValue; - - /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @param message ListValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IListValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ListValue; - - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ListValue; - - /** - * Verifies a ListValue message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (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; - - /** - * 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 }; - - /** - * 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; - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; - - /** - * Verifies a Timestamp message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * 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; - - /** - * 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 }; - - /** - * Converts this Timestamp to JSON. - * @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; - } - } -} +export * from '@google-cloud/pubsub-api/build/protos/protos'; diff --git a/handwritten/pubsub/protos/protos.js b/handwritten/pubsub/protos/protos.js index 45619bf22448..d4f8451eca64 100644 --- a/handwritten/pubsub/protos/protos.js +++ b/handwritten/pubsub/protos/protos.js @@ -4,7 +4,7 @@ // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, @@ -12,52829 +12,4 @@ // See the License for the specific language governing permissions and // limitations under the License. -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -(function(global, factory) { /* global define, require, module */ - - /* AMD */ if (typeof define === 'function' && define.amd) - define(["protobufjs/minimal"], factory); - - /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); - -})(this, function($protobuf) { - "use strict"; - - // Common aliases - var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - - // Exported root namespace - var $root = $protobuf.roots["_google_cloud_pubsub_protos"] || ($protobuf.roots["_google_cloud_pubsub_protos"] = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.pubsub = (function() { - - /** - * Namespace pubsub. - * @memberof google - * @namespace - */ - var pubsub = {}; - - pubsub.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.pubsub - * @namespace - */ - var v1 = {}; - - v1.Publisher = (function() { - - /** - * Constructs a new Publisher service. - * @memberof google.pubsub.v1 - * @classdesc Represents a Publisher - * @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 Publisher(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Publisher.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Publisher; - - /** - * Creates new Publisher service using the specified rpc implementation. - * @function create - * @memberof google.pubsub.v1.Publisher - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Publisher} RPC service. Useful where requests and/or responses are streamed. - */ - Publisher.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|createTopic}. - * @memberof google.pubsub.v1.Publisher - * @typedef CreateTopicCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.Topic} [response] Topic - */ - - /** - * Calls CreateTopic. - * @function createTopic - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.ITopic} request Topic message or plain object - * @param {google.pubsub.v1.Publisher.CreateTopicCallback} callback Node-style callback called with the error, if any, and Topic - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Publisher.prototype.createTopic = function createTopic(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, createTopic, $root.google.pubsub.v1.Topic, $root.google.pubsub.v1.Topic, request, callback); - }, "name", { value: "CreateTopic" }); - - /** - * Calls CreateTopic. - * @function createTopic - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.ITopic} request Topic message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|updateTopic}. - * @memberof google.pubsub.v1.Publisher - * @typedef UpdateTopicCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.Topic} [response] Topic - */ - - /** - * Calls UpdateTopic. - * @function updateTopic - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.IUpdateTopicRequest} request UpdateTopicRequest message or plain object - * @param {google.pubsub.v1.Publisher.UpdateTopicCallback} callback Node-style callback called with the error, if any, and Topic - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Publisher.prototype.updateTopic = function updateTopic(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateTopic, $root.google.pubsub.v1.UpdateTopicRequest, $root.google.pubsub.v1.Topic, request, callback); - }, "name", { value: "UpdateTopic" }); - - /** - * Calls UpdateTopic. - * @function updateTopic - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.IUpdateTopicRequest} request UpdateTopicRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|publish}. - * @memberof google.pubsub.v1.Publisher - * @typedef PublishCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.PublishResponse} [response] PublishResponse - */ - - /** - * Calls Publish. - * @function publish - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.IPublishRequest} request PublishRequest message or plain object - * @param {google.pubsub.v1.Publisher.PublishCallback} callback Node-style callback called with the error, if any, and PublishResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Publisher.prototype.publish = function publish(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, publish, $root.google.pubsub.v1.PublishRequest, $root.google.pubsub.v1.PublishResponse, request, callback); - }, "name", { value: "Publish" }); - - /** - * Calls Publish. - * @function publish - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.IPublishRequest} request PublishRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|getTopic}. - * @memberof google.pubsub.v1.Publisher - * @typedef GetTopicCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.Topic} [response] Topic - */ - - /** - * Calls GetTopic. - * @function getTopic - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.IGetTopicRequest} request GetTopicRequest message or plain object - * @param {google.pubsub.v1.Publisher.GetTopicCallback} callback Node-style callback called with the error, if any, and Topic - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Publisher.prototype.getTopic = function getTopic(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, getTopic, $root.google.pubsub.v1.GetTopicRequest, $root.google.pubsub.v1.Topic, request, callback); - }, "name", { value: "GetTopic" }); - - /** - * Calls GetTopic. - * @function getTopic - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.IGetTopicRequest} request GetTopicRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|listTopics}. - * @memberof google.pubsub.v1.Publisher - * @typedef ListTopicsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.ListTopicsResponse} [response] ListTopicsResponse - */ - - /** - * Calls ListTopics. - * @function listTopics - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.IListTopicsRequest} request ListTopicsRequest message or plain object - * @param {google.pubsub.v1.Publisher.ListTopicsCallback} callback Node-style callback called with the error, if any, and ListTopicsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Publisher.prototype.listTopics = function listTopics(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, listTopics, $root.google.pubsub.v1.ListTopicsRequest, $root.google.pubsub.v1.ListTopicsResponse, request, callback); - }, "name", { value: "ListTopics" }); - - /** - * Calls ListTopics. - * @function listTopics - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.IListTopicsRequest} request ListTopicsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|listTopicSubscriptions}. - * @memberof google.pubsub.v1.Publisher - * @typedef ListTopicSubscriptionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.ListTopicSubscriptionsResponse} [response] ListTopicSubscriptionsResponse - */ - - /** - * Calls ListTopicSubscriptions. - * @function listTopicSubscriptions - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.IListTopicSubscriptionsRequest} request ListTopicSubscriptionsRequest message or plain object - * @param {google.pubsub.v1.Publisher.ListTopicSubscriptionsCallback} callback Node-style callback called with the error, if any, and ListTopicSubscriptionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Publisher.prototype.listTopicSubscriptions = function listTopicSubscriptions(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, listTopicSubscriptions, $root.google.pubsub.v1.ListTopicSubscriptionsRequest, $root.google.pubsub.v1.ListTopicSubscriptionsResponse, request, callback); - }, "name", { value: "ListTopicSubscriptions" }); - - /** - * Calls ListTopicSubscriptions. - * @function listTopicSubscriptions - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.IListTopicSubscriptionsRequest} request ListTopicSubscriptionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|listTopicSnapshots}. - * @memberof google.pubsub.v1.Publisher - * @typedef ListTopicSnapshotsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.ListTopicSnapshotsResponse} [response] ListTopicSnapshotsResponse - */ - - /** - * Calls ListTopicSnapshots. - * @function listTopicSnapshots - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.IListTopicSnapshotsRequest} request ListTopicSnapshotsRequest message or plain object - * @param {google.pubsub.v1.Publisher.ListTopicSnapshotsCallback} callback Node-style callback called with the error, if any, and ListTopicSnapshotsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Publisher.prototype.listTopicSnapshots = function listTopicSnapshots(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, listTopicSnapshots, $root.google.pubsub.v1.ListTopicSnapshotsRequest, $root.google.pubsub.v1.ListTopicSnapshotsResponse, request, callback); - }, "name", { value: "ListTopicSnapshots" }); - - /** - * Calls ListTopicSnapshots. - * @function listTopicSnapshots - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.IListTopicSnapshotsRequest} request ListTopicSnapshotsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|deleteTopic}. - * @memberof google.pubsub.v1.Publisher - * @typedef DeleteTopicCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteTopic. - * @function deleteTopic - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.IDeleteTopicRequest} request DeleteTopicRequest message or plain object - * @param {google.pubsub.v1.Publisher.DeleteTopicCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Publisher.prototype.deleteTopic = function deleteTopic(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteTopic, $root.google.pubsub.v1.DeleteTopicRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteTopic" }); - - /** - * Calls DeleteTopic. - * @function deleteTopic - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.IDeleteTopicRequest} request DeleteTopicRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Publisher|detachSubscription}. - * @memberof google.pubsub.v1.Publisher - * @typedef DetachSubscriptionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.DetachSubscriptionResponse} [response] DetachSubscriptionResponse - */ - - /** - * Calls DetachSubscription. - * @function detachSubscription - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.IDetachSubscriptionRequest} request DetachSubscriptionRequest message or plain object - * @param {google.pubsub.v1.Publisher.DetachSubscriptionCallback} callback Node-style callback called with the error, if any, and DetachSubscriptionResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Publisher.prototype.detachSubscription = function detachSubscription(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, detachSubscription, $root.google.pubsub.v1.DetachSubscriptionRequest, $root.google.pubsub.v1.DetachSubscriptionResponse, request, callback); - }, "name", { value: "DetachSubscription" }); - - /** - * Calls DetachSubscription. - * @function detachSubscription - * @memberof google.pubsub.v1.Publisher - * @instance - * @param {google.pubsub.v1.IDetachSubscriptionRequest} request DetachSubscriptionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Publisher; - })(); - - v1.MessageStoragePolicy = (function() { - - /** - * Properties of a MessageStoragePolicy. - * @memberof google.pubsub.v1 - * @interface IMessageStoragePolicy - * @property {Array.|null} [allowedPersistenceRegions] MessageStoragePolicy allowedPersistenceRegions - * @property {boolean|null} [enforceInTransit] MessageStoragePolicy enforceInTransit - */ - - /** - * Constructs a new MessageStoragePolicy. - * @memberof google.pubsub.v1 - * @classdesc Represents a MessageStoragePolicy. - * @implements IMessageStoragePolicy - * @constructor - * @param {google.pubsub.v1.IMessageStoragePolicy=} [properties] Properties to set - */ - function MessageStoragePolicy(properties) { - this.allowedPersistenceRegions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageStoragePolicy allowedPersistenceRegions. - * @member {Array.} allowedPersistenceRegions - * @memberof google.pubsub.v1.MessageStoragePolicy - * @instance - */ - MessageStoragePolicy.prototype.allowedPersistenceRegions = $util.emptyArray; - - /** - * MessageStoragePolicy enforceInTransit. - * @member {boolean} enforceInTransit - * @memberof google.pubsub.v1.MessageStoragePolicy - * @instance - */ - MessageStoragePolicy.prototype.enforceInTransit = false; - - /** - * Creates a new MessageStoragePolicy instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.MessageStoragePolicy - * @static - * @param {google.pubsub.v1.IMessageStoragePolicy=} [properties] Properties to set - * @returns {google.pubsub.v1.MessageStoragePolicy} MessageStoragePolicy instance - */ - MessageStoragePolicy.create = function create(properties) { - return new MessageStoragePolicy(properties); - }; - - /** - * Encodes the specified MessageStoragePolicy message. Does not implicitly {@link google.pubsub.v1.MessageStoragePolicy.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.MessageStoragePolicy - * @static - * @param {google.pubsub.v1.IMessageStoragePolicy} message MessageStoragePolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageStoragePolicy.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.allowedPersistenceRegions != null && message.allowedPersistenceRegions.length) - for (var i = 0; i < message.allowedPersistenceRegions.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.allowedPersistenceRegions[i]); - if (message.enforceInTransit != null && Object.hasOwnProperty.call(message, "enforceInTransit")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enforceInTransit); - return writer; - }; - - /** - * Encodes the specified MessageStoragePolicy message, length delimited. Does not implicitly {@link google.pubsub.v1.MessageStoragePolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.MessageStoragePolicy - * @static - * @param {google.pubsub.v1.IMessageStoragePolicy} message MessageStoragePolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageStoragePolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a MessageStoragePolicy message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.MessageStoragePolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.MessageStoragePolicy} MessageStoragePolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageStoragePolicy.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.MessageStoragePolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.allowedPersistenceRegions && message.allowedPersistenceRegions.length)) - message.allowedPersistenceRegions = []; - message.allowedPersistenceRegions.push(reader.string()); - break; - } - case 2: { - message.enforceInTransit = reader.bool(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a MessageStoragePolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.MessageStoragePolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.MessageStoragePolicy} MessageStoragePolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageStoragePolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageStoragePolicy message. - * @function verify - * @memberof google.pubsub.v1.MessageStoragePolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageStoragePolicy.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.allowedPersistenceRegions != null && Object.hasOwnProperty.call(message, "allowedPersistenceRegions")) { - if (!Array.isArray(message.allowedPersistenceRegions)) - return "allowedPersistenceRegions: array expected"; - for (var i = 0; i < message.allowedPersistenceRegions.length; ++i) - if (!$util.isString(message.allowedPersistenceRegions[i])) - return "allowedPersistenceRegions: string[] expected"; - } - if (message.enforceInTransit != null && Object.hasOwnProperty.call(message, "enforceInTransit")) - if (typeof message.enforceInTransit !== "boolean") - return "enforceInTransit: boolean expected"; - return null; - }; - - /** - * Creates a MessageStoragePolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.MessageStoragePolicy - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.MessageStoragePolicy} MessageStoragePolicy - */ - MessageStoragePolicy.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.MessageStoragePolicy) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.MessageStoragePolicy: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.MessageStoragePolicy(); - if (object.allowedPersistenceRegions) { - if (!Array.isArray(object.allowedPersistenceRegions)) - throw TypeError(".google.pubsub.v1.MessageStoragePolicy.allowedPersistenceRegions: array expected"); - message.allowedPersistenceRegions = []; - for (var i = 0; i < object.allowedPersistenceRegions.length; ++i) - message.allowedPersistenceRegions[i] = String(object.allowedPersistenceRegions[i]); - } - if (object.enforceInTransit != null) - message.enforceInTransit = Boolean(object.enforceInTransit); - return message; - }; - - /** - * Creates a plain object from a MessageStoragePolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.MessageStoragePolicy - * @static - * @param {google.pubsub.v1.MessageStoragePolicy} message MessageStoragePolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageStoragePolicy.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.allowedPersistenceRegions = []; - if (options.defaults) - object.enforceInTransit = false; - if (message.allowedPersistenceRegions && message.allowedPersistenceRegions.length) { - object.allowedPersistenceRegions = []; - for (var j = 0; j < message.allowedPersistenceRegions.length; ++j) - object.allowedPersistenceRegions[j] = message.allowedPersistenceRegions[j]; - } - if (message.enforceInTransit != null && Object.hasOwnProperty.call(message, "enforceInTransit")) - object.enforceInTransit = message.enforceInTransit; - return object; - }; - - /** - * Converts this MessageStoragePolicy to JSON. - * @function toJSON - * @memberof google.pubsub.v1.MessageStoragePolicy - * @instance - * @returns {Object.} JSON object - */ - MessageStoragePolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageStoragePolicy - * @function getTypeUrl - * @memberof google.pubsub.v1.MessageStoragePolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageStoragePolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.MessageStoragePolicy"; - }; - - return MessageStoragePolicy; - })(); - - v1.SchemaSettings = (function() { - - /** - * Properties of a SchemaSettings. - * @memberof google.pubsub.v1 - * @interface ISchemaSettings - * @property {string|null} [schema] SchemaSettings schema - * @property {google.pubsub.v1.Encoding|null} [encoding] SchemaSettings encoding - * @property {string|null} [firstRevisionId] SchemaSettings firstRevisionId - * @property {string|null} [lastRevisionId] SchemaSettings lastRevisionId - */ - - /** - * Constructs a new SchemaSettings. - * @memberof google.pubsub.v1 - * @classdesc Represents a SchemaSettings. - * @implements ISchemaSettings - * @constructor - * @param {google.pubsub.v1.ISchemaSettings=} [properties] Properties to set - */ - function SchemaSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * SchemaSettings schema. - * @member {string} schema - * @memberof google.pubsub.v1.SchemaSettings - * @instance - */ - SchemaSettings.prototype.schema = ""; - - /** - * SchemaSettings encoding. - * @member {google.pubsub.v1.Encoding} encoding - * @memberof google.pubsub.v1.SchemaSettings - * @instance - */ - SchemaSettings.prototype.encoding = 0; - - /** - * SchemaSettings firstRevisionId. - * @member {string} firstRevisionId - * @memberof google.pubsub.v1.SchemaSettings - * @instance - */ - SchemaSettings.prototype.firstRevisionId = ""; - - /** - * SchemaSettings lastRevisionId. - * @member {string} lastRevisionId - * @memberof google.pubsub.v1.SchemaSettings - * @instance - */ - SchemaSettings.prototype.lastRevisionId = ""; - - /** - * Creates a new SchemaSettings instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.SchemaSettings - * @static - * @param {google.pubsub.v1.ISchemaSettings=} [properties] Properties to set - * @returns {google.pubsub.v1.SchemaSettings} SchemaSettings instance - */ - SchemaSettings.create = function create(properties) { - return new SchemaSettings(properties); - }; - - /** - * Encodes the specified SchemaSettings message. Does not implicitly {@link google.pubsub.v1.SchemaSettings.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.SchemaSettings - * @static - * @param {google.pubsub.v1.ISchemaSettings} message SchemaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaSettings.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.schema); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.encoding); - if (message.firstRevisionId != null && Object.hasOwnProperty.call(message, "firstRevisionId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.firstRevisionId); - if (message.lastRevisionId != null && Object.hasOwnProperty.call(message, "lastRevisionId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.lastRevisionId); - return writer; - }; - - /** - * Encodes the specified SchemaSettings message, length delimited. Does not implicitly {@link google.pubsub.v1.SchemaSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.SchemaSettings - * @static - * @param {google.pubsub.v1.ISchemaSettings} message SchemaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a SchemaSettings message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.SchemaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.SchemaSettings} SchemaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaSettings.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.SchemaSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.schema = reader.string(); - break; - } - case 2: { - message.encoding = reader.int32(); - break; - } - case 3: { - message.firstRevisionId = reader.string(); - break; - } - case 4: { - message.lastRevisionId = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a SchemaSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.SchemaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.SchemaSettings} SchemaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SchemaSettings message. - * @function verify - * @memberof google.pubsub.v1.SchemaSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SchemaSettings.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - switch (message.encoding) { - default: - return "encoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.firstRevisionId != null && Object.hasOwnProperty.call(message, "firstRevisionId")) - if (!$util.isString(message.firstRevisionId)) - return "firstRevisionId: string expected"; - if (message.lastRevisionId != null && Object.hasOwnProperty.call(message, "lastRevisionId")) - if (!$util.isString(message.lastRevisionId)) - return "lastRevisionId: string expected"; - return null; - }; - - /** - * Creates a SchemaSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.SchemaSettings - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.SchemaSettings} SchemaSettings - */ - SchemaSettings.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.SchemaSettings) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.SchemaSettings: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.SchemaSettings(); - if (object.schema != null) - message.schema = String(object.schema); - switch (object.encoding) { - default: - if (typeof object.encoding === "number") { - message.encoding = object.encoding; - break; - } - break; - case "ENCODING_UNSPECIFIED": - case 0: - message.encoding = 0; - break; - case "JSON": - case 1: - message.encoding = 1; - break; - case "BINARY": - case 2: - message.encoding = 2; - break; - } - if (object.firstRevisionId != null) - message.firstRevisionId = String(object.firstRevisionId); - if (object.lastRevisionId != null) - message.lastRevisionId = String(object.lastRevisionId); - return message; - }; - - /** - * Creates a plain object from a SchemaSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.SchemaSettings - * @static - * @param {google.pubsub.v1.SchemaSettings} message SchemaSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SchemaSettings.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.schema = ""; - object.encoding = options.enums === String ? "ENCODING_UNSPECIFIED" : 0; - object.firstRevisionId = ""; - object.lastRevisionId = ""; - } - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - object.schema = message.schema; - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - object.encoding = options.enums === String ? $root.google.pubsub.v1.Encoding[message.encoding] === undefined ? message.encoding : $root.google.pubsub.v1.Encoding[message.encoding] : message.encoding; - if (message.firstRevisionId != null && Object.hasOwnProperty.call(message, "firstRevisionId")) - object.firstRevisionId = message.firstRevisionId; - if (message.lastRevisionId != null && Object.hasOwnProperty.call(message, "lastRevisionId")) - object.lastRevisionId = message.lastRevisionId; - return object; - }; - - /** - * Converts this SchemaSettings to JSON. - * @function toJSON - * @memberof google.pubsub.v1.SchemaSettings - * @instance - * @returns {Object.} JSON object - */ - SchemaSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SchemaSettings - * @function getTypeUrl - * @memberof google.pubsub.v1.SchemaSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SchemaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.SchemaSettings"; - }; - - return SchemaSettings; - })(); - - v1.IngestionDataSourceSettings = (function() { - - /** - * Properties of an IngestionDataSourceSettings. - * @memberof google.pubsub.v1 - * @interface IIngestionDataSourceSettings - * @property {google.pubsub.v1.IngestionDataSourceSettings.IAwsKinesis|null} [awsKinesis] IngestionDataSourceSettings awsKinesis - * @property {google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage|null} [cloudStorage] IngestionDataSourceSettings cloudStorage - * @property {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs|null} [azureEventHubs] IngestionDataSourceSettings azureEventHubs - * @property {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk|null} [awsMsk] IngestionDataSourceSettings awsMsk - * @property {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud|null} [confluentCloud] IngestionDataSourceSettings confluentCloud - * @property {google.pubsub.v1.IPlatformLogsSettings|null} [platformLogsSettings] IngestionDataSourceSettings platformLogsSettings - */ - - /** - * Constructs a new IngestionDataSourceSettings. - * @memberof google.pubsub.v1 - * @classdesc Represents an IngestionDataSourceSettings. - * @implements IIngestionDataSourceSettings - * @constructor - * @param {google.pubsub.v1.IIngestionDataSourceSettings=} [properties] Properties to set - */ - function IngestionDataSourceSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * IngestionDataSourceSettings awsKinesis. - * @member {google.pubsub.v1.IngestionDataSourceSettings.IAwsKinesis|null|undefined} awsKinesis - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @instance - */ - IngestionDataSourceSettings.prototype.awsKinesis = null; - - /** - * IngestionDataSourceSettings cloudStorage. - * @member {google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage|null|undefined} cloudStorage - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @instance - */ - IngestionDataSourceSettings.prototype.cloudStorage = null; - - /** - * IngestionDataSourceSettings azureEventHubs. - * @member {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs|null|undefined} azureEventHubs - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @instance - */ - IngestionDataSourceSettings.prototype.azureEventHubs = null; - - /** - * IngestionDataSourceSettings awsMsk. - * @member {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk|null|undefined} awsMsk - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @instance - */ - IngestionDataSourceSettings.prototype.awsMsk = null; - - /** - * IngestionDataSourceSettings confluentCloud. - * @member {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud|null|undefined} confluentCloud - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @instance - */ - IngestionDataSourceSettings.prototype.confluentCloud = null; - - /** - * IngestionDataSourceSettings platformLogsSettings. - * @member {google.pubsub.v1.IPlatformLogsSettings|null|undefined} platformLogsSettings - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @instance - */ - IngestionDataSourceSettings.prototype.platformLogsSettings = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * IngestionDataSourceSettings source. - * @member {"awsKinesis"|"cloudStorage"|"azureEventHubs"|"awsMsk"|"confluentCloud"|undefined} source - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @instance - */ - Object.defineProperty(IngestionDataSourceSettings.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["awsKinesis", "cloudStorage", "azureEventHubs", "awsMsk", "confluentCloud"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new IngestionDataSourceSettings instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @static - * @param {google.pubsub.v1.IIngestionDataSourceSettings=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionDataSourceSettings} IngestionDataSourceSettings instance - */ - IngestionDataSourceSettings.create = function create(properties) { - return new IngestionDataSourceSettings(properties); - }; - - /** - * Encodes the specified IngestionDataSourceSettings message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @static - * @param {google.pubsub.v1.IIngestionDataSourceSettings} message IngestionDataSourceSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IngestionDataSourceSettings.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.awsKinesis != null && Object.hasOwnProperty.call(message, "awsKinesis")) - $root.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.encode(message.awsKinesis, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.cloudStorage != null && Object.hasOwnProperty.call(message, "cloudStorage")) - $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.encode(message.cloudStorage, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - if (message.azureEventHubs != null && Object.hasOwnProperty.call(message, "azureEventHubs")) - $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.encode(message.azureEventHubs, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); - if (message.platformLogsSettings != null && Object.hasOwnProperty.call(message, "platformLogsSettings")) - $root.google.pubsub.v1.PlatformLogsSettings.encode(message.platformLogsSettings, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); - if (message.awsMsk != null && Object.hasOwnProperty.call(message, "awsMsk")) - $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.encode(message.awsMsk, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); - if (message.confluentCloud != null && Object.hasOwnProperty.call(message, "confluentCloud")) - $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.encode(message.confluentCloud, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified IngestionDataSourceSettings message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @static - * @param {google.pubsub.v1.IIngestionDataSourceSettings} message IngestionDataSourceSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IngestionDataSourceSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an IngestionDataSourceSettings message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionDataSourceSettings} IngestionDataSourceSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IngestionDataSourceSettings.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionDataSourceSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.awsKinesis = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 2: { - message.cloudStorage = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 3: { - message.azureEventHubs = $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 5: { - message.awsMsk = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 6: { - message.confluentCloud = $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 4: { - message.platformLogsSettings = $root.google.pubsub.v1.PlatformLogsSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an IngestionDataSourceSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionDataSourceSettings} IngestionDataSourceSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IngestionDataSourceSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IngestionDataSourceSettings message. - * @function verify - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IngestionDataSourceSettings.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.awsKinesis != null && Object.hasOwnProperty.call(message, "awsKinesis")) { - properties.source = 1; - { - var error = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.verify(message.awsKinesis, long + 1); - if (error) - return "awsKinesis." + error; - } - } - if (message.cloudStorage != null && Object.hasOwnProperty.call(message, "cloudStorage")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.verify(message.cloudStorage, long + 1); - if (error) - return "cloudStorage." + error; - } - } - if (message.azureEventHubs != null && Object.hasOwnProperty.call(message, "azureEventHubs")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.verify(message.azureEventHubs, long + 1); - if (error) - return "azureEventHubs." + error; - } - } - if (message.awsMsk != null && Object.hasOwnProperty.call(message, "awsMsk")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.verify(message.awsMsk, long + 1); - if (error) - return "awsMsk." + error; - } - } - if (message.confluentCloud != null && Object.hasOwnProperty.call(message, "confluentCloud")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - { - var error = $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.verify(message.confluentCloud, long + 1); - if (error) - return "confluentCloud." + error; - } - } - if (message.platformLogsSettings != null && Object.hasOwnProperty.call(message, "platformLogsSettings")) { - var error = $root.google.pubsub.v1.PlatformLogsSettings.verify(message.platformLogsSettings, long + 1); - if (error) - return "platformLogsSettings." + error; - } - return null; - }; - - /** - * Creates an IngestionDataSourceSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionDataSourceSettings} IngestionDataSourceSettings - */ - IngestionDataSourceSettings.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.IngestionDataSourceSettings(); - if (object.awsKinesis != null) { - if (!$util.isObject(object.awsKinesis)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.awsKinesis: object expected"); - message.awsKinesis = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.fromObject(object.awsKinesis, long + 1); - } - if (object.cloudStorage != null) { - if (!$util.isObject(object.cloudStorage)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.cloudStorage: object expected"); - message.cloudStorage = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.fromObject(object.cloudStorage, long + 1); - } - if (object.azureEventHubs != null) { - if (!$util.isObject(object.azureEventHubs)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.azureEventHubs: object expected"); - message.azureEventHubs = $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.fromObject(object.azureEventHubs, long + 1); - } - if (object.awsMsk != null) { - if (!$util.isObject(object.awsMsk)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.awsMsk: object expected"); - message.awsMsk = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.fromObject(object.awsMsk, long + 1); - } - if (object.confluentCloud != null) { - if (!$util.isObject(object.confluentCloud)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.confluentCloud: object expected"); - message.confluentCloud = $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.fromObject(object.confluentCloud, long + 1); - } - if (object.platformLogsSettings != null) { - if (!$util.isObject(object.platformLogsSettings)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.platformLogsSettings: object expected"); - message.platformLogsSettings = $root.google.pubsub.v1.PlatformLogsSettings.fromObject(object.platformLogsSettings, long + 1); - } - return message; - }; - - /** - * Creates a plain object from an IngestionDataSourceSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings} message IngestionDataSourceSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IngestionDataSourceSettings.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.platformLogsSettings = null; - if (message.awsKinesis != null && Object.hasOwnProperty.call(message, "awsKinesis")) { - object.awsKinesis = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.toObject(message.awsKinesis, options, q + 1); - if (options.oneofs) - object.source = "awsKinesis"; - } - if (message.cloudStorage != null && Object.hasOwnProperty.call(message, "cloudStorage")) { - object.cloudStorage = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.toObject(message.cloudStorage, options, q + 1); - if (options.oneofs) - object.source = "cloudStorage"; - } - if (message.azureEventHubs != null && Object.hasOwnProperty.call(message, "azureEventHubs")) { - object.azureEventHubs = $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.toObject(message.azureEventHubs, options, q + 1); - if (options.oneofs) - object.source = "azureEventHubs"; - } - if (message.platformLogsSettings != null && Object.hasOwnProperty.call(message, "platformLogsSettings")) - object.platformLogsSettings = $root.google.pubsub.v1.PlatformLogsSettings.toObject(message.platformLogsSettings, options, q + 1); - if (message.awsMsk != null && Object.hasOwnProperty.call(message, "awsMsk")) { - object.awsMsk = $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.toObject(message.awsMsk, options, q + 1); - if (options.oneofs) - object.source = "awsMsk"; - } - if (message.confluentCloud != null && Object.hasOwnProperty.call(message, "confluentCloud")) { - object.confluentCloud = $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.toObject(message.confluentCloud, options, q + 1); - if (options.oneofs) - object.source = "confluentCloud"; - } - return object; - }; - - /** - * Converts this IngestionDataSourceSettings to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @instance - * @returns {Object.} JSON object - */ - IngestionDataSourceSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IngestionDataSourceSettings - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IngestionDataSourceSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings"; - }; - - IngestionDataSourceSettings.AwsKinesis = (function() { - - /** - * Properties of an AwsKinesis. - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @interface IAwsKinesis - * @property {google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State|null} [state] AwsKinesis state - * @property {string|null} [streamArn] AwsKinesis streamArn - * @property {string|null} [consumerArn] AwsKinesis consumerArn - * @property {string|null} [awsRoleArn] AwsKinesis awsRoleArn - * @property {string|null} [gcpServiceAccount] AwsKinesis gcpServiceAccount - */ - - /** - * Constructs a new AwsKinesis. - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @classdesc Represents an AwsKinesis. - * @implements IAwsKinesis - * @constructor - * @param {google.pubsub.v1.IngestionDataSourceSettings.IAwsKinesis=} [properties] Properties to set - */ - function AwsKinesis(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * AwsKinesis state. - * @member {google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State} state - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis - * @instance - */ - AwsKinesis.prototype.state = 0; - - /** - * AwsKinesis streamArn. - * @member {string} streamArn - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis - * @instance - */ - AwsKinesis.prototype.streamArn = ""; - - /** - * AwsKinesis consumerArn. - * @member {string} consumerArn - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis - * @instance - */ - AwsKinesis.prototype.consumerArn = ""; - - /** - * AwsKinesis awsRoleArn. - * @member {string} awsRoleArn - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis - * @instance - */ - AwsKinesis.prototype.awsRoleArn = ""; - - /** - * AwsKinesis gcpServiceAccount. - * @member {string} gcpServiceAccount - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis - * @instance - */ - AwsKinesis.prototype.gcpServiceAccount = ""; - - /** - * Creates a new AwsKinesis instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.IAwsKinesis=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis} AwsKinesis instance - */ - AwsKinesis.create = function create(properties) { - return new AwsKinesis(properties); - }; - - /** - * Encodes the specified AwsKinesis message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.IAwsKinesis} message AwsKinesis message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AwsKinesis.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.streamArn != null && Object.hasOwnProperty.call(message, "streamArn")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.streamArn); - if (message.consumerArn != null && Object.hasOwnProperty.call(message, "consumerArn")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.consumerArn); - if (message.awsRoleArn != null && Object.hasOwnProperty.call(message, "awsRoleArn")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.awsRoleArn); - if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.gcpServiceAccount); - return writer; - }; - - /** - * Encodes the specified AwsKinesis message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.IAwsKinesis} message AwsKinesis message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AwsKinesis.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an AwsKinesis message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis} AwsKinesis - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AwsKinesis.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.streamArn = reader.string(); - break; - } - case 3: { - message.consumerArn = reader.string(); - break; - } - case 4: { - message.awsRoleArn = reader.string(); - break; - } - case 5: { - message.gcpServiceAccount = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an AwsKinesis message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis} AwsKinesis - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AwsKinesis.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AwsKinesis message. - * @function verify - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AwsKinesis.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.streamArn != null && Object.hasOwnProperty.call(message, "streamArn")) - if (!$util.isString(message.streamArn)) - return "streamArn: string expected"; - if (message.consumerArn != null && Object.hasOwnProperty.call(message, "consumerArn")) - if (!$util.isString(message.consumerArn)) - return "consumerArn: string expected"; - if (message.awsRoleArn != null && Object.hasOwnProperty.call(message, "awsRoleArn")) - if (!$util.isString(message.awsRoleArn)) - return "awsRoleArn: string expected"; - if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount")) - if (!$util.isString(message.gcpServiceAccount)) - return "gcpServiceAccount: string expected"; - return null; - }; - - /** - * Creates an AwsKinesis message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis} AwsKinesis - */ - AwsKinesis.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis(); - 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 "ACTIVE": - case 1: - message.state = 1; - break; - case "KINESIS_PERMISSION_DENIED": - case 2: - message.state = 2; - break; - case "PUBLISH_PERMISSION_DENIED": - case 3: - message.state = 3; - break; - case "STREAM_NOT_FOUND": - case 4: - message.state = 4; - break; - case "CONSUMER_NOT_FOUND": - case 5: - message.state = 5; - break; - } - if (object.streamArn != null) - message.streamArn = String(object.streamArn); - if (object.consumerArn != null) - message.consumerArn = String(object.consumerArn); - if (object.awsRoleArn != null) - message.awsRoleArn = String(object.awsRoleArn); - if (object.gcpServiceAccount != null) - message.gcpServiceAccount = String(object.gcpServiceAccount); - return message; - }; - - /** - * Creates a plain object from an AwsKinesis message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis} message AwsKinesis - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AwsKinesis.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.streamArn = ""; - object.consumerArn = ""; - object.awsRoleArn = ""; - object.gcpServiceAccount = ""; - } - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - object.state = options.enums === String ? $root.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State[message.state] : message.state; - if (message.streamArn != null && Object.hasOwnProperty.call(message, "streamArn")) - object.streamArn = message.streamArn; - if (message.consumerArn != null && Object.hasOwnProperty.call(message, "consumerArn")) - object.consumerArn = message.consumerArn; - if (message.awsRoleArn != null && Object.hasOwnProperty.call(message, "awsRoleArn")) - object.awsRoleArn = message.awsRoleArn; - if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount")) - object.gcpServiceAccount = message.gcpServiceAccount; - return object; - }; - - /** - * Converts this AwsKinesis to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis - * @instance - * @returns {Object.} JSON object - */ - AwsKinesis.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AwsKinesis - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AwsKinesis.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis"; - }; - - /** - * State enum. - * @name google.pubsub.v1.IngestionDataSourceSettings.AwsKinesis.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} KINESIS_PERMISSION_DENIED=2 KINESIS_PERMISSION_DENIED value - * @property {number} PUBLISH_PERMISSION_DENIED=3 PUBLISH_PERMISSION_DENIED value - * @property {number} STREAM_NOT_FOUND=4 STREAM_NOT_FOUND value - * @property {number} CONSUMER_NOT_FOUND=5 CONSUMER_NOT_FOUND value - */ - AwsKinesis.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "KINESIS_PERMISSION_DENIED"] = 2; - values[valuesById[3] = "PUBLISH_PERMISSION_DENIED"] = 3; - values[valuesById[4] = "STREAM_NOT_FOUND"] = 4; - values[valuesById[5] = "CONSUMER_NOT_FOUND"] = 5; - return values; - })(); - - return AwsKinesis; - })(); - - IngestionDataSourceSettings.CloudStorage = (function() { - - /** - * Properties of a CloudStorage. - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @interface ICloudStorage - * @property {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State|null} [state] CloudStorage state - * @property {string|null} [bucket] CloudStorage bucket - * @property {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat|null} [textFormat] CloudStorage textFormat - * @property {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat|null} [avroFormat] CloudStorage avroFormat - * @property {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat|null} [pubsubAvroFormat] CloudStorage pubsubAvroFormat - * @property {google.protobuf.ITimestamp|null} [minimumObjectCreateTime] CloudStorage minimumObjectCreateTime - * @property {string|null} [matchGlob] CloudStorage matchGlob - */ - - /** - * Constructs a new CloudStorage. - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @classdesc Represents a CloudStorage. - * @implements ICloudStorage - * @constructor - * @param {google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage=} [properties] Properties to set - */ - function CloudStorage(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudStorage state. - * @member {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State} state - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @instance - */ - CloudStorage.prototype.state = 0; - - /** - * CloudStorage bucket. - * @member {string} bucket - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @instance - */ - CloudStorage.prototype.bucket = ""; - - /** - * CloudStorage textFormat. - * @member {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat|null|undefined} textFormat - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @instance - */ - CloudStorage.prototype.textFormat = null; - - /** - * CloudStorage avroFormat. - * @member {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat|null|undefined} avroFormat - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @instance - */ - CloudStorage.prototype.avroFormat = null; - - /** - * CloudStorage pubsubAvroFormat. - * @member {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat|null|undefined} pubsubAvroFormat - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @instance - */ - CloudStorage.prototype.pubsubAvroFormat = null; - - /** - * CloudStorage minimumObjectCreateTime. - * @member {google.protobuf.ITimestamp|null|undefined} minimumObjectCreateTime - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @instance - */ - CloudStorage.prototype.minimumObjectCreateTime = null; - - /** - * CloudStorage matchGlob. - * @member {string} matchGlob - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @instance - */ - CloudStorage.prototype.matchGlob = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CloudStorage inputFormat. - * @member {"textFormat"|"avroFormat"|"pubsubAvroFormat"|undefined} inputFormat - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @instance - */ - Object.defineProperty(CloudStorage.prototype, "inputFormat", { - get: $util.oneOfGetter($oneOfFields = ["textFormat", "avroFormat", "pubsubAvroFormat"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CloudStorage instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage} CloudStorage instance - */ - CloudStorage.create = function create(properties) { - return new CloudStorage(properties); - }; - - /** - * Encodes the specified CloudStorage message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage} message CloudStorage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudStorage.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.bucket); - if (message.textFormat != null && Object.hasOwnProperty.call(message, "textFormat")) - $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.encode(message.textFormat, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); - if (message.avroFormat != null && Object.hasOwnProperty.call(message, "avroFormat")) - $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.encode(message.avroFormat, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); - if (message.pubsubAvroFormat != null && Object.hasOwnProperty.call(message, "pubsubAvroFormat")) - $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.encode(message.pubsubAvroFormat, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); - if (message.minimumObjectCreateTime != null && Object.hasOwnProperty.call(message, "minimumObjectCreateTime")) - $root.google.protobuf.Timestamp.encode(message.minimumObjectCreateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); - if (message.matchGlob != null && Object.hasOwnProperty.call(message, "matchGlob")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.matchGlob); - return writer; - }; - - /** - * Encodes the specified CloudStorage message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.ICloudStorage} message CloudStorage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudStorage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a CloudStorage message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage} CloudStorage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudStorage.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.bucket = reader.string(); - break; - } - case 3: { - message.textFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 4: { - message.avroFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 5: { - message.pubsubAvroFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 6: { - message.minimumObjectCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 9: { - message.matchGlob = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a CloudStorage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage} CloudStorage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudStorage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudStorage message. - * @function verify - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudStorage.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - if (!$util.isString(message.bucket)) - return "bucket: string expected"; - if (message.textFormat != null && Object.hasOwnProperty.call(message, "textFormat")) { - properties.inputFormat = 1; - { - var error = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.verify(message.textFormat, long + 1); - if (error) - return "textFormat." + error; - } - } - if (message.avroFormat != null && Object.hasOwnProperty.call(message, "avroFormat")) { - if (properties.inputFormat === 1) - return "inputFormat: multiple values"; - properties.inputFormat = 1; - { - var error = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.verify(message.avroFormat, long + 1); - if (error) - return "avroFormat." + error; - } - } - if (message.pubsubAvroFormat != null && Object.hasOwnProperty.call(message, "pubsubAvroFormat")) { - if (properties.inputFormat === 1) - return "inputFormat: multiple values"; - properties.inputFormat = 1; - { - var error = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.verify(message.pubsubAvroFormat, long + 1); - if (error) - return "pubsubAvroFormat." + error; - } - } - if (message.minimumObjectCreateTime != null && Object.hasOwnProperty.call(message, "minimumObjectCreateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.minimumObjectCreateTime, long + 1); - if (error) - return "minimumObjectCreateTime." + error; - } - if (message.matchGlob != null && Object.hasOwnProperty.call(message, "matchGlob")) - if (!$util.isString(message.matchGlob)) - return "matchGlob: string expected"; - return null; - }; - - /** - * Creates a CloudStorage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage} CloudStorage - */ - CloudStorage.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.CloudStorage: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage(); - 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 "ACTIVE": - case 1: - message.state = 1; - break; - case "CLOUD_STORAGE_PERMISSION_DENIED": - case 2: - message.state = 2; - break; - case "PUBLISH_PERMISSION_DENIED": - case 3: - message.state = 3; - break; - case "BUCKET_NOT_FOUND": - case 4: - message.state = 4; - break; - case "TOO_MANY_OBJECTS": - case 5: - message.state = 5; - break; - } - if (object.bucket != null) - message.bucket = String(object.bucket); - if (object.textFormat != null) { - if (!$util.isObject(object.textFormat)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.textFormat: object expected"); - message.textFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.fromObject(object.textFormat, long + 1); - } - if (object.avroFormat != null) { - if (!$util.isObject(object.avroFormat)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.avroFormat: object expected"); - message.avroFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.fromObject(object.avroFormat, long + 1); - } - if (object.pubsubAvroFormat != null) { - if (!$util.isObject(object.pubsubAvroFormat)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.pubsubAvroFormat: object expected"); - message.pubsubAvroFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.fromObject(object.pubsubAvroFormat, long + 1); - } - if (object.minimumObjectCreateTime != null) { - if (!$util.isObject(object.minimumObjectCreateTime)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.minimumObjectCreateTime: object expected"); - message.minimumObjectCreateTime = $root.google.protobuf.Timestamp.fromObject(object.minimumObjectCreateTime, long + 1); - } - if (object.matchGlob != null) - message.matchGlob = String(object.matchGlob); - return message; - }; - - /** - * Creates a plain object from a CloudStorage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage} message CloudStorage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudStorage.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.bucket = ""; - object.minimumObjectCreateTime = null; - object.matchGlob = ""; - } - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - object.state = options.enums === String ? $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State[message.state] : message.state; - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - object.bucket = message.bucket; - if (message.textFormat != null && Object.hasOwnProperty.call(message, "textFormat")) { - object.textFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.toObject(message.textFormat, options, q + 1); - if (options.oneofs) - object.inputFormat = "textFormat"; - } - if (message.avroFormat != null && Object.hasOwnProperty.call(message, "avroFormat")) { - object.avroFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.toObject(message.avroFormat, options, q + 1); - if (options.oneofs) - object.inputFormat = "avroFormat"; - } - if (message.pubsubAvroFormat != null && Object.hasOwnProperty.call(message, "pubsubAvroFormat")) { - object.pubsubAvroFormat = $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.toObject(message.pubsubAvroFormat, options, q + 1); - if (options.oneofs) - object.inputFormat = "pubsubAvroFormat"; - } - if (message.minimumObjectCreateTime != null && Object.hasOwnProperty.call(message, "minimumObjectCreateTime")) - object.minimumObjectCreateTime = $root.google.protobuf.Timestamp.toObject(message.minimumObjectCreateTime, options, q + 1); - if (message.matchGlob != null && Object.hasOwnProperty.call(message, "matchGlob")) - object.matchGlob = message.matchGlob; - return object; - }; - - /** - * Converts this CloudStorage to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @instance - * @returns {Object.} JSON object - */ - CloudStorage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudStorage - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudStorage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.CloudStorage"; - }; - - /** - * State enum. - * @name google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} CLOUD_STORAGE_PERMISSION_DENIED=2 CLOUD_STORAGE_PERMISSION_DENIED value - * @property {number} PUBLISH_PERMISSION_DENIED=3 PUBLISH_PERMISSION_DENIED value - * @property {number} BUCKET_NOT_FOUND=4 BUCKET_NOT_FOUND value - * @property {number} TOO_MANY_OBJECTS=5 TOO_MANY_OBJECTS value - */ - CloudStorage.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "CLOUD_STORAGE_PERMISSION_DENIED"] = 2; - values[valuesById[3] = "PUBLISH_PERMISSION_DENIED"] = 3; - values[valuesById[4] = "BUCKET_NOT_FOUND"] = 4; - values[valuesById[5] = "TOO_MANY_OBJECTS"] = 5; - return values; - })(); - - CloudStorage.TextFormat = (function() { - - /** - * Properties of a TextFormat. - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @interface ITextFormat - * @property {string|null} [delimiter] TextFormat delimiter - */ - - /** - * Constructs a new TextFormat. - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @classdesc Represents a TextFormat. - * @implements ITextFormat - * @constructor - * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat=} [properties] Properties to set - */ - function TextFormat(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * TextFormat delimiter. - * @member {string|null|undefined} delimiter - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat - * @instance - */ - TextFormat.prototype.delimiter = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(TextFormat.prototype, "_delimiter", { - get: $util.oneOfGetter($oneOfFields = ["delimiter"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TextFormat instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat} TextFormat instance - */ - TextFormat.create = function create(properties) { - return new TextFormat(properties); - }; - - /** - * Encodes the specified TextFormat message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat} message TextFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextFormat.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.delimiter); - return writer; - }; - - /** - * Encodes the specified TextFormat message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.ITextFormat} message TextFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextFormat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a TextFormat message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat} TextFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextFormat.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.delimiter = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a TextFormat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat} TextFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextFormat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TextFormat message. - * @function verify - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TextFormat.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) { - properties._delimiter = 1; - if (!$util.isString(message.delimiter)) - return "delimiter: string expected"; - } - return null; - }; - - /** - * Creates a TextFormat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat} TextFormat - */ - TextFormat.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat(); - if (object.delimiter != null) - message.delimiter = String(object.delimiter); - return message; - }; - - /** - * Creates a plain object from a TextFormat message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat} message TextFormat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TextFormat.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (message.delimiter != null && Object.hasOwnProperty.call(message, "delimiter")) { - object.delimiter = message.delimiter; - if (options.oneofs) - object._delimiter = "delimiter"; - } - return object; - }; - - /** - * Converts this TextFormat to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat - * @instance - * @returns {Object.} JSON object - */ - TextFormat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TextFormat - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TextFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.TextFormat"; - }; - - return TextFormat; - })(); - - CloudStorage.AvroFormat = (function() { - - /** - * Properties of an AvroFormat. - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @interface IAvroFormat - */ - - /** - * Constructs a new AvroFormat. - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @classdesc Represents an AvroFormat. - * @implements IAvroFormat - * @constructor - * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat=} [properties] Properties to set - */ - function AvroFormat(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new AvroFormat instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat} AvroFormat instance - */ - AvroFormat.create = function create(properties) { - return new AvroFormat(properties); - }; - - /** - * Encodes the specified AvroFormat message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat} message AvroFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AvroFormat.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - return writer; - }; - - /** - * Encodes the specified AvroFormat message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IAvroFormat} message AvroFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AvroFormat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an AvroFormat message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat} AvroFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AvroFormat.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an AvroFormat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat} AvroFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AvroFormat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AvroFormat message. - * @function verify - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AvroFormat.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - return null; - }; - - /** - * Creates an AvroFormat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat} AvroFormat - */ - AvroFormat.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat) - return object; - return new $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat(); - }; - - /** - * Creates a plain object from an AvroFormat message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat} message AvroFormat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AvroFormat.toObject = function toObject() { - return {}; - }; - - /** - * Converts this AvroFormat to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat - * @instance - * @returns {Object.} JSON object - */ - AvroFormat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AvroFormat - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AvroFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.AvroFormat"; - }; - - return AvroFormat; - })(); - - CloudStorage.PubSubAvroFormat = (function() { - - /** - * Properties of a PubSubAvroFormat. - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @interface IPubSubAvroFormat - */ - - /** - * Constructs a new PubSubAvroFormat. - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage - * @classdesc Represents a PubSubAvroFormat. - * @implements IPubSubAvroFormat - * @constructor - * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat=} [properties] Properties to set - */ - function PubSubAvroFormat(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new PubSubAvroFormat instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat} PubSubAvroFormat instance - */ - PubSubAvroFormat.create = function create(properties) { - return new PubSubAvroFormat(properties); - }; - - /** - * Encodes the specified PubSubAvroFormat message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat} message PubSubAvroFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PubSubAvroFormat.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - return writer; - }; - - /** - * Encodes the specified PubSubAvroFormat message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.IPubSubAvroFormat} message PubSubAvroFormat message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PubSubAvroFormat.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a PubSubAvroFormat message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat} PubSubAvroFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PubSubAvroFormat.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a PubSubAvroFormat message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat} PubSubAvroFormat - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PubSubAvroFormat.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PubSubAvroFormat message. - * @function verify - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PubSubAvroFormat.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - return null; - }; - - /** - * Creates a PubSubAvroFormat message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat} PubSubAvroFormat - */ - PubSubAvroFormat.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat) - return object; - return new $root.google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat(); - }; - - /** - * Creates a plain object from a PubSubAvroFormat message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat} message PubSubAvroFormat - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PubSubAvroFormat.toObject = function toObject() { - return {}; - }; - - /** - * Converts this PubSubAvroFormat to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat - * @instance - * @returns {Object.} JSON object - */ - PubSubAvroFormat.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PubSubAvroFormat - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PubSubAvroFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.CloudStorage.PubSubAvroFormat"; - }; - - return PubSubAvroFormat; - })(); - - return CloudStorage; - })(); - - IngestionDataSourceSettings.AzureEventHubs = (function() { - - /** - * Properties of an AzureEventHubs. - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @interface IAzureEventHubs - * @property {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State|null} [state] AzureEventHubs state - * @property {string|null} [resourceGroup] AzureEventHubs resourceGroup - * @property {string|null} [namespace] AzureEventHubs namespace - * @property {string|null} [eventHub] AzureEventHubs eventHub - * @property {string|null} [clientId] AzureEventHubs clientId - * @property {string|null} [tenantId] AzureEventHubs tenantId - * @property {string|null} [subscriptionId] AzureEventHubs subscriptionId - * @property {string|null} [gcpServiceAccount] AzureEventHubs gcpServiceAccount - */ - - /** - * Constructs a new AzureEventHubs. - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @classdesc Represents an AzureEventHubs. - * @implements IAzureEventHubs - * @constructor - * @param {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs=} [properties] Properties to set - */ - function AzureEventHubs(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * AzureEventHubs state. - * @member {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State} state - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @instance - */ - AzureEventHubs.prototype.state = 0; - - /** - * AzureEventHubs resourceGroup. - * @member {string} resourceGroup - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @instance - */ - AzureEventHubs.prototype.resourceGroup = ""; - - /** - * AzureEventHubs namespace. - * @member {string} namespace - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @instance - */ - AzureEventHubs.prototype.namespace = ""; - - /** - * AzureEventHubs eventHub. - * @member {string} eventHub - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @instance - */ - AzureEventHubs.prototype.eventHub = ""; - - /** - * AzureEventHubs clientId. - * @member {string} clientId - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @instance - */ - AzureEventHubs.prototype.clientId = ""; - - /** - * AzureEventHubs tenantId. - * @member {string} tenantId - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @instance - */ - AzureEventHubs.prototype.tenantId = ""; - - /** - * AzureEventHubs subscriptionId. - * @member {string} subscriptionId - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @instance - */ - AzureEventHubs.prototype.subscriptionId = ""; - - /** - * AzureEventHubs gcpServiceAccount. - * @member {string} gcpServiceAccount - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @instance - */ - AzureEventHubs.prototype.gcpServiceAccount = ""; - - /** - * Creates a new AzureEventHubs instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} AzureEventHubs instance - */ - AzureEventHubs.create = function create(properties) { - return new AzureEventHubs(properties); - }; - - /** - * Encodes the specified AzureEventHubs message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs} message AzureEventHubs message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AzureEventHubs.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.resourceGroup != null && Object.hasOwnProperty.call(message, "resourceGroup")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceGroup); - if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.namespace); - if (message.eventHub != null && Object.hasOwnProperty.call(message, "eventHub")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.eventHub); - if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.clientId); - if (message.tenantId != null && Object.hasOwnProperty.call(message, "tenantId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.tenantId); - if (message.subscriptionId != null && Object.hasOwnProperty.call(message, "subscriptionId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.subscriptionId); - if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.gcpServiceAccount); - return writer; - }; - - /** - * Encodes the specified AzureEventHubs message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.IAzureEventHubs} message AzureEventHubs message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AzureEventHubs.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an AzureEventHubs message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} AzureEventHubs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AzureEventHubs.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.resourceGroup = reader.string(); - break; - } - case 3: { - message.namespace = reader.string(); - break; - } - case 4: { - message.eventHub = reader.string(); - break; - } - case 5: { - message.clientId = reader.string(); - break; - } - case 6: { - message.tenantId = reader.string(); - break; - } - case 7: { - message.subscriptionId = reader.string(); - break; - } - case 8: { - message.gcpServiceAccount = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an AzureEventHubs message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} AzureEventHubs - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AzureEventHubs.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AzureEventHubs message. - * @function verify - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AzureEventHubs.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.resourceGroup != null && Object.hasOwnProperty.call(message, "resourceGroup")) - if (!$util.isString(message.resourceGroup)) - return "resourceGroup: string expected"; - if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace")) - if (!$util.isString(message.namespace)) - return "namespace: string expected"; - if (message.eventHub != null && Object.hasOwnProperty.call(message, "eventHub")) - if (!$util.isString(message.eventHub)) - return "eventHub: string expected"; - if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) - if (!$util.isString(message.clientId)) - return "clientId: string expected"; - if (message.tenantId != null && Object.hasOwnProperty.call(message, "tenantId")) - if (!$util.isString(message.tenantId)) - return "tenantId: string expected"; - if (message.subscriptionId != null && Object.hasOwnProperty.call(message, "subscriptionId")) - if (!$util.isString(message.subscriptionId)) - return "subscriptionId: string expected"; - if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount")) - if (!$util.isString(message.gcpServiceAccount)) - return "gcpServiceAccount: string expected"; - return null; - }; - - /** - * Creates an AzureEventHubs message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} AzureEventHubs - */ - AzureEventHubs.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs(); - 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 "ACTIVE": - case 1: - message.state = 1; - break; - case "EVENT_HUBS_PERMISSION_DENIED": - case 2: - message.state = 2; - break; - case "PUBLISH_PERMISSION_DENIED": - case 3: - message.state = 3; - break; - case "NAMESPACE_NOT_FOUND": - case 4: - message.state = 4; - break; - case "EVENT_HUB_NOT_FOUND": - case 5: - message.state = 5; - break; - case "SUBSCRIPTION_NOT_FOUND": - case 6: - message.state = 6; - break; - case "RESOURCE_GROUP_NOT_FOUND": - case 7: - message.state = 7; - break; - } - if (object.resourceGroup != null) - message.resourceGroup = String(object.resourceGroup); - if (object.namespace != null) - message.namespace = String(object.namespace); - if (object.eventHub != null) - message.eventHub = String(object.eventHub); - if (object.clientId != null) - message.clientId = String(object.clientId); - if (object.tenantId != null) - message.tenantId = String(object.tenantId); - if (object.subscriptionId != null) - message.subscriptionId = String(object.subscriptionId); - if (object.gcpServiceAccount != null) - message.gcpServiceAccount = String(object.gcpServiceAccount); - return message; - }; - - /** - * Creates a plain object from an AzureEventHubs message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs} message AzureEventHubs - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AzureEventHubs.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.resourceGroup = ""; - object.namespace = ""; - object.eventHub = ""; - object.clientId = ""; - object.tenantId = ""; - object.subscriptionId = ""; - object.gcpServiceAccount = ""; - } - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - object.state = options.enums === String ? $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State[message.state] : message.state; - if (message.resourceGroup != null && Object.hasOwnProperty.call(message, "resourceGroup")) - object.resourceGroup = message.resourceGroup; - if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace")) - object.namespace = message.namespace; - if (message.eventHub != null && Object.hasOwnProperty.call(message, "eventHub")) - object.eventHub = message.eventHub; - if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) - object.clientId = message.clientId; - if (message.tenantId != null && Object.hasOwnProperty.call(message, "tenantId")) - object.tenantId = message.tenantId; - if (message.subscriptionId != null && Object.hasOwnProperty.call(message, "subscriptionId")) - object.subscriptionId = message.subscriptionId; - if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount")) - object.gcpServiceAccount = message.gcpServiceAccount; - return object; - }; - - /** - * Converts this AzureEventHubs to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @instance - * @returns {Object.} JSON object - */ - AzureEventHubs.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AzureEventHubs - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AzureEventHubs.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs"; - }; - - /** - * State enum. - * @name google.pubsub.v1.IngestionDataSourceSettings.AzureEventHubs.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} EVENT_HUBS_PERMISSION_DENIED=2 EVENT_HUBS_PERMISSION_DENIED value - * @property {number} PUBLISH_PERMISSION_DENIED=3 PUBLISH_PERMISSION_DENIED value - * @property {number} NAMESPACE_NOT_FOUND=4 NAMESPACE_NOT_FOUND value - * @property {number} EVENT_HUB_NOT_FOUND=5 EVENT_HUB_NOT_FOUND value - * @property {number} SUBSCRIPTION_NOT_FOUND=6 SUBSCRIPTION_NOT_FOUND value - * @property {number} RESOURCE_GROUP_NOT_FOUND=7 RESOURCE_GROUP_NOT_FOUND value - */ - AzureEventHubs.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "EVENT_HUBS_PERMISSION_DENIED"] = 2; - values[valuesById[3] = "PUBLISH_PERMISSION_DENIED"] = 3; - values[valuesById[4] = "NAMESPACE_NOT_FOUND"] = 4; - values[valuesById[5] = "EVENT_HUB_NOT_FOUND"] = 5; - values[valuesById[6] = "SUBSCRIPTION_NOT_FOUND"] = 6; - values[valuesById[7] = "RESOURCE_GROUP_NOT_FOUND"] = 7; - return values; - })(); - - return AzureEventHubs; - })(); - - IngestionDataSourceSettings.AwsMsk = (function() { - - /** - * Properties of an AwsMsk. - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @interface IAwsMsk - * @property {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State|null} [state] AwsMsk state - * @property {string|null} [clusterArn] AwsMsk clusterArn - * @property {string|null} [topic] AwsMsk topic - * @property {string|null} [awsRoleArn] AwsMsk awsRoleArn - * @property {string|null} [gcpServiceAccount] AwsMsk gcpServiceAccount - */ - - /** - * Constructs a new AwsMsk. - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @classdesc Represents an AwsMsk. - * @implements IAwsMsk - * @constructor - * @param {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk=} [properties] Properties to set - */ - function AwsMsk(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * AwsMsk state. - * @member {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State} state - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk - * @instance - */ - AwsMsk.prototype.state = 0; - - /** - * AwsMsk clusterArn. - * @member {string} clusterArn - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk - * @instance - */ - AwsMsk.prototype.clusterArn = ""; - - /** - * AwsMsk topic. - * @member {string} topic - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk - * @instance - */ - AwsMsk.prototype.topic = ""; - - /** - * AwsMsk awsRoleArn. - * @member {string} awsRoleArn - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk - * @instance - */ - AwsMsk.prototype.awsRoleArn = ""; - - /** - * AwsMsk gcpServiceAccount. - * @member {string} gcpServiceAccount - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk - * @instance - */ - AwsMsk.prototype.gcpServiceAccount = ""; - - /** - * Creates a new AwsMsk instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} AwsMsk instance - */ - AwsMsk.create = function create(properties) { - return new AwsMsk(properties); - }; - - /** - * Encodes the specified AwsMsk message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk} message AwsMsk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AwsMsk.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.clusterArn != null && Object.hasOwnProperty.call(message, "clusterArn")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterArn); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.topic); - if (message.awsRoleArn != null && Object.hasOwnProperty.call(message, "awsRoleArn")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.awsRoleArn); - if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.gcpServiceAccount); - return writer; - }; - - /** - * Encodes the specified AwsMsk message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.IAwsMsk} message AwsMsk message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AwsMsk.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an AwsMsk message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} AwsMsk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AwsMsk.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.clusterArn = reader.string(); - break; - } - case 3: { - message.topic = reader.string(); - break; - } - case 4: { - message.awsRoleArn = reader.string(); - break; - } - case 5: { - message.gcpServiceAccount = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an AwsMsk message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} AwsMsk - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AwsMsk.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AwsMsk message. - * @function verify - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AwsMsk.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.clusterArn != null && Object.hasOwnProperty.call(message, "clusterArn")) - if (!$util.isString(message.clusterArn)) - return "clusterArn: string expected"; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - if (message.awsRoleArn != null && Object.hasOwnProperty.call(message, "awsRoleArn")) - if (!$util.isString(message.awsRoleArn)) - return "awsRoleArn: string expected"; - if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount")) - if (!$util.isString(message.gcpServiceAccount)) - return "gcpServiceAccount: string expected"; - return null; - }; - - /** - * Creates an AwsMsk message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} AwsMsk - */ - AwsMsk.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.AwsMsk: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk(); - 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 "ACTIVE": - case 1: - message.state = 1; - break; - case "MSK_PERMISSION_DENIED": - case 2: - message.state = 2; - break; - case "PUBLISH_PERMISSION_DENIED": - case 3: - message.state = 3; - break; - case "CLUSTER_NOT_FOUND": - case 4: - message.state = 4; - break; - case "TOPIC_NOT_FOUND": - case 5: - message.state = 5; - break; - } - if (object.clusterArn != null) - message.clusterArn = String(object.clusterArn); - if (object.topic != null) - message.topic = String(object.topic); - if (object.awsRoleArn != null) - message.awsRoleArn = String(object.awsRoleArn); - if (object.gcpServiceAccount != null) - message.gcpServiceAccount = String(object.gcpServiceAccount); - return message; - }; - - /** - * Creates a plain object from an AwsMsk message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.AwsMsk} message AwsMsk - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AwsMsk.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.clusterArn = ""; - object.topic = ""; - object.awsRoleArn = ""; - object.gcpServiceAccount = ""; - } - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - object.state = options.enums === String ? $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State[message.state] : message.state; - if (message.clusterArn != null && Object.hasOwnProperty.call(message, "clusterArn")) - object.clusterArn = message.clusterArn; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - object.topic = message.topic; - if (message.awsRoleArn != null && Object.hasOwnProperty.call(message, "awsRoleArn")) - object.awsRoleArn = message.awsRoleArn; - if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount")) - object.gcpServiceAccount = message.gcpServiceAccount; - return object; - }; - - /** - * Converts this AwsMsk to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk - * @instance - * @returns {Object.} JSON object - */ - AwsMsk.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AwsMsk - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionDataSourceSettings.AwsMsk - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AwsMsk.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.AwsMsk"; - }; - - /** - * State enum. - * @name google.pubsub.v1.IngestionDataSourceSettings.AwsMsk.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} MSK_PERMISSION_DENIED=2 MSK_PERMISSION_DENIED value - * @property {number} PUBLISH_PERMISSION_DENIED=3 PUBLISH_PERMISSION_DENIED value - * @property {number} CLUSTER_NOT_FOUND=4 CLUSTER_NOT_FOUND value - * @property {number} TOPIC_NOT_FOUND=5 TOPIC_NOT_FOUND value - */ - AwsMsk.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "MSK_PERMISSION_DENIED"] = 2; - values[valuesById[3] = "PUBLISH_PERMISSION_DENIED"] = 3; - values[valuesById[4] = "CLUSTER_NOT_FOUND"] = 4; - values[valuesById[5] = "TOPIC_NOT_FOUND"] = 5; - return values; - })(); - - return AwsMsk; - })(); - - IngestionDataSourceSettings.ConfluentCloud = (function() { - - /** - * Properties of a ConfluentCloud. - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @interface IConfluentCloud - * @property {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State|null} [state] ConfluentCloud state - * @property {string|null} [bootstrapServer] ConfluentCloud bootstrapServer - * @property {string|null} [clusterId] ConfluentCloud clusterId - * @property {string|null} [topic] ConfluentCloud topic - * @property {string|null} [identityPoolId] ConfluentCloud identityPoolId - * @property {string|null} [gcpServiceAccount] ConfluentCloud gcpServiceAccount - */ - - /** - * Constructs a new ConfluentCloud. - * @memberof google.pubsub.v1.IngestionDataSourceSettings - * @classdesc Represents a ConfluentCloud. - * @implements IConfluentCloud - * @constructor - * @param {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud=} [properties] Properties to set - */ - function ConfluentCloud(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConfluentCloud state. - * @member {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State} state - * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud - * @instance - */ - ConfluentCloud.prototype.state = 0; - - /** - * ConfluentCloud bootstrapServer. - * @member {string} bootstrapServer - * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud - * @instance - */ - ConfluentCloud.prototype.bootstrapServer = ""; - - /** - * ConfluentCloud clusterId. - * @member {string} clusterId - * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud - * @instance - */ - ConfluentCloud.prototype.clusterId = ""; - - /** - * ConfluentCloud topic. - * @member {string} topic - * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud - * @instance - */ - ConfluentCloud.prototype.topic = ""; - - /** - * ConfluentCloud identityPoolId. - * @member {string} identityPoolId - * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud - * @instance - */ - ConfluentCloud.prototype.identityPoolId = ""; - - /** - * ConfluentCloud gcpServiceAccount. - * @member {string} gcpServiceAccount - * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud - * @instance - */ - ConfluentCloud.prototype.gcpServiceAccount = ""; - - /** - * Creates a new ConfluentCloud instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} ConfluentCloud instance - */ - ConfluentCloud.create = function create(properties) { - return new ConfluentCloud(properties); - }; - - /** - * Encodes the specified ConfluentCloud message. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud} message ConfluentCloud message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfluentCloud.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.bootstrapServer != null && Object.hasOwnProperty.call(message, "bootstrapServer")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.bootstrapServer); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.clusterId); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.topic); - if (message.identityPoolId != null && Object.hasOwnProperty.call(message, "identityPoolId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.identityPoolId); - if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.gcpServiceAccount); - return writer; - }; - - /** - * Encodes the specified ConfluentCloud message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.IConfluentCloud} message ConfluentCloud message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfluentCloud.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ConfluentCloud message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} ConfluentCloud - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfluentCloud.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.bootstrapServer = reader.string(); - break; - } - case 3: { - message.clusterId = reader.string(); - break; - } - case 4: { - message.topic = reader.string(); - break; - } - case 5: { - message.identityPoolId = reader.string(); - break; - } - case 6: { - message.gcpServiceAccount = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ConfluentCloud message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} ConfluentCloud - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfluentCloud.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConfluentCloud message. - * @function verify - * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfluentCloud.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.bootstrapServer != null && Object.hasOwnProperty.call(message, "bootstrapServer")) - if (!$util.isString(message.bootstrapServer)) - return "bootstrapServer: string expected"; - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - if (message.identityPoolId != null && Object.hasOwnProperty.call(message, "identityPoolId")) - if (!$util.isString(message.identityPoolId)) - return "identityPoolId: string expected"; - if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount")) - if (!$util.isString(message.gcpServiceAccount)) - return "gcpServiceAccount: string expected"; - return null; - }; - - /** - * Creates a ConfluentCloud message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} ConfluentCloud - */ - ConfluentCloud.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud(); - 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 "ACTIVE": - case 1: - message.state = 1; - break; - case "CONFLUENT_CLOUD_PERMISSION_DENIED": - case 2: - message.state = 2; - break; - case "PUBLISH_PERMISSION_DENIED": - case 3: - message.state = 3; - break; - case "UNREACHABLE_BOOTSTRAP_SERVER": - case 4: - message.state = 4; - break; - case "CLUSTER_NOT_FOUND": - case 5: - message.state = 5; - break; - case "TOPIC_NOT_FOUND": - case 6: - message.state = 6; - break; - } - if (object.bootstrapServer != null) - message.bootstrapServer = String(object.bootstrapServer); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.topic != null) - message.topic = String(object.topic); - if (object.identityPoolId != null) - message.identityPoolId = String(object.identityPoolId); - if (object.gcpServiceAccount != null) - message.gcpServiceAccount = String(object.gcpServiceAccount); - return message; - }; - - /** - * Creates a plain object from a ConfluentCloud message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud - * @static - * @param {google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud} message ConfluentCloud - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfluentCloud.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.bootstrapServer = ""; - object.clusterId = ""; - object.topic = ""; - object.identityPoolId = ""; - object.gcpServiceAccount = ""; - } - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - object.state = options.enums === String ? $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State[message.state] : message.state; - if (message.bootstrapServer != null && Object.hasOwnProperty.call(message, "bootstrapServer")) - object.bootstrapServer = message.bootstrapServer; - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - object.clusterId = message.clusterId; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - object.topic = message.topic; - if (message.identityPoolId != null && Object.hasOwnProperty.call(message, "identityPoolId")) - object.identityPoolId = message.identityPoolId; - if (message.gcpServiceAccount != null && Object.hasOwnProperty.call(message, "gcpServiceAccount")) - object.gcpServiceAccount = message.gcpServiceAccount; - return object; - }; - - /** - * Converts this ConfluentCloud to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud - * @instance - * @returns {Object.} JSON object - */ - ConfluentCloud.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConfluentCloud - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConfluentCloud.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud"; - }; - - /** - * State enum. - * @name google.pubsub.v1.IngestionDataSourceSettings.ConfluentCloud.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} CONFLUENT_CLOUD_PERMISSION_DENIED=2 CONFLUENT_CLOUD_PERMISSION_DENIED value - * @property {number} PUBLISH_PERMISSION_DENIED=3 PUBLISH_PERMISSION_DENIED value - * @property {number} UNREACHABLE_BOOTSTRAP_SERVER=4 UNREACHABLE_BOOTSTRAP_SERVER value - * @property {number} CLUSTER_NOT_FOUND=5 CLUSTER_NOT_FOUND value - * @property {number} TOPIC_NOT_FOUND=6 TOPIC_NOT_FOUND value - */ - ConfluentCloud.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "CONFLUENT_CLOUD_PERMISSION_DENIED"] = 2; - values[valuesById[3] = "PUBLISH_PERMISSION_DENIED"] = 3; - values[valuesById[4] = "UNREACHABLE_BOOTSTRAP_SERVER"] = 4; - values[valuesById[5] = "CLUSTER_NOT_FOUND"] = 5; - values[valuesById[6] = "TOPIC_NOT_FOUND"] = 6; - return values; - })(); - - return ConfluentCloud; - })(); - - return IngestionDataSourceSettings; - })(); - - v1.PlatformLogsSettings = (function() { - - /** - * Properties of a PlatformLogsSettings. - * @memberof google.pubsub.v1 - * @interface IPlatformLogsSettings - * @property {google.pubsub.v1.PlatformLogsSettings.Severity|null} [severity] PlatformLogsSettings severity - */ - - /** - * Constructs a new PlatformLogsSettings. - * @memberof google.pubsub.v1 - * @classdesc Represents a PlatformLogsSettings. - * @implements IPlatformLogsSettings - * @constructor - * @param {google.pubsub.v1.IPlatformLogsSettings=} [properties] Properties to set - */ - function PlatformLogsSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * PlatformLogsSettings severity. - * @member {google.pubsub.v1.PlatformLogsSettings.Severity} severity - * @memberof google.pubsub.v1.PlatformLogsSettings - * @instance - */ - PlatformLogsSettings.prototype.severity = 0; - - /** - * Creates a new PlatformLogsSettings instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {google.pubsub.v1.IPlatformLogsSettings=} [properties] Properties to set - * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings instance - */ - PlatformLogsSettings.create = function create(properties) { - return new PlatformLogsSettings(properties); - }; - - /** - * Encodes the specified PlatformLogsSettings message. Does not implicitly {@link google.pubsub.v1.PlatformLogsSettings.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {google.pubsub.v1.IPlatformLogsSettings} message PlatformLogsSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlatformLogsSettings.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.severity); - return writer; - }; - - /** - * Encodes the specified PlatformLogsSettings message, length delimited. Does not implicitly {@link google.pubsub.v1.PlatformLogsSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {google.pubsub.v1.IPlatformLogsSettings} message PlatformLogsSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PlatformLogsSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a PlatformLogsSettings message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlatformLogsSettings.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.PlatformLogsSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.severity = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a PlatformLogsSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PlatformLogsSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PlatformLogsSettings message. - * @function verify - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PlatformLogsSettings.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - switch (message.severity) { - default: - return "severity: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - return null; - }; - - /** - * Creates a PlatformLogsSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.PlatformLogsSettings} PlatformLogsSettings - */ - PlatformLogsSettings.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.PlatformLogsSettings) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.PlatformLogsSettings: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.PlatformLogsSettings(); - switch (object.severity) { - default: - if (typeof object.severity === "number") { - message.severity = object.severity; - break; - } - break; - case "SEVERITY_UNSPECIFIED": - case 0: - message.severity = 0; - break; - case "DISABLED": - case 1: - message.severity = 1; - break; - case "DEBUG": - case 2: - message.severity = 2; - break; - case "INFO": - case 3: - message.severity = 3; - break; - case "WARNING": - case 4: - message.severity = 4; - break; - case "ERROR": - case 5: - message.severity = 5; - break; - } - return message; - }; - - /** - * Creates a plain object from a PlatformLogsSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {google.pubsub.v1.PlatformLogsSettings} message PlatformLogsSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PlatformLogsSettings.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.severity = options.enums === String ? "SEVERITY_UNSPECIFIED" : 0; - if (message.severity != null && Object.hasOwnProperty.call(message, "severity")) - object.severity = options.enums === String ? $root.google.pubsub.v1.PlatformLogsSettings.Severity[message.severity] === undefined ? message.severity : $root.google.pubsub.v1.PlatformLogsSettings.Severity[message.severity] : message.severity; - return object; - }; - - /** - * Converts this PlatformLogsSettings to JSON. - * @function toJSON - * @memberof google.pubsub.v1.PlatformLogsSettings - * @instance - * @returns {Object.} JSON object - */ - PlatformLogsSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PlatformLogsSettings - * @function getTypeUrl - * @memberof google.pubsub.v1.PlatformLogsSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PlatformLogsSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.PlatformLogsSettings"; - }; - - /** - * Severity enum. - * @name google.pubsub.v1.PlatformLogsSettings.Severity - * @enum {number} - * @property {number} SEVERITY_UNSPECIFIED=0 SEVERITY_UNSPECIFIED value - * @property {number} DISABLED=1 DISABLED value - * @property {number} DEBUG=2 DEBUG value - * @property {number} INFO=3 INFO value - * @property {number} WARNING=4 WARNING value - * @property {number} ERROR=5 ERROR value - */ - PlatformLogsSettings.Severity = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SEVERITY_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISABLED"] = 1; - values[valuesById[2] = "DEBUG"] = 2; - values[valuesById[3] = "INFO"] = 3; - values[valuesById[4] = "WARNING"] = 4; - values[valuesById[5] = "ERROR"] = 5; - return values; - })(); - - return PlatformLogsSettings; - })(); - - v1.IngestionFailureEvent = (function() { - - /** - * Properties of an IngestionFailureEvent. - * @memberof google.pubsub.v1 - * @interface IIngestionFailureEvent - * @property {string|null} [topic] IngestionFailureEvent topic - * @property {string|null} [errorMessage] IngestionFailureEvent errorMessage - * @property {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure|null} [cloudStorageFailure] IngestionFailureEvent cloudStorageFailure - * @property {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason|null} [awsMskFailure] IngestionFailureEvent awsMskFailure - * @property {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason|null} [azureEventHubsFailure] IngestionFailureEvent azureEventHubsFailure - * @property {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason|null} [confluentCloudFailure] IngestionFailureEvent confluentCloudFailure - * @property {google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason|null} [awsKinesisFailure] IngestionFailureEvent awsKinesisFailure - */ - - /** - * Constructs a new IngestionFailureEvent. - * @memberof google.pubsub.v1 - * @classdesc Represents an IngestionFailureEvent. - * @implements IIngestionFailureEvent - * @constructor - * @param {google.pubsub.v1.IIngestionFailureEvent=} [properties] Properties to set - */ - function IngestionFailureEvent(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * IngestionFailureEvent topic. - * @member {string} topic - * @memberof google.pubsub.v1.IngestionFailureEvent - * @instance - */ - IngestionFailureEvent.prototype.topic = ""; - - /** - * IngestionFailureEvent errorMessage. - * @member {string} errorMessage - * @memberof google.pubsub.v1.IngestionFailureEvent - * @instance - */ - IngestionFailureEvent.prototype.errorMessage = ""; - - /** - * IngestionFailureEvent cloudStorageFailure. - * @member {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure|null|undefined} cloudStorageFailure - * @memberof google.pubsub.v1.IngestionFailureEvent - * @instance - */ - IngestionFailureEvent.prototype.cloudStorageFailure = null; - - /** - * IngestionFailureEvent awsMskFailure. - * @member {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason|null|undefined} awsMskFailure - * @memberof google.pubsub.v1.IngestionFailureEvent - * @instance - */ - IngestionFailureEvent.prototype.awsMskFailure = null; - - /** - * IngestionFailureEvent azureEventHubsFailure. - * @member {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason|null|undefined} azureEventHubsFailure - * @memberof google.pubsub.v1.IngestionFailureEvent - * @instance - */ - IngestionFailureEvent.prototype.azureEventHubsFailure = null; - - /** - * IngestionFailureEvent confluentCloudFailure. - * @member {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason|null|undefined} confluentCloudFailure - * @memberof google.pubsub.v1.IngestionFailureEvent - * @instance - */ - IngestionFailureEvent.prototype.confluentCloudFailure = null; - - /** - * IngestionFailureEvent awsKinesisFailure. - * @member {google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason|null|undefined} awsKinesisFailure - * @memberof google.pubsub.v1.IngestionFailureEvent - * @instance - */ - IngestionFailureEvent.prototype.awsKinesisFailure = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * IngestionFailureEvent failure. - * @member {"cloudStorageFailure"|"awsMskFailure"|"azureEventHubsFailure"|"confluentCloudFailure"|"awsKinesisFailure"|undefined} failure - * @memberof google.pubsub.v1.IngestionFailureEvent - * @instance - */ - Object.defineProperty(IngestionFailureEvent.prototype, "failure", { - get: $util.oneOfGetter($oneOfFields = ["cloudStorageFailure", "awsMskFailure", "azureEventHubsFailure", "confluentCloudFailure", "awsKinesisFailure"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new IngestionFailureEvent instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {google.pubsub.v1.IIngestionFailureEvent=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent instance - */ - IngestionFailureEvent.create = function create(properties) { - return new IngestionFailureEvent(properties); - }; - - /** - * Encodes the specified IngestionFailureEvent message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {google.pubsub.v1.IIngestionFailureEvent} message IngestionFailureEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IngestionFailureEvent.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.errorMessage); - if (message.cloudStorageFailure != null && Object.hasOwnProperty.call(message, "cloudStorageFailure")) - $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.encode(message.cloudStorageFailure, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); - if (message.awsMskFailure != null && Object.hasOwnProperty.call(message, "awsMskFailure")) - $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.encode(message.awsMskFailure, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); - if (message.azureEventHubsFailure != null && Object.hasOwnProperty.call(message, "azureEventHubsFailure")) - $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.encode(message.azureEventHubsFailure, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); - if (message.confluentCloudFailure != null && Object.hasOwnProperty.call(message, "confluentCloudFailure")) - $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.encode(message.confluentCloudFailure, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); - if (message.awsKinesisFailure != null && Object.hasOwnProperty.call(message, "awsKinesisFailure")) - $root.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.encode(message.awsKinesisFailure, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified IngestionFailureEvent message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {google.pubsub.v1.IIngestionFailureEvent} message IngestionFailureEvent message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IngestionFailureEvent.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an IngestionFailureEvent message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IngestionFailureEvent.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.topic = reader.string(); - break; - } - case 2: { - message.errorMessage = reader.string(); - break; - } - case 3: { - message.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 4: { - message.awsMskFailure = $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 5: { - message.azureEventHubsFailure = $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 6: { - message.confluentCloudFailure = $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 7: { - message.awsKinesisFailure = $root.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an IngestionFailureEvent message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IngestionFailureEvent.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IngestionFailureEvent message. - * @function verify - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IngestionFailureEvent.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - if (!$util.isString(message.errorMessage)) - return "errorMessage: string expected"; - if (message.cloudStorageFailure != null && Object.hasOwnProperty.call(message, "cloudStorageFailure")) { - properties.failure = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify(message.cloudStorageFailure, long + 1); - if (error) - return "cloudStorageFailure." + error; - } - } - if (message.awsMskFailure != null && Object.hasOwnProperty.call(message, "awsMskFailure")) { - if (properties.failure === 1) - return "failure: multiple values"; - properties.failure = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.verify(message.awsMskFailure, long + 1); - if (error) - return "awsMskFailure." + error; - } - } - if (message.azureEventHubsFailure != null && Object.hasOwnProperty.call(message, "azureEventHubsFailure")) { - if (properties.failure === 1) - return "failure: multiple values"; - properties.failure = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.verify(message.azureEventHubsFailure, long + 1); - if (error) - return "azureEventHubsFailure." + error; - } - } - if (message.confluentCloudFailure != null && Object.hasOwnProperty.call(message, "confluentCloudFailure")) { - if (properties.failure === 1) - return "failure: multiple values"; - properties.failure = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.verify(message.confluentCloudFailure, long + 1); - if (error) - return "confluentCloudFailure." + error; - } - } - if (message.awsKinesisFailure != null && Object.hasOwnProperty.call(message, "awsKinesisFailure")) { - if (properties.failure === 1) - return "failure: multiple values"; - properties.failure = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.verify(message.awsKinesisFailure, long + 1); - if (error) - return "awsKinesisFailure." + error; - } - } - return null; - }; - - /** - * Creates an IngestionFailureEvent message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionFailureEvent} IngestionFailureEvent - */ - IngestionFailureEvent.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.IngestionFailureEvent(); - if (object.topic != null) - message.topic = String(object.topic); - if (object.errorMessage != null) - message.errorMessage = String(object.errorMessage); - if (object.cloudStorageFailure != null) { - if (!$util.isObject(object.cloudStorageFailure)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.cloudStorageFailure: object expected"); - message.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.fromObject(object.cloudStorageFailure, long + 1); - } - if (object.awsMskFailure != null) { - if (!$util.isObject(object.awsMskFailure)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.awsMskFailure: object expected"); - message.awsMskFailure = $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.fromObject(object.awsMskFailure, long + 1); - } - if (object.azureEventHubsFailure != null) { - if (!$util.isObject(object.azureEventHubsFailure)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.azureEventHubsFailure: object expected"); - message.azureEventHubsFailure = $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.fromObject(object.azureEventHubsFailure, long + 1); - } - if (object.confluentCloudFailure != null) { - if (!$util.isObject(object.confluentCloudFailure)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.confluentCloudFailure: object expected"); - message.confluentCloudFailure = $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.fromObject(object.confluentCloudFailure, long + 1); - } - if (object.awsKinesisFailure != null) { - if (!$util.isObject(object.awsKinesisFailure)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.awsKinesisFailure: object expected"); - message.awsKinesisFailure = $root.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.fromObject(object.awsKinesisFailure, long + 1); - } - return message; - }; - - /** - * Creates a plain object from an IngestionFailureEvent message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {google.pubsub.v1.IngestionFailureEvent} message IngestionFailureEvent - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IngestionFailureEvent.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.topic = ""; - object.errorMessage = ""; - } - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - object.topic = message.topic; - if (message.errorMessage != null && Object.hasOwnProperty.call(message, "errorMessage")) - object.errorMessage = message.errorMessage; - if (message.cloudStorageFailure != null && Object.hasOwnProperty.call(message, "cloudStorageFailure")) { - object.cloudStorageFailure = $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.toObject(message.cloudStorageFailure, options, q + 1); - if (options.oneofs) - object.failure = "cloudStorageFailure"; - } - if (message.awsMskFailure != null && Object.hasOwnProperty.call(message, "awsMskFailure")) { - object.awsMskFailure = $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.toObject(message.awsMskFailure, options, q + 1); - if (options.oneofs) - object.failure = "awsMskFailure"; - } - if (message.azureEventHubsFailure != null && Object.hasOwnProperty.call(message, "azureEventHubsFailure")) { - object.azureEventHubsFailure = $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.toObject(message.azureEventHubsFailure, options, q + 1); - if (options.oneofs) - object.failure = "azureEventHubsFailure"; - } - if (message.confluentCloudFailure != null && Object.hasOwnProperty.call(message, "confluentCloudFailure")) { - object.confluentCloudFailure = $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.toObject(message.confluentCloudFailure, options, q + 1); - if (options.oneofs) - object.failure = "confluentCloudFailure"; - } - if (message.awsKinesisFailure != null && Object.hasOwnProperty.call(message, "awsKinesisFailure")) { - object.awsKinesisFailure = $root.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.toObject(message.awsKinesisFailure, options, q + 1); - if (options.oneofs) - object.failure = "awsKinesisFailure"; - } - return object; - }; - - /** - * Converts this IngestionFailureEvent to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionFailureEvent - * @instance - * @returns {Object.} JSON object - */ - IngestionFailureEvent.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IngestionFailureEvent - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionFailureEvent - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IngestionFailureEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent"; - }; - - IngestionFailureEvent.ApiViolationReason = (function() { - - /** - * Properties of an ApiViolationReason. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @interface IApiViolationReason - */ - - /** - * Constructs a new ApiViolationReason. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @classdesc Represents an ApiViolationReason. - * @implements IApiViolationReason - * @constructor - * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason=} [properties] Properties to set - */ - function ApiViolationReason(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new ApiViolationReason instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason instance - */ - ApiViolationReason.create = function create(properties) { - return new ApiViolationReason(properties); - }; - - /** - * Encodes the specified ApiViolationReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason} message ApiViolationReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ApiViolationReason.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - return writer; - }; - - /** - * Encodes the specified ApiViolationReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason} message ApiViolationReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ApiViolationReason.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an ApiViolationReason message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ApiViolationReason.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an ApiViolationReason message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ApiViolationReason.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ApiViolationReason message. - * @function verify - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ApiViolationReason.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - return null; - }; - - /** - * Creates an ApiViolationReason message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} ApiViolationReason - */ - ApiViolationReason.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason) - return object; - return new $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason(); - }; - - /** - * Creates a plain object from an ApiViolationReason message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.ApiViolationReason} message ApiViolationReason - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ApiViolationReason.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ApiViolationReason to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason - * @instance - * @returns {Object.} JSON object - */ - ApiViolationReason.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ApiViolationReason - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionFailureEvent.ApiViolationReason - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ApiViolationReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.ApiViolationReason"; - }; - - return ApiViolationReason; - })(); - - IngestionFailureEvent.AvroFailureReason = (function() { - - /** - * Properties of an AvroFailureReason. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @interface IAvroFailureReason - */ - - /** - * Constructs a new AvroFailureReason. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @classdesc Represents an AvroFailureReason. - * @implements IAvroFailureReason - * @constructor - * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason=} [properties] Properties to set - */ - function AvroFailureReason(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new AvroFailureReason instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason instance - */ - AvroFailureReason.create = function create(properties) { - return new AvroFailureReason(properties); - }; - - /** - * Encodes the specified AvroFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason} message AvroFailureReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AvroFailureReason.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - return writer; - }; - - /** - * Encodes the specified AvroFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason} message AvroFailureReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AvroFailureReason.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an AvroFailureReason message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AvroFailureReason.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an AvroFailureReason message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AvroFailureReason.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AvroFailureReason message. - * @function verify - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AvroFailureReason.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - return null; - }; - - /** - * Creates an AvroFailureReason message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} AvroFailureReason - */ - AvroFailureReason.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason) - return object; - return new $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason(); - }; - - /** - * Creates a plain object from an AvroFailureReason message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.AvroFailureReason} message AvroFailureReason - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AvroFailureReason.toObject = function toObject() { - return {}; - }; - - /** - * Converts this AvroFailureReason to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason - * @instance - * @returns {Object.} JSON object - */ - AvroFailureReason.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AvroFailureReason - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionFailureEvent.AvroFailureReason - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AvroFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.AvroFailureReason"; - }; - - return AvroFailureReason; - })(); - - IngestionFailureEvent.SchemaViolationReason = (function() { - - /** - * Properties of a SchemaViolationReason. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @interface ISchemaViolationReason - */ - - /** - * Constructs a new SchemaViolationReason. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @classdesc Represents a SchemaViolationReason. - * @implements ISchemaViolationReason - * @constructor - * @param {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason=} [properties] Properties to set - */ - function SchemaViolationReason(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new SchemaViolationReason instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason} SchemaViolationReason instance - */ - SchemaViolationReason.create = function create(properties) { - return new SchemaViolationReason(properties); - }; - - /** - * Encodes the specified SchemaViolationReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason} message SchemaViolationReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaViolationReason.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - return writer; - }; - - /** - * Encodes the specified SchemaViolationReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason} message SchemaViolationReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchemaViolationReason.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a SchemaViolationReason message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason} SchemaViolationReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaViolationReason.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a SchemaViolationReason message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason} SchemaViolationReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchemaViolationReason.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SchemaViolationReason message. - * @function verify - * @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SchemaViolationReason.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - return null; - }; - - /** - * Creates a SchemaViolationReason message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason} SchemaViolationReason - */ - SchemaViolationReason.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason) - return object; - return new $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason(); - }; - - /** - * Creates a plain object from a SchemaViolationReason message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason} message SchemaViolationReason - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SchemaViolationReason.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SchemaViolationReason to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason - * @instance - * @returns {Object.} JSON object - */ - SchemaViolationReason.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SchemaViolationReason - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SchemaViolationReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason"; - }; - - return SchemaViolationReason; - })(); - - IngestionFailureEvent.MessageTransformationFailureReason = (function() { - - /** - * Properties of a MessageTransformationFailureReason. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @interface IMessageTransformationFailureReason - */ - - /** - * Constructs a new MessageTransformationFailureReason. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @classdesc Represents a MessageTransformationFailureReason. - * @implements IMessageTransformationFailureReason - * @constructor - * @param {google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason=} [properties] Properties to set - */ - function MessageTransformationFailureReason(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new MessageTransformationFailureReason instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason} MessageTransformationFailureReason instance - */ - MessageTransformationFailureReason.create = function create(properties) { - return new MessageTransformationFailureReason(properties); - }; - - /** - * Encodes the specified MessageTransformationFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason} message MessageTransformationFailureReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageTransformationFailureReason.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - return writer; - }; - - /** - * Encodes the specified MessageTransformationFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason} message MessageTransformationFailureReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageTransformationFailureReason.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a MessageTransformationFailureReason message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason} MessageTransformationFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageTransformationFailureReason.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a MessageTransformationFailureReason message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason} MessageTransformationFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageTransformationFailureReason.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageTransformationFailureReason message. - * @function verify - * @memberof google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageTransformationFailureReason.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - return null; - }; - - /** - * Creates a MessageTransformationFailureReason message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason} MessageTransformationFailureReason - */ - MessageTransformationFailureReason.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason) - return object; - return new $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason(); - }; - - /** - * Creates a plain object from a MessageTransformationFailureReason message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason} message MessageTransformationFailureReason - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageTransformationFailureReason.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MessageTransformationFailureReason to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason - * @instance - * @returns {Object.} JSON object - */ - MessageTransformationFailureReason.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageTransformationFailureReason - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageTransformationFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason"; - }; - - return MessageTransformationFailureReason; - })(); - - IngestionFailureEvent.CloudStorageFailure = (function() { - - /** - * Properties of a CloudStorageFailure. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @interface ICloudStorageFailure - * @property {string|null} [bucket] CloudStorageFailure bucket - * @property {string|null} [objectName] CloudStorageFailure objectName - * @property {number|Long|null} [objectGeneration] CloudStorageFailure objectGeneration - * @property {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason|null} [avroFailureReason] CloudStorageFailure avroFailureReason - * @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] CloudStorageFailure apiViolationReason - * @property {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null} [schemaViolationReason] CloudStorageFailure schemaViolationReason - * @property {google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null} [messageTransformationFailureReason] CloudStorageFailure messageTransformationFailureReason - */ - - /** - * Constructs a new CloudStorageFailure. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @classdesc Represents a CloudStorageFailure. - * @implements ICloudStorageFailure - * @constructor - * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure=} [properties] Properties to set - */ - function CloudStorageFailure(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudStorageFailure bucket. - * @member {string} bucket - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @instance - */ - CloudStorageFailure.prototype.bucket = ""; - - /** - * CloudStorageFailure objectName. - * @member {string} objectName - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @instance - */ - CloudStorageFailure.prototype.objectName = ""; - - /** - * CloudStorageFailure objectGeneration. - * @member {number|Long} objectGeneration - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @instance - */ - CloudStorageFailure.prototype.objectGeneration = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * CloudStorageFailure avroFailureReason. - * @member {google.pubsub.v1.IngestionFailureEvent.IAvroFailureReason|null|undefined} avroFailureReason - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @instance - */ - CloudStorageFailure.prototype.avroFailureReason = null; - - /** - * CloudStorageFailure apiViolationReason. - * @member {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null|undefined} apiViolationReason - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @instance - */ - CloudStorageFailure.prototype.apiViolationReason = null; - - /** - * CloudStorageFailure schemaViolationReason. - * @member {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null|undefined} schemaViolationReason - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @instance - */ - CloudStorageFailure.prototype.schemaViolationReason = null; - - /** - * CloudStorageFailure messageTransformationFailureReason. - * @member {google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null|undefined} messageTransformationFailureReason - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @instance - */ - CloudStorageFailure.prototype.messageTransformationFailureReason = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CloudStorageFailure reason. - * @member {"avroFailureReason"|"apiViolationReason"|"schemaViolationReason"|"messageTransformationFailureReason"|undefined} reason - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @instance - */ - Object.defineProperty(CloudStorageFailure.prototype, "reason", { - get: $util.oneOfGetter($oneOfFields = ["avroFailureReason", "apiViolationReason", "schemaViolationReason", "messageTransformationFailureReason"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CloudStorageFailure instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure instance - */ - CloudStorageFailure.create = function create(properties) { - return new CloudStorageFailure(properties); - }; - - /** - * Encodes the specified CloudStorageFailure message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure} message CloudStorageFailure message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudStorageFailure.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); - if (message.objectName != null && Object.hasOwnProperty.call(message, "objectName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.objectName); - if (message.objectGeneration != null && Object.hasOwnProperty.call(message, "objectGeneration")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.objectGeneration); - if (message.avroFailureReason != null && Object.hasOwnProperty.call(message, "avroFailureReason")) - $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.encode(message.avroFailureReason, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); - if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) - $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); - if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason")) - $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.encode(message.schemaViolationReason, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); - if (message.messageTransformationFailureReason != null && Object.hasOwnProperty.call(message, "messageTransformationFailureReason")) - $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.encode(message.messageTransformationFailureReason, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified CloudStorageFailure message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.ICloudStorageFailure} message CloudStorageFailure message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudStorageFailure.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a CloudStorageFailure message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudStorageFailure.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.bucket = reader.string(); - break; - } - case 2: { - message.objectName = reader.string(); - break; - } - case 3: { - message.objectGeneration = reader.int64(); - break; - } - case 5: { - message.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 6: { - message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 7: { - message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 8: { - message.messageTransformationFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a CloudStorageFailure message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudStorageFailure.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudStorageFailure message. - * @function verify - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudStorageFailure.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - if (!$util.isString(message.bucket)) - return "bucket: string expected"; - if (message.objectName != null && Object.hasOwnProperty.call(message, "objectName")) - if (!$util.isString(message.objectName)) - return "objectName: string expected"; - if (message.objectGeneration != null && Object.hasOwnProperty.call(message, "objectGeneration")) - if (!$util.isInteger(message.objectGeneration) && !(message.objectGeneration && $util.isInteger(message.objectGeneration.low) && $util.isInteger(message.objectGeneration.high))) - return "objectGeneration: integer|Long expected"; - if (message.avroFailureReason != null && Object.hasOwnProperty.call(message, "avroFailureReason")) { - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.verify(message.avroFailureReason, long + 1); - if (error) - return "avroFailureReason." + error; - } - } - if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) { - if (properties.reason === 1) - return "reason: multiple values"; - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify(message.apiViolationReason, long + 1); - if (error) - return "apiViolationReason." + error; - } - } - if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason")) { - if (properties.reason === 1) - return "reason: multiple values"; - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify(message.schemaViolationReason, long + 1); - if (error) - return "schemaViolationReason." + error; - } - } - if (message.messageTransformationFailureReason != null && Object.hasOwnProperty.call(message, "messageTransformationFailureReason")) { - if (properties.reason === 1) - return "reason: multiple values"; - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.verify(message.messageTransformationFailureReason, long + 1); - if (error) - return "messageTransformationFailureReason." + error; - } - } - return null; - }; - - /** - * Creates a CloudStorageFailure message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} CloudStorageFailure - */ - CloudStorageFailure.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure(); - if (object.bucket != null) - message.bucket = String(object.bucket); - if (object.objectName != null) - message.objectName = String(object.objectName); - if (object.objectGeneration != null) - if ($util.Long) - message.objectGeneration = $util.Long.fromValue(object.objectGeneration, false); - else if (typeof object.objectGeneration === "string") - message.objectGeneration = parseInt(object.objectGeneration, 10); - else if (typeof object.objectGeneration === "number") - message.objectGeneration = object.objectGeneration; - else if (typeof object.objectGeneration === "object") - message.objectGeneration = new $util.LongBits(object.objectGeneration.low >>> 0, object.objectGeneration.high >>> 0).toNumber(); - if (object.avroFailureReason != null) { - if (!$util.isObject(object.avroFailureReason)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.avroFailureReason: object expected"); - message.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.fromObject(object.avroFailureReason, long + 1); - } - if (object.apiViolationReason != null) { - if (!$util.isObject(object.apiViolationReason)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.apiViolationReason: object expected"); - message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason, long + 1); - } - if (object.schemaViolationReason != null) { - if (!$util.isObject(object.schemaViolationReason)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.schemaViolationReason: object expected"); - message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.fromObject(object.schemaViolationReason, long + 1); - } - if (object.messageTransformationFailureReason != null) { - if (!$util.isObject(object.messageTransformationFailureReason)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure.messageTransformationFailureReason: object expected"); - message.messageTransformationFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.fromObject(object.messageTransformationFailureReason, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a CloudStorageFailure message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure} message CloudStorageFailure - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudStorageFailure.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.bucket = ""; - object.objectName = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.objectGeneration = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; - } else - object.objectGeneration = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - } - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - object.bucket = message.bucket; - if (message.objectName != null && Object.hasOwnProperty.call(message, "objectName")) - object.objectName = message.objectName; - if (message.objectGeneration != null && Object.hasOwnProperty.call(message, "objectGeneration")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.objectGeneration = typeof message.objectGeneration === "number" ? BigInt(message.objectGeneration) : $util.Long.fromBits(message.objectGeneration.low >>> 0, message.objectGeneration.high >>> 0, false).toBigInt(); - else if (typeof message.objectGeneration === "number") - object.objectGeneration = options.longs === String ? String(message.objectGeneration) : message.objectGeneration; - else - object.objectGeneration = options.longs === String ? $util.Long.prototype.toString.call(message.objectGeneration) : options.longs === Number ? new $util.LongBits(message.objectGeneration.low >>> 0, message.objectGeneration.high >>> 0).toNumber() : message.objectGeneration; - if (message.avroFailureReason != null && Object.hasOwnProperty.call(message, "avroFailureReason")) { - object.avroFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.AvroFailureReason.toObject(message.avroFailureReason, options, q + 1); - if (options.oneofs) - object.reason = "avroFailureReason"; - } - if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) { - object.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.toObject(message.apiViolationReason, options, q + 1); - if (options.oneofs) - object.reason = "apiViolationReason"; - } - if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason")) { - object.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.toObject(message.schemaViolationReason, options, q + 1); - if (options.oneofs) - object.reason = "schemaViolationReason"; - } - if (message.messageTransformationFailureReason != null && Object.hasOwnProperty.call(message, "messageTransformationFailureReason")) { - object.messageTransformationFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.toObject(message.messageTransformationFailureReason, options, q + 1); - if (options.oneofs) - object.reason = "messageTransformationFailureReason"; - } - return object; - }; - - /** - * Converts this CloudStorageFailure to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @instance - * @returns {Object.} JSON object - */ - CloudStorageFailure.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudStorageFailure - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudStorageFailure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.CloudStorageFailure"; - }; - - return CloudStorageFailure; - })(); - - IngestionFailureEvent.AwsMskFailureReason = (function() { - - /** - * Properties of an AwsMskFailureReason. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @interface IAwsMskFailureReason - * @property {string|null} [clusterArn] AwsMskFailureReason clusterArn - * @property {string|null} [kafkaTopic] AwsMskFailureReason kafkaTopic - * @property {number|Long|null} [partitionId] AwsMskFailureReason partitionId - * @property {number|Long|null} [offset] AwsMskFailureReason offset - * @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] AwsMskFailureReason apiViolationReason - * @property {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null} [schemaViolationReason] AwsMskFailureReason schemaViolationReason - * @property {google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null} [messageTransformationFailureReason] AwsMskFailureReason messageTransformationFailureReason - */ - - /** - * Constructs a new AwsMskFailureReason. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @classdesc Represents an AwsMskFailureReason. - * @implements IAwsMskFailureReason - * @constructor - * @param {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason=} [properties] Properties to set - */ - function AwsMskFailureReason(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * AwsMskFailureReason clusterArn. - * @member {string} clusterArn - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @instance - */ - AwsMskFailureReason.prototype.clusterArn = ""; - - /** - * AwsMskFailureReason kafkaTopic. - * @member {string} kafkaTopic - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @instance - */ - AwsMskFailureReason.prototype.kafkaTopic = ""; - - /** - * AwsMskFailureReason partitionId. - * @member {number|Long} partitionId - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @instance - */ - AwsMskFailureReason.prototype.partitionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * AwsMskFailureReason offset. - * @member {number|Long} offset - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @instance - */ - AwsMskFailureReason.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * AwsMskFailureReason apiViolationReason. - * @member {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null|undefined} apiViolationReason - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @instance - */ - AwsMskFailureReason.prototype.apiViolationReason = null; - - /** - * AwsMskFailureReason schemaViolationReason. - * @member {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null|undefined} schemaViolationReason - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @instance - */ - AwsMskFailureReason.prototype.schemaViolationReason = null; - - /** - * AwsMskFailureReason messageTransformationFailureReason. - * @member {google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null|undefined} messageTransformationFailureReason - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @instance - */ - AwsMskFailureReason.prototype.messageTransformationFailureReason = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AwsMskFailureReason reason. - * @member {"apiViolationReason"|"schemaViolationReason"|"messageTransformationFailureReason"|undefined} reason - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @instance - */ - Object.defineProperty(AwsMskFailureReason.prototype, "reason", { - get: $util.oneOfGetter($oneOfFields = ["apiViolationReason", "schemaViolationReason", "messageTransformationFailureReason"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AwsMskFailureReason instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} AwsMskFailureReason instance - */ - AwsMskFailureReason.create = function create(properties) { - return new AwsMskFailureReason(properties); - }; - - /** - * Encodes the specified AwsMskFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason} message AwsMskFailureReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AwsMskFailureReason.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.clusterArn != null && Object.hasOwnProperty.call(message, "clusterArn")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.clusterArn); - if (message.kafkaTopic != null && Object.hasOwnProperty.call(message, "kafkaTopic")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.kafkaTopic); - if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.partitionId); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.offset); - if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) - $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); - if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason")) - $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.encode(message.schemaViolationReason, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); - if (message.messageTransformationFailureReason != null && Object.hasOwnProperty.call(message, "messageTransformationFailureReason")) - $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.encode(message.messageTransformationFailureReason, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified AwsMskFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IAwsMskFailureReason} message AwsMskFailureReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AwsMskFailureReason.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an AwsMskFailureReason message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} AwsMskFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AwsMskFailureReason.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.clusterArn = reader.string(); - break; - } - case 2: { - message.kafkaTopic = reader.string(); - break; - } - case 3: { - message.partitionId = reader.int64(); - break; - } - case 4: { - message.offset = reader.int64(); - break; - } - case 5: { - message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 6: { - message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 7: { - message.messageTransformationFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an AwsMskFailureReason message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} AwsMskFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AwsMskFailureReason.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AwsMskFailureReason message. - * @function verify - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AwsMskFailureReason.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.clusterArn != null && Object.hasOwnProperty.call(message, "clusterArn")) - if (!$util.isString(message.clusterArn)) - return "clusterArn: string expected"; - if (message.kafkaTopic != null && Object.hasOwnProperty.call(message, "kafkaTopic")) - if (!$util.isString(message.kafkaTopic)) - return "kafkaTopic: string expected"; - if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId")) - if (!$util.isInteger(message.partitionId) && !(message.partitionId && $util.isInteger(message.partitionId.low) && $util.isInteger(message.partitionId.high))) - return "partitionId: integer|Long expected"; - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) - return "offset: integer|Long expected"; - if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) { - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify(message.apiViolationReason, long + 1); - if (error) - return "apiViolationReason." + error; - } - } - if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason")) { - if (properties.reason === 1) - return "reason: multiple values"; - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify(message.schemaViolationReason, long + 1); - if (error) - return "schemaViolationReason." + error; - } - } - if (message.messageTransformationFailureReason != null && Object.hasOwnProperty.call(message, "messageTransformationFailureReason")) { - if (properties.reason === 1) - return "reason: multiple values"; - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.verify(message.messageTransformationFailureReason, long + 1); - if (error) - return "messageTransformationFailureReason." + error; - } - } - return null; - }; - - /** - * Creates an AwsMskFailureReason message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} AwsMskFailureReason - */ - AwsMskFailureReason.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason(); - if (object.clusterArn != null) - message.clusterArn = String(object.clusterArn); - if (object.kafkaTopic != null) - message.kafkaTopic = String(object.kafkaTopic); - if (object.partitionId != null) - if ($util.Long) - message.partitionId = $util.Long.fromValue(object.partitionId, false); - else if (typeof object.partitionId === "string") - message.partitionId = parseInt(object.partitionId, 10); - else if (typeof object.partitionId === "number") - message.partitionId = object.partitionId; - else if (typeof object.partitionId === "object") - message.partitionId = new $util.LongBits(object.partitionId.low >>> 0, object.partitionId.high >>> 0).toNumber(); - if (object.offset != null) - if ($util.Long) - message.offset = $util.Long.fromValue(object.offset, false); - else if (typeof object.offset === "string") - message.offset = parseInt(object.offset, 10); - else if (typeof object.offset === "number") - message.offset = object.offset; - else if (typeof object.offset === "object") - message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); - if (object.apiViolationReason != null) { - if (!$util.isObject(object.apiViolationReason)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.apiViolationReason: object expected"); - message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason, long + 1); - } - if (object.schemaViolationReason != null) { - if (!$util.isObject(object.schemaViolationReason)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.schemaViolationReason: object expected"); - message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.fromObject(object.schemaViolationReason, long + 1); - } - if (object.messageTransformationFailureReason != null) { - if (!$util.isObject(object.messageTransformationFailureReason)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason.messageTransformationFailureReason: object expected"); - message.messageTransformationFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.fromObject(object.messageTransformationFailureReason, long + 1); - } - return message; - }; - - /** - * Creates a plain object from an AwsMskFailureReason message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason} message AwsMskFailureReason - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AwsMskFailureReason.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.clusterArn = ""; - object.kafkaTopic = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.partitionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; - } else - object.partitionId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; - } else - object.offset = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - } - if (message.clusterArn != null && Object.hasOwnProperty.call(message, "clusterArn")) - object.clusterArn = message.clusterArn; - if (message.kafkaTopic != null && Object.hasOwnProperty.call(message, "kafkaTopic")) - object.kafkaTopic = message.kafkaTopic; - if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.partitionId = typeof message.partitionId === "number" ? BigInt(message.partitionId) : $util.Long.fromBits(message.partitionId.low >>> 0, message.partitionId.high >>> 0, false).toBigInt(); - else if (typeof message.partitionId === "number") - object.partitionId = options.longs === String ? String(message.partitionId) : message.partitionId; - else - object.partitionId = options.longs === String ? $util.Long.prototype.toString.call(message.partitionId) : options.longs === Number ? new $util.LongBits(message.partitionId.low >>> 0, message.partitionId.high >>> 0).toNumber() : message.partitionId; - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.offset = typeof message.offset === "number" ? BigInt(message.offset) : $util.Long.fromBits(message.offset.low >>> 0, message.offset.high >>> 0, false).toBigInt(); - else if (typeof message.offset === "number") - object.offset = options.longs === String ? String(message.offset) : message.offset; - else - object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; - if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) { - object.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.toObject(message.apiViolationReason, options, q + 1); - if (options.oneofs) - object.reason = "apiViolationReason"; - } - if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason")) { - object.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.toObject(message.schemaViolationReason, options, q + 1); - if (options.oneofs) - object.reason = "schemaViolationReason"; - } - if (message.messageTransformationFailureReason != null && Object.hasOwnProperty.call(message, "messageTransformationFailureReason")) { - object.messageTransformationFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.toObject(message.messageTransformationFailureReason, options, q + 1); - if (options.oneofs) - object.reason = "messageTransformationFailureReason"; - } - return object; - }; - - /** - * Converts this AwsMskFailureReason to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @instance - * @returns {Object.} JSON object - */ - AwsMskFailureReason.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AwsMskFailureReason - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AwsMskFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.AwsMskFailureReason"; - }; - - return AwsMskFailureReason; - })(); - - IngestionFailureEvent.AzureEventHubsFailureReason = (function() { - - /** - * Properties of an AzureEventHubsFailureReason. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @interface IAzureEventHubsFailureReason - * @property {string|null} [namespace] AzureEventHubsFailureReason namespace - * @property {string|null} [eventHub] AzureEventHubsFailureReason eventHub - * @property {number|Long|null} [partitionId] AzureEventHubsFailureReason partitionId - * @property {number|Long|null} [offset] AzureEventHubsFailureReason offset - * @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] AzureEventHubsFailureReason apiViolationReason - * @property {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null} [schemaViolationReason] AzureEventHubsFailureReason schemaViolationReason - * @property {google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null} [messageTransformationFailureReason] AzureEventHubsFailureReason messageTransformationFailureReason - */ - - /** - * Constructs a new AzureEventHubsFailureReason. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @classdesc Represents an AzureEventHubsFailureReason. - * @implements IAzureEventHubsFailureReason - * @constructor - * @param {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason=} [properties] Properties to set - */ - function AzureEventHubsFailureReason(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * AzureEventHubsFailureReason namespace. - * @member {string} namespace - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @instance - */ - AzureEventHubsFailureReason.prototype.namespace = ""; - - /** - * AzureEventHubsFailureReason eventHub. - * @member {string} eventHub - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @instance - */ - AzureEventHubsFailureReason.prototype.eventHub = ""; - - /** - * AzureEventHubsFailureReason partitionId. - * @member {number|Long} partitionId - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @instance - */ - AzureEventHubsFailureReason.prototype.partitionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * AzureEventHubsFailureReason offset. - * @member {number|Long} offset - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @instance - */ - AzureEventHubsFailureReason.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * AzureEventHubsFailureReason apiViolationReason. - * @member {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null|undefined} apiViolationReason - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @instance - */ - AzureEventHubsFailureReason.prototype.apiViolationReason = null; - - /** - * AzureEventHubsFailureReason schemaViolationReason. - * @member {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null|undefined} schemaViolationReason - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @instance - */ - AzureEventHubsFailureReason.prototype.schemaViolationReason = null; - - /** - * AzureEventHubsFailureReason messageTransformationFailureReason. - * @member {google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null|undefined} messageTransformationFailureReason - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @instance - */ - AzureEventHubsFailureReason.prototype.messageTransformationFailureReason = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AzureEventHubsFailureReason reason. - * @member {"apiViolationReason"|"schemaViolationReason"|"messageTransformationFailureReason"|undefined} reason - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @instance - */ - Object.defineProperty(AzureEventHubsFailureReason.prototype, "reason", { - get: $util.oneOfGetter($oneOfFields = ["apiViolationReason", "schemaViolationReason", "messageTransformationFailureReason"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AzureEventHubsFailureReason instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} AzureEventHubsFailureReason instance - */ - AzureEventHubsFailureReason.create = function create(properties) { - return new AzureEventHubsFailureReason(properties); - }; - - /** - * Encodes the specified AzureEventHubsFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason} message AzureEventHubsFailureReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AzureEventHubsFailureReason.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namespace); - if (message.eventHub != null && Object.hasOwnProperty.call(message, "eventHub")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.eventHub); - if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.partitionId); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.offset); - if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) - $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); - if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason")) - $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.encode(message.schemaViolationReason, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); - if (message.messageTransformationFailureReason != null && Object.hasOwnProperty.call(message, "messageTransformationFailureReason")) - $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.encode(message.messageTransformationFailureReason, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified AzureEventHubsFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IAzureEventHubsFailureReason} message AzureEventHubsFailureReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AzureEventHubsFailureReason.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an AzureEventHubsFailureReason message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} AzureEventHubsFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AzureEventHubsFailureReason.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.namespace = reader.string(); - break; - } - case 2: { - message.eventHub = reader.string(); - break; - } - case 3: { - message.partitionId = reader.int64(); - break; - } - case 4: { - message.offset = reader.int64(); - break; - } - case 5: { - message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 6: { - message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 7: { - message.messageTransformationFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an AzureEventHubsFailureReason message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} AzureEventHubsFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AzureEventHubsFailureReason.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AzureEventHubsFailureReason message. - * @function verify - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AzureEventHubsFailureReason.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace")) - if (!$util.isString(message.namespace)) - return "namespace: string expected"; - if (message.eventHub != null && Object.hasOwnProperty.call(message, "eventHub")) - if (!$util.isString(message.eventHub)) - return "eventHub: string expected"; - if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId")) - if (!$util.isInteger(message.partitionId) && !(message.partitionId && $util.isInteger(message.partitionId.low) && $util.isInteger(message.partitionId.high))) - return "partitionId: integer|Long expected"; - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) - return "offset: integer|Long expected"; - if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) { - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify(message.apiViolationReason, long + 1); - if (error) - return "apiViolationReason." + error; - } - } - if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason")) { - if (properties.reason === 1) - return "reason: multiple values"; - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify(message.schemaViolationReason, long + 1); - if (error) - return "schemaViolationReason." + error; - } - } - if (message.messageTransformationFailureReason != null && Object.hasOwnProperty.call(message, "messageTransformationFailureReason")) { - if (properties.reason === 1) - return "reason: multiple values"; - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.verify(message.messageTransformationFailureReason, long + 1); - if (error) - return "messageTransformationFailureReason." + error; - } - } - return null; - }; - - /** - * Creates an AzureEventHubsFailureReason message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} AzureEventHubsFailureReason - */ - AzureEventHubsFailureReason.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason(); - if (object.namespace != null) - message.namespace = String(object.namespace); - if (object.eventHub != null) - message.eventHub = String(object.eventHub); - if (object.partitionId != null) - if ($util.Long) - message.partitionId = $util.Long.fromValue(object.partitionId, false); - else if (typeof object.partitionId === "string") - message.partitionId = parseInt(object.partitionId, 10); - else if (typeof object.partitionId === "number") - message.partitionId = object.partitionId; - else if (typeof object.partitionId === "object") - message.partitionId = new $util.LongBits(object.partitionId.low >>> 0, object.partitionId.high >>> 0).toNumber(); - if (object.offset != null) - if ($util.Long) - message.offset = $util.Long.fromValue(object.offset, false); - else if (typeof object.offset === "string") - message.offset = parseInt(object.offset, 10); - else if (typeof object.offset === "number") - message.offset = object.offset; - else if (typeof object.offset === "object") - message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); - if (object.apiViolationReason != null) { - if (!$util.isObject(object.apiViolationReason)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.apiViolationReason: object expected"); - message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason, long + 1); - } - if (object.schemaViolationReason != null) { - if (!$util.isObject(object.schemaViolationReason)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.schemaViolationReason: object expected"); - message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.fromObject(object.schemaViolationReason, long + 1); - } - if (object.messageTransformationFailureReason != null) { - if (!$util.isObject(object.messageTransformationFailureReason)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason.messageTransformationFailureReason: object expected"); - message.messageTransformationFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.fromObject(object.messageTransformationFailureReason, long + 1); - } - return message; - }; - - /** - * Creates a plain object from an AzureEventHubsFailureReason message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason} message AzureEventHubsFailureReason - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AzureEventHubsFailureReason.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.namespace = ""; - object.eventHub = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.partitionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; - } else - object.partitionId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; - } else - object.offset = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - } - if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace")) - object.namespace = message.namespace; - if (message.eventHub != null && Object.hasOwnProperty.call(message, "eventHub")) - object.eventHub = message.eventHub; - if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.partitionId = typeof message.partitionId === "number" ? BigInt(message.partitionId) : $util.Long.fromBits(message.partitionId.low >>> 0, message.partitionId.high >>> 0, false).toBigInt(); - else if (typeof message.partitionId === "number") - object.partitionId = options.longs === String ? String(message.partitionId) : message.partitionId; - else - object.partitionId = options.longs === String ? $util.Long.prototype.toString.call(message.partitionId) : options.longs === Number ? new $util.LongBits(message.partitionId.low >>> 0, message.partitionId.high >>> 0).toNumber() : message.partitionId; - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.offset = typeof message.offset === "number" ? BigInt(message.offset) : $util.Long.fromBits(message.offset.low >>> 0, message.offset.high >>> 0, false).toBigInt(); - else if (typeof message.offset === "number") - object.offset = options.longs === String ? String(message.offset) : message.offset; - else - object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; - if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) { - object.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.toObject(message.apiViolationReason, options, q + 1); - if (options.oneofs) - object.reason = "apiViolationReason"; - } - if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason")) { - object.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.toObject(message.schemaViolationReason, options, q + 1); - if (options.oneofs) - object.reason = "schemaViolationReason"; - } - if (message.messageTransformationFailureReason != null && Object.hasOwnProperty.call(message, "messageTransformationFailureReason")) { - object.messageTransformationFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.toObject(message.messageTransformationFailureReason, options, q + 1); - if (options.oneofs) - object.reason = "messageTransformationFailureReason"; - } - return object; - }; - - /** - * Converts this AzureEventHubsFailureReason to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @instance - * @returns {Object.} JSON object - */ - AzureEventHubsFailureReason.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AzureEventHubsFailureReason - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AzureEventHubsFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.AzureEventHubsFailureReason"; - }; - - return AzureEventHubsFailureReason; - })(); - - IngestionFailureEvent.ConfluentCloudFailureReason = (function() { - - /** - * Properties of a ConfluentCloudFailureReason. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @interface IConfluentCloudFailureReason - * @property {string|null} [clusterId] ConfluentCloudFailureReason clusterId - * @property {string|null} [kafkaTopic] ConfluentCloudFailureReason kafkaTopic - * @property {number|Long|null} [partitionId] ConfluentCloudFailureReason partitionId - * @property {number|Long|null} [offset] ConfluentCloudFailureReason offset - * @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] ConfluentCloudFailureReason apiViolationReason - * @property {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null} [schemaViolationReason] ConfluentCloudFailureReason schemaViolationReason - * @property {google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null} [messageTransformationFailureReason] ConfluentCloudFailureReason messageTransformationFailureReason - */ - - /** - * Constructs a new ConfluentCloudFailureReason. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @classdesc Represents a ConfluentCloudFailureReason. - * @implements IConfluentCloudFailureReason - * @constructor - * @param {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason=} [properties] Properties to set - */ - function ConfluentCloudFailureReason(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ConfluentCloudFailureReason clusterId. - * @member {string} clusterId - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @instance - */ - ConfluentCloudFailureReason.prototype.clusterId = ""; - - /** - * ConfluentCloudFailureReason kafkaTopic. - * @member {string} kafkaTopic - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @instance - */ - ConfluentCloudFailureReason.prototype.kafkaTopic = ""; - - /** - * ConfluentCloudFailureReason partitionId. - * @member {number|Long} partitionId - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @instance - */ - ConfluentCloudFailureReason.prototype.partitionId = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ConfluentCloudFailureReason offset. - * @member {number|Long} offset - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @instance - */ - ConfluentCloudFailureReason.prototype.offset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * ConfluentCloudFailureReason apiViolationReason. - * @member {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null|undefined} apiViolationReason - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @instance - */ - ConfluentCloudFailureReason.prototype.apiViolationReason = null; - - /** - * ConfluentCloudFailureReason schemaViolationReason. - * @member {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null|undefined} schemaViolationReason - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @instance - */ - ConfluentCloudFailureReason.prototype.schemaViolationReason = null; - - /** - * ConfluentCloudFailureReason messageTransformationFailureReason. - * @member {google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null|undefined} messageTransformationFailureReason - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @instance - */ - ConfluentCloudFailureReason.prototype.messageTransformationFailureReason = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ConfluentCloudFailureReason reason. - * @member {"apiViolationReason"|"schemaViolationReason"|"messageTransformationFailureReason"|undefined} reason - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @instance - */ - Object.defineProperty(ConfluentCloudFailureReason.prototype, "reason", { - get: $util.oneOfGetter($oneOfFields = ["apiViolationReason", "schemaViolationReason", "messageTransformationFailureReason"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ConfluentCloudFailureReason instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} ConfluentCloudFailureReason instance - */ - ConfluentCloudFailureReason.create = function create(properties) { - return new ConfluentCloudFailureReason(properties); - }; - - /** - * Encodes the specified ConfluentCloudFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason} message ConfluentCloudFailureReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfluentCloudFailureReason.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.clusterId); - if (message.kafkaTopic != null && Object.hasOwnProperty.call(message, "kafkaTopic")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.kafkaTopic); - if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.partitionId); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.offset); - if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) - $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); - if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason")) - $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.encode(message.schemaViolationReason, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); - if (message.messageTransformationFailureReason != null && Object.hasOwnProperty.call(message, "messageTransformationFailureReason")) - $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.encode(message.messageTransformationFailureReason, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified ConfluentCloudFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IConfluentCloudFailureReason} message ConfluentCloudFailureReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ConfluentCloudFailureReason.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ConfluentCloudFailureReason message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} ConfluentCloudFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfluentCloudFailureReason.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.clusterId = reader.string(); - break; - } - case 2: { - message.kafkaTopic = reader.string(); - break; - } - case 3: { - message.partitionId = reader.int64(); - break; - } - case 4: { - message.offset = reader.int64(); - break; - } - case 5: { - message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 6: { - message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 7: { - message.messageTransformationFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ConfluentCloudFailureReason message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} ConfluentCloudFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ConfluentCloudFailureReason.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ConfluentCloudFailureReason message. - * @function verify - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ConfluentCloudFailureReason.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - if (!$util.isString(message.clusterId)) - return "clusterId: string expected"; - if (message.kafkaTopic != null && Object.hasOwnProperty.call(message, "kafkaTopic")) - if (!$util.isString(message.kafkaTopic)) - return "kafkaTopic: string expected"; - if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId")) - if (!$util.isInteger(message.partitionId) && !(message.partitionId && $util.isInteger(message.partitionId.low) && $util.isInteger(message.partitionId.high))) - return "partitionId: integer|Long expected"; - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - if (!$util.isInteger(message.offset) && !(message.offset && $util.isInteger(message.offset.low) && $util.isInteger(message.offset.high))) - return "offset: integer|Long expected"; - if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) { - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify(message.apiViolationReason, long + 1); - if (error) - return "apiViolationReason." + error; - } - } - if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason")) { - if (properties.reason === 1) - return "reason: multiple values"; - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify(message.schemaViolationReason, long + 1); - if (error) - return "schemaViolationReason." + error; - } - } - if (message.messageTransformationFailureReason != null && Object.hasOwnProperty.call(message, "messageTransformationFailureReason")) { - if (properties.reason === 1) - return "reason: multiple values"; - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.verify(message.messageTransformationFailureReason, long + 1); - if (error) - return "messageTransformationFailureReason." + error; - } - } - return null; - }; - - /** - * Creates a ConfluentCloudFailureReason message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} ConfluentCloudFailureReason - */ - ConfluentCloudFailureReason.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason(); - if (object.clusterId != null) - message.clusterId = String(object.clusterId); - if (object.kafkaTopic != null) - message.kafkaTopic = String(object.kafkaTopic); - if (object.partitionId != null) - if ($util.Long) - message.partitionId = $util.Long.fromValue(object.partitionId, false); - else if (typeof object.partitionId === "string") - message.partitionId = parseInt(object.partitionId, 10); - else if (typeof object.partitionId === "number") - message.partitionId = object.partitionId; - else if (typeof object.partitionId === "object") - message.partitionId = new $util.LongBits(object.partitionId.low >>> 0, object.partitionId.high >>> 0).toNumber(); - if (object.offset != null) - if ($util.Long) - message.offset = $util.Long.fromValue(object.offset, false); - else if (typeof object.offset === "string") - message.offset = parseInt(object.offset, 10); - else if (typeof object.offset === "number") - message.offset = object.offset; - else if (typeof object.offset === "object") - message.offset = new $util.LongBits(object.offset.low >>> 0, object.offset.high >>> 0).toNumber(); - if (object.apiViolationReason != null) { - if (!$util.isObject(object.apiViolationReason)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.apiViolationReason: object expected"); - message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason, long + 1); - } - if (object.schemaViolationReason != null) { - if (!$util.isObject(object.schemaViolationReason)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.schemaViolationReason: object expected"); - message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.fromObject(object.schemaViolationReason, long + 1); - } - if (object.messageTransformationFailureReason != null) { - if (!$util.isObject(object.messageTransformationFailureReason)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason.messageTransformationFailureReason: object expected"); - message.messageTransformationFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.fromObject(object.messageTransformationFailureReason, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a ConfluentCloudFailureReason message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason} message ConfluentCloudFailureReason - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ConfluentCloudFailureReason.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.clusterId = ""; - object.kafkaTopic = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.partitionId = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; - } else - object.partitionId = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.offset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; - } else - object.offset = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - } - if (message.clusterId != null && Object.hasOwnProperty.call(message, "clusterId")) - object.clusterId = message.clusterId; - if (message.kafkaTopic != null && Object.hasOwnProperty.call(message, "kafkaTopic")) - object.kafkaTopic = message.kafkaTopic; - if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.partitionId = typeof message.partitionId === "number" ? BigInt(message.partitionId) : $util.Long.fromBits(message.partitionId.low >>> 0, message.partitionId.high >>> 0, false).toBigInt(); - else if (typeof message.partitionId === "number") - object.partitionId = options.longs === String ? String(message.partitionId) : message.partitionId; - else - object.partitionId = options.longs === String ? $util.Long.prototype.toString.call(message.partitionId) : options.longs === Number ? new $util.LongBits(message.partitionId.low >>> 0, message.partitionId.high >>> 0).toNumber() : message.partitionId; - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.offset = typeof message.offset === "number" ? BigInt(message.offset) : $util.Long.fromBits(message.offset.low >>> 0, message.offset.high >>> 0, false).toBigInt(); - else if (typeof message.offset === "number") - object.offset = options.longs === String ? String(message.offset) : message.offset; - else - object.offset = options.longs === String ? $util.Long.prototype.toString.call(message.offset) : options.longs === Number ? new $util.LongBits(message.offset.low >>> 0, message.offset.high >>> 0).toNumber() : message.offset; - if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) { - object.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.toObject(message.apiViolationReason, options, q + 1); - if (options.oneofs) - object.reason = "apiViolationReason"; - } - if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason")) { - object.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.toObject(message.schemaViolationReason, options, q + 1); - if (options.oneofs) - object.reason = "schemaViolationReason"; - } - if (message.messageTransformationFailureReason != null && Object.hasOwnProperty.call(message, "messageTransformationFailureReason")) { - object.messageTransformationFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.toObject(message.messageTransformationFailureReason, options, q + 1); - if (options.oneofs) - object.reason = "messageTransformationFailureReason"; - } - return object; - }; - - /** - * Converts this ConfluentCloudFailureReason to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @instance - * @returns {Object.} JSON object - */ - ConfluentCloudFailureReason.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ConfluentCloudFailureReason - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ConfluentCloudFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.ConfluentCloudFailureReason"; - }; - - return ConfluentCloudFailureReason; - })(); - - IngestionFailureEvent.AwsKinesisFailureReason = (function() { - - /** - * Properties of an AwsKinesisFailureReason. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @interface IAwsKinesisFailureReason - * @property {string|null} [streamArn] AwsKinesisFailureReason streamArn - * @property {string|null} [partitionKey] AwsKinesisFailureReason partitionKey - * @property {string|null} [sequenceNumber] AwsKinesisFailureReason sequenceNumber - * @property {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null} [schemaViolationReason] AwsKinesisFailureReason schemaViolationReason - * @property {google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null} [messageTransformationFailureReason] AwsKinesisFailureReason messageTransformationFailureReason - * @property {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null} [apiViolationReason] AwsKinesisFailureReason apiViolationReason - */ - - /** - * Constructs a new AwsKinesisFailureReason. - * @memberof google.pubsub.v1.IngestionFailureEvent - * @classdesc Represents an AwsKinesisFailureReason. - * @implements IAwsKinesisFailureReason - * @constructor - * @param {google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason=} [properties] Properties to set - */ - function AwsKinesisFailureReason(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * AwsKinesisFailureReason streamArn. - * @member {string} streamArn - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @instance - */ - AwsKinesisFailureReason.prototype.streamArn = ""; - - /** - * AwsKinesisFailureReason partitionKey. - * @member {string} partitionKey - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @instance - */ - AwsKinesisFailureReason.prototype.partitionKey = ""; - - /** - * AwsKinesisFailureReason sequenceNumber. - * @member {string} sequenceNumber - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @instance - */ - AwsKinesisFailureReason.prototype.sequenceNumber = ""; - - /** - * AwsKinesisFailureReason schemaViolationReason. - * @member {google.pubsub.v1.IngestionFailureEvent.ISchemaViolationReason|null|undefined} schemaViolationReason - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @instance - */ - AwsKinesisFailureReason.prototype.schemaViolationReason = null; - - /** - * AwsKinesisFailureReason messageTransformationFailureReason. - * @member {google.pubsub.v1.IngestionFailureEvent.IMessageTransformationFailureReason|null|undefined} messageTransformationFailureReason - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @instance - */ - AwsKinesisFailureReason.prototype.messageTransformationFailureReason = null; - - /** - * AwsKinesisFailureReason apiViolationReason. - * @member {google.pubsub.v1.IngestionFailureEvent.IApiViolationReason|null|undefined} apiViolationReason - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @instance - */ - AwsKinesisFailureReason.prototype.apiViolationReason = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AwsKinesisFailureReason reason. - * @member {"schemaViolationReason"|"messageTransformationFailureReason"|"apiViolationReason"|undefined} reason - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @instance - */ - Object.defineProperty(AwsKinesisFailureReason.prototype, "reason", { - get: $util.oneOfGetter($oneOfFields = ["schemaViolationReason", "messageTransformationFailureReason", "apiViolationReason"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AwsKinesisFailureReason instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason=} [properties] Properties to set - * @returns {google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason} AwsKinesisFailureReason instance - */ - AwsKinesisFailureReason.create = function create(properties) { - return new AwsKinesisFailureReason(properties); - }; - - /** - * Encodes the specified AwsKinesisFailureReason message. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason} message AwsKinesisFailureReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AwsKinesisFailureReason.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.streamArn != null && Object.hasOwnProperty.call(message, "streamArn")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.streamArn); - if (message.partitionKey != null && Object.hasOwnProperty.call(message, "partitionKey")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.partitionKey); - if (message.sequenceNumber != null && Object.hasOwnProperty.call(message, "sequenceNumber")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.sequenceNumber); - if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason")) - $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.encode(message.schemaViolationReason, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); - if (message.messageTransformationFailureReason != null && Object.hasOwnProperty.call(message, "messageTransformationFailureReason")) - $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.encode(message.messageTransformationFailureReason, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); - if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) - $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.encode(message.apiViolationReason, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified AwsKinesisFailureReason message, length delimited. Does not implicitly {@link google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.IAwsKinesisFailureReason} message AwsKinesisFailureReason message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AwsKinesisFailureReason.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an AwsKinesisFailureReason message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason} AwsKinesisFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AwsKinesisFailureReason.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.streamArn = reader.string(); - break; - } - case 2: { - message.partitionKey = reader.string(); - break; - } - case 3: { - message.sequenceNumber = reader.string(); - break; - } - case 4: { - message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 5: { - message.messageTransformationFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 6: { - message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an AwsKinesisFailureReason message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason} AwsKinesisFailureReason - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AwsKinesisFailureReason.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AwsKinesisFailureReason message. - * @function verify - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AwsKinesisFailureReason.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.streamArn != null && Object.hasOwnProperty.call(message, "streamArn")) - if (!$util.isString(message.streamArn)) - return "streamArn: string expected"; - if (message.partitionKey != null && Object.hasOwnProperty.call(message, "partitionKey")) - if (!$util.isString(message.partitionKey)) - return "partitionKey: string expected"; - if (message.sequenceNumber != null && Object.hasOwnProperty.call(message, "sequenceNumber")) - if (!$util.isString(message.sequenceNumber)) - return "sequenceNumber: string expected"; - if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason")) { - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.verify(message.schemaViolationReason, long + 1); - if (error) - return "schemaViolationReason." + error; - } - } - if (message.messageTransformationFailureReason != null && Object.hasOwnProperty.call(message, "messageTransformationFailureReason")) { - if (properties.reason === 1) - return "reason: multiple values"; - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.verify(message.messageTransformationFailureReason, long + 1); - if (error) - return "messageTransformationFailureReason." + error; - } - } - if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) { - if (properties.reason === 1) - return "reason: multiple values"; - properties.reason = 1; - { - var error = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.verify(message.apiViolationReason, long + 1); - if (error) - return "apiViolationReason." + error; - } - } - return null; - }; - - /** - * Creates an AwsKinesisFailureReason message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason} AwsKinesisFailureReason - */ - AwsKinesisFailureReason.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason(); - if (object.streamArn != null) - message.streamArn = String(object.streamArn); - if (object.partitionKey != null) - message.partitionKey = String(object.partitionKey); - if (object.sequenceNumber != null) - message.sequenceNumber = String(object.sequenceNumber); - if (object.schemaViolationReason != null) { - if (!$util.isObject(object.schemaViolationReason)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.schemaViolationReason: object expected"); - message.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.fromObject(object.schemaViolationReason, long + 1); - } - if (object.messageTransformationFailureReason != null) { - if (!$util.isObject(object.messageTransformationFailureReason)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.messageTransformationFailureReason: object expected"); - message.messageTransformationFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.fromObject(object.messageTransformationFailureReason, long + 1); - } - if (object.apiViolationReason != null) { - if (!$util.isObject(object.apiViolationReason)) - throw TypeError(".google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason.apiViolationReason: object expected"); - message.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.fromObject(object.apiViolationReason, long + 1); - } - return message; - }; - - /** - * Creates a plain object from an AwsKinesisFailureReason message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @static - * @param {google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason} message AwsKinesisFailureReason - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AwsKinesisFailureReason.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.streamArn = ""; - object.partitionKey = ""; - object.sequenceNumber = ""; - } - if (message.streamArn != null && Object.hasOwnProperty.call(message, "streamArn")) - object.streamArn = message.streamArn; - if (message.partitionKey != null && Object.hasOwnProperty.call(message, "partitionKey")) - object.partitionKey = message.partitionKey; - if (message.sequenceNumber != null && Object.hasOwnProperty.call(message, "sequenceNumber")) - object.sequenceNumber = message.sequenceNumber; - if (message.schemaViolationReason != null && Object.hasOwnProperty.call(message, "schemaViolationReason")) { - object.schemaViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.SchemaViolationReason.toObject(message.schemaViolationReason, options, q + 1); - if (options.oneofs) - object.reason = "schemaViolationReason"; - } - if (message.messageTransformationFailureReason != null && Object.hasOwnProperty.call(message, "messageTransformationFailureReason")) { - object.messageTransformationFailureReason = $root.google.pubsub.v1.IngestionFailureEvent.MessageTransformationFailureReason.toObject(message.messageTransformationFailureReason, options, q + 1); - if (options.oneofs) - object.reason = "messageTransformationFailureReason"; - } - if (message.apiViolationReason != null && Object.hasOwnProperty.call(message, "apiViolationReason")) { - object.apiViolationReason = $root.google.pubsub.v1.IngestionFailureEvent.ApiViolationReason.toObject(message.apiViolationReason, options, q + 1); - if (options.oneofs) - object.reason = "apiViolationReason"; - } - return object; - }; - - /** - * Converts this AwsKinesisFailureReason to JSON. - * @function toJSON - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @instance - * @returns {Object.} JSON object - */ - AwsKinesisFailureReason.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AwsKinesisFailureReason - * @function getTypeUrl - * @memberof google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AwsKinesisFailureReason.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.IngestionFailureEvent.AwsKinesisFailureReason"; - }; - - return AwsKinesisFailureReason; - })(); - - return IngestionFailureEvent; - })(); - - v1.JavaScriptUDF = (function() { - - /** - * Properties of a JavaScriptUDF. - * @memberof google.pubsub.v1 - * @interface IJavaScriptUDF - * @property {string|null} [functionName] JavaScriptUDF functionName - * @property {string|null} [code] JavaScriptUDF code - */ - - /** - * Constructs a new JavaScriptUDF. - * @memberof google.pubsub.v1 - * @classdesc Represents a JavaScriptUDF. - * @implements IJavaScriptUDF - * @constructor - * @param {google.pubsub.v1.IJavaScriptUDF=} [properties] Properties to set - */ - function JavaScriptUDF(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * JavaScriptUDF functionName. - * @member {string} functionName - * @memberof google.pubsub.v1.JavaScriptUDF - * @instance - */ - JavaScriptUDF.prototype.functionName = ""; - - /** - * JavaScriptUDF code. - * @member {string} code - * @memberof google.pubsub.v1.JavaScriptUDF - * @instance - */ - JavaScriptUDF.prototype.code = ""; - - /** - * Creates a new JavaScriptUDF instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.JavaScriptUDF - * @static - * @param {google.pubsub.v1.IJavaScriptUDF=} [properties] Properties to set - * @returns {google.pubsub.v1.JavaScriptUDF} JavaScriptUDF instance - */ - JavaScriptUDF.create = function create(properties) { - return new JavaScriptUDF(properties); - }; - - /** - * Encodes the specified JavaScriptUDF message. Does not implicitly {@link google.pubsub.v1.JavaScriptUDF.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.JavaScriptUDF - * @static - * @param {google.pubsub.v1.IJavaScriptUDF} message JavaScriptUDF message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaScriptUDF.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.functionName != null && Object.hasOwnProperty.call(message, "functionName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.functionName); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.code); - return writer; - }; - - /** - * Encodes the specified JavaScriptUDF message, length delimited. Does not implicitly {@link google.pubsub.v1.JavaScriptUDF.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.JavaScriptUDF - * @static - * @param {google.pubsub.v1.IJavaScriptUDF} message JavaScriptUDF message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaScriptUDF.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a JavaScriptUDF message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.JavaScriptUDF - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.JavaScriptUDF} JavaScriptUDF - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaScriptUDF.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.JavaScriptUDF(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.functionName = reader.string(); - break; - } - case 2: { - message.code = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a JavaScriptUDF message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.JavaScriptUDF - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.JavaScriptUDF} JavaScriptUDF - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaScriptUDF.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JavaScriptUDF message. - * @function verify - * @memberof google.pubsub.v1.JavaScriptUDF - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JavaScriptUDF.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.functionName != null && Object.hasOwnProperty.call(message, "functionName")) - if (!$util.isString(message.functionName)) - return "functionName: string expected"; - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - if (!$util.isString(message.code)) - return "code: string expected"; - return null; - }; - - /** - * Creates a JavaScriptUDF message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.JavaScriptUDF - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.JavaScriptUDF} JavaScriptUDF - */ - JavaScriptUDF.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.JavaScriptUDF) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.JavaScriptUDF: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.JavaScriptUDF(); - if (object.functionName != null) - message.functionName = String(object.functionName); - if (object.code != null) - message.code = String(object.code); - return message; - }; - - /** - * Creates a plain object from a JavaScriptUDF message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.JavaScriptUDF - * @static - * @param {google.pubsub.v1.JavaScriptUDF} message JavaScriptUDF - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JavaScriptUDF.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.functionName = ""; - object.code = ""; - } - if (message.functionName != null && Object.hasOwnProperty.call(message, "functionName")) - object.functionName = message.functionName; - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - object.code = message.code; - return object; - }; - - /** - * Converts this JavaScriptUDF to JSON. - * @function toJSON - * @memberof google.pubsub.v1.JavaScriptUDF - * @instance - * @returns {Object.} JSON object - */ - JavaScriptUDF.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JavaScriptUDF - * @function getTypeUrl - * @memberof google.pubsub.v1.JavaScriptUDF - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JavaScriptUDF.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.JavaScriptUDF"; - }; - - return JavaScriptUDF; - })(); - - v1.AIInference = (function() { - - /** - * Properties of a AIInference. - * @memberof google.pubsub.v1 - * @interface IAIInference - * @property {string|null} [endpoint] AIInference endpoint - * @property {google.pubsub.v1.AIInference.IUnstructuredInference|null} [unstructuredInference] AIInference unstructuredInference - * @property {string|null} [serviceAccountEmail] AIInference serviceAccountEmail - */ - - /** - * Constructs a new AIInference. - * @memberof google.pubsub.v1 - * @classdesc Represents a AIInference. - * @implements IAIInference - * @constructor - * @param {google.pubsub.v1.IAIInference=} [properties] Properties to set - */ - function AIInference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * AIInference endpoint. - * @member {string} endpoint - * @memberof google.pubsub.v1.AIInference - * @instance - */ - AIInference.prototype.endpoint = ""; - - /** - * AIInference unstructuredInference. - * @member {google.pubsub.v1.AIInference.IUnstructuredInference|null|undefined} unstructuredInference - * @memberof google.pubsub.v1.AIInference - * @instance - */ - AIInference.prototype.unstructuredInference = null; - - /** - * AIInference serviceAccountEmail. - * @member {string} serviceAccountEmail - * @memberof google.pubsub.v1.AIInference - * @instance - */ - AIInference.prototype.serviceAccountEmail = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * AIInference inferenceMode. - * @member {"unstructuredInference"|undefined} inferenceMode - * @memberof google.pubsub.v1.AIInference - * @instance - */ - Object.defineProperty(AIInference.prototype, "inferenceMode", { - get: $util.oneOfGetter($oneOfFields = ["unstructuredInference"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AIInference instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.AIInference - * @static - * @param {google.pubsub.v1.IAIInference=} [properties] Properties to set - * @returns {google.pubsub.v1.AIInference} AIInference instance - */ - AIInference.create = function create(properties) { - return new AIInference(properties); - }; - - /** - * Encodes the specified AIInference message. Does not implicitly {@link google.pubsub.v1.AIInference.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.AIInference - * @static - * @param {google.pubsub.v1.IAIInference} message AIInference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AIInference.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.endpoint); - if (message.unstructuredInference != null && Object.hasOwnProperty.call(message, "unstructuredInference")) - $root.google.pubsub.v1.AIInference.UnstructuredInference.encode(message.unstructuredInference, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAccountEmail); - return writer; - }; - - /** - * Encodes the specified AIInference message, length delimited. Does not implicitly {@link google.pubsub.v1.AIInference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.AIInference - * @static - * @param {google.pubsub.v1.IAIInference} message AIInference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AIInference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a AIInference message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.AIInference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.AIInference} AIInference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AIInference.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.AIInference(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.endpoint = reader.string(); - break; - } - case 2: { - message.unstructuredInference = $root.google.pubsub.v1.AIInference.UnstructuredInference.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 3: { - message.serviceAccountEmail = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a AIInference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.AIInference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.AIInference} AIInference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AIInference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a AIInference message. - * @function verify - * @memberof google.pubsub.v1.AIInference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AIInference.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - if (!$util.isString(message.endpoint)) - return "endpoint: string expected"; - if (message.unstructuredInference != null && Object.hasOwnProperty.call(message, "unstructuredInference")) { - properties.inferenceMode = 1; - { - var error = $root.google.pubsub.v1.AIInference.UnstructuredInference.verify(message.unstructuredInference, long + 1); - if (error) - return "unstructuredInference." + error; - } - } - if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) - if (!$util.isString(message.serviceAccountEmail)) - return "serviceAccountEmail: string expected"; - return null; - }; - - /** - * Creates a AIInference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.AIInference - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.AIInference} AIInference - */ - AIInference.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.AIInference) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.AIInference: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.AIInference(); - if (object.endpoint != null) - message.endpoint = String(object.endpoint); - if (object.unstructuredInference != null) { - if (!$util.isObject(object.unstructuredInference)) - throw TypeError(".google.pubsub.v1.AIInference.unstructuredInference: object expected"); - message.unstructuredInference = $root.google.pubsub.v1.AIInference.UnstructuredInference.fromObject(object.unstructuredInference, long + 1); - } - if (object.serviceAccountEmail != null) - message.serviceAccountEmail = String(object.serviceAccountEmail); - return message; - }; - - /** - * Creates a plain object from a AIInference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.AIInference - * @static - * @param {google.pubsub.v1.AIInference} message AIInference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AIInference.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.endpoint = ""; - object.serviceAccountEmail = ""; - } - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - object.endpoint = message.endpoint; - if (message.unstructuredInference != null && Object.hasOwnProperty.call(message, "unstructuredInference")) { - object.unstructuredInference = $root.google.pubsub.v1.AIInference.UnstructuredInference.toObject(message.unstructuredInference, options, q + 1); - if (options.oneofs) - object.inferenceMode = "unstructuredInference"; - } - if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) - object.serviceAccountEmail = message.serviceAccountEmail; - return object; - }; - - /** - * Converts this AIInference to JSON. - * @function toJSON - * @memberof google.pubsub.v1.AIInference - * @instance - * @returns {Object.} JSON object - */ - AIInference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AIInference - * @function getTypeUrl - * @memberof google.pubsub.v1.AIInference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AIInference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.AIInference"; - }; - - AIInference.UnstructuredInference = (function() { - - /** - * Properties of an UnstructuredInference. - * @memberof google.pubsub.v1.AIInference - * @interface IUnstructuredInference - * @property {google.protobuf.IStruct|null} [parameters] UnstructuredInference parameters - */ - - /** - * Constructs a new UnstructuredInference. - * @memberof google.pubsub.v1.AIInference - * @classdesc Represents an UnstructuredInference. - * @implements IUnstructuredInference - * @constructor - * @param {google.pubsub.v1.AIInference.IUnstructuredInference=} [properties] Properties to set - */ - function UnstructuredInference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * UnstructuredInference parameters. - * @member {google.protobuf.IStruct|null|undefined} parameters - * @memberof google.pubsub.v1.AIInference.UnstructuredInference - * @instance - */ - UnstructuredInference.prototype.parameters = null; - - /** - * Creates a new UnstructuredInference instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.AIInference.UnstructuredInference - * @static - * @param {google.pubsub.v1.AIInference.IUnstructuredInference=} [properties] Properties to set - * @returns {google.pubsub.v1.AIInference.UnstructuredInference} UnstructuredInference instance - */ - UnstructuredInference.create = function create(properties) { - return new UnstructuredInference(properties); - }; - - /** - * Encodes the specified UnstructuredInference message. Does not implicitly {@link google.pubsub.v1.AIInference.UnstructuredInference.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.AIInference.UnstructuredInference - * @static - * @param {google.pubsub.v1.AIInference.IUnstructuredInference} message UnstructuredInference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnstructuredInference.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) - $root.google.protobuf.Struct.encode(message.parameters, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified UnstructuredInference message, length delimited. Does not implicitly {@link google.pubsub.v1.AIInference.UnstructuredInference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.AIInference.UnstructuredInference - * @static - * @param {google.pubsub.v1.AIInference.IUnstructuredInference} message UnstructuredInference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UnstructuredInference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an UnstructuredInference message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.AIInference.UnstructuredInference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.AIInference.UnstructuredInference} UnstructuredInference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnstructuredInference.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.AIInference.UnstructuredInference(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parameters = $root.google.protobuf.Struct.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an UnstructuredInference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.AIInference.UnstructuredInference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.AIInference.UnstructuredInference} UnstructuredInference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UnstructuredInference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UnstructuredInference message. - * @function verify - * @memberof google.pubsub.v1.AIInference.UnstructuredInference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UnstructuredInference.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) { - var error = $root.google.protobuf.Struct.verify(message.parameters, long + 1); - if (error) - return "parameters." + error; - } - return null; - }; - - /** - * Creates an UnstructuredInference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.AIInference.UnstructuredInference - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.AIInference.UnstructuredInference} UnstructuredInference - */ - UnstructuredInference.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.AIInference.UnstructuredInference) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.AIInference.UnstructuredInference: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.AIInference.UnstructuredInference(); - if (object.parameters != null) { - if (!$util.isObject(object.parameters)) - throw TypeError(".google.pubsub.v1.AIInference.UnstructuredInference.parameters: object expected"); - message.parameters = $root.google.protobuf.Struct.fromObject(object.parameters, long + 1); - } - return message; - }; - - /** - * Creates a plain object from an UnstructuredInference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.AIInference.UnstructuredInference - * @static - * @param {google.pubsub.v1.AIInference.UnstructuredInference} message UnstructuredInference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UnstructuredInference.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.parameters = null; - if (message.parameters != null && Object.hasOwnProperty.call(message, "parameters")) - object.parameters = $root.google.protobuf.Struct.toObject(message.parameters, options, q + 1); - return object; - }; - - /** - * Converts this UnstructuredInference to JSON. - * @function toJSON - * @memberof google.pubsub.v1.AIInference.UnstructuredInference - * @instance - * @returns {Object.} JSON object - */ - UnstructuredInference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UnstructuredInference - * @function getTypeUrl - * @memberof google.pubsub.v1.AIInference.UnstructuredInference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UnstructuredInference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.AIInference.UnstructuredInference"; - }; - - return UnstructuredInference; - })(); - - return AIInference; - })(); - - v1.MessageTransform = (function() { - - /** - * Properties of a MessageTransform. - * @memberof google.pubsub.v1 - * @interface IMessageTransform - * @property {google.pubsub.v1.IJavaScriptUDF|null} [javascriptUdf] MessageTransform javascriptUdf - * @property {google.pubsub.v1.IAIInference|null} [aiInference] MessageTransform aiInference - * @property {boolean|null} [enabled] MessageTransform enabled - * @property {boolean|null} [disabled] MessageTransform disabled - */ - - /** - * Constructs a new MessageTransform. - * @memberof google.pubsub.v1 - * @classdesc Represents a MessageTransform. - * @implements IMessageTransform - * @constructor - * @param {google.pubsub.v1.IMessageTransform=} [properties] Properties to set - */ - function MessageTransform(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageTransform javascriptUdf. - * @member {google.pubsub.v1.IJavaScriptUDF|null|undefined} javascriptUdf - * @memberof google.pubsub.v1.MessageTransform - * @instance - */ - MessageTransform.prototype.javascriptUdf = null; - - /** - * MessageTransform aiInference. - * @member {google.pubsub.v1.IAIInference|null|undefined} aiInference - * @memberof google.pubsub.v1.MessageTransform - * @instance - */ - MessageTransform.prototype.aiInference = null; - - /** - * MessageTransform enabled. - * @member {boolean} enabled - * @memberof google.pubsub.v1.MessageTransform - * @instance - */ - MessageTransform.prototype.enabled = false; - - /** - * MessageTransform disabled. - * @member {boolean} disabled - * @memberof google.pubsub.v1.MessageTransform - * @instance - */ - MessageTransform.prototype.disabled = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MessageTransform transform. - * @member {"javascriptUdf"|"aiInference"|undefined} transform - * @memberof google.pubsub.v1.MessageTransform - * @instance - */ - Object.defineProperty(MessageTransform.prototype, "transform", { - get: $util.oneOfGetter($oneOfFields = ["javascriptUdf", "aiInference"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MessageTransform instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.MessageTransform - * @static - * @param {google.pubsub.v1.IMessageTransform=} [properties] Properties to set - * @returns {google.pubsub.v1.MessageTransform} MessageTransform instance - */ - MessageTransform.create = function create(properties) { - return new MessageTransform(properties); - }; - - /** - * Encodes the specified MessageTransform message. Does not implicitly {@link google.pubsub.v1.MessageTransform.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.MessageTransform - * @static - * @param {google.pubsub.v1.IMessageTransform} message MessageTransform message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageTransform.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.javascriptUdf != null && Object.hasOwnProperty.call(message, "javascriptUdf")) - $root.google.pubsub.v1.JavaScriptUDF.encode(message.javascriptUdf, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.enabled); - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.disabled); - if (message.aiInference != null && Object.hasOwnProperty.call(message, "aiInference")) - $root.google.pubsub.v1.AIInference.encode(message.aiInference, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageTransform message, length delimited. Does not implicitly {@link google.pubsub.v1.MessageTransform.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.MessageTransform - * @static - * @param {google.pubsub.v1.IMessageTransform} message MessageTransform message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageTransform.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a MessageTransform message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.MessageTransform - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.MessageTransform} MessageTransform - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageTransform.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.MessageTransform(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.javascriptUdf = $root.google.pubsub.v1.JavaScriptUDF.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 6: { - message.aiInference = $root.google.pubsub.v1.AIInference.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 3: { - message.enabled = reader.bool(); - break; - } - case 4: { - message.disabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a MessageTransform message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.MessageTransform - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.MessageTransform} MessageTransform - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageTransform.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageTransform message. - * @function verify - * @memberof google.pubsub.v1.MessageTransform - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageTransform.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.javascriptUdf != null && Object.hasOwnProperty.call(message, "javascriptUdf")) { - properties.transform = 1; - { - var error = $root.google.pubsub.v1.JavaScriptUDF.verify(message.javascriptUdf, long + 1); - if (error) - return "javascriptUdf." + error; - } - } - if (message.aiInference != null && Object.hasOwnProperty.call(message, "aiInference")) { - if (properties.transform === 1) - return "transform: multiple values"; - properties.transform = 1; - { - var error = $root.google.pubsub.v1.AIInference.verify(message.aiInference, long + 1); - if (error) - return "aiInference." + error; - } - } - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - if (typeof message.disabled !== "boolean") - return "disabled: boolean expected"; - return null; - }; - - /** - * Creates a MessageTransform message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.MessageTransform - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.MessageTransform} MessageTransform - */ - MessageTransform.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.MessageTransform) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.MessageTransform: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.MessageTransform(); - if (object.javascriptUdf != null) { - if (!$util.isObject(object.javascriptUdf)) - throw TypeError(".google.pubsub.v1.MessageTransform.javascriptUdf: object expected"); - message.javascriptUdf = $root.google.pubsub.v1.JavaScriptUDF.fromObject(object.javascriptUdf, long + 1); - } - if (object.aiInference != null) { - if (!$util.isObject(object.aiInference)) - throw TypeError(".google.pubsub.v1.MessageTransform.aiInference: object expected"); - message.aiInference = $root.google.pubsub.v1.AIInference.fromObject(object.aiInference, long + 1); - } - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.disabled != null) - message.disabled = Boolean(object.disabled); - return message; - }; - - /** - * Creates a plain object from a MessageTransform message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.MessageTransform - * @static - * @param {google.pubsub.v1.MessageTransform} message MessageTransform - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageTransform.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.enabled = false; - object.disabled = false; - } - if (message.javascriptUdf != null && Object.hasOwnProperty.call(message, "javascriptUdf")) { - object.javascriptUdf = $root.google.pubsub.v1.JavaScriptUDF.toObject(message.javascriptUdf, options, q + 1); - if (options.oneofs) - object.transform = "javascriptUdf"; - } - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - object.enabled = message.enabled; - if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) - object.disabled = message.disabled; - if (message.aiInference != null && Object.hasOwnProperty.call(message, "aiInference")) { - object.aiInference = $root.google.pubsub.v1.AIInference.toObject(message.aiInference, options, q + 1); - if (options.oneofs) - object.transform = "aiInference"; - } - return object; - }; - - /** - * Converts this MessageTransform to JSON. - * @function toJSON - * @memberof google.pubsub.v1.MessageTransform - * @instance - * @returns {Object.} JSON object - */ - MessageTransform.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageTransform - * @function getTypeUrl - * @memberof google.pubsub.v1.MessageTransform - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageTransform.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.MessageTransform"; - }; - - return MessageTransform; - })(); - - v1.Topic = (function() { - - /** - * Properties of a Topic. - * @memberof google.pubsub.v1 - * @interface ITopic - * @property {string|null} [name] Topic name - * @property {Object.|null} [labels] Topic labels - * @property {google.pubsub.v1.IMessageStoragePolicy|null} [messageStoragePolicy] Topic messageStoragePolicy - * @property {string|null} [kmsKeyName] Topic kmsKeyName - * @property {google.pubsub.v1.ISchemaSettings|null} [schemaSettings] Topic schemaSettings - * @property {boolean|null} [satisfiesPzs] Topic satisfiesPzs - * @property {google.protobuf.IDuration|null} [messageRetentionDuration] Topic messageRetentionDuration - * @property {google.pubsub.v1.Topic.State|null} [state] Topic state - * @property {google.pubsub.v1.IIngestionDataSourceSettings|null} [ingestionDataSourceSettings] Topic ingestionDataSourceSettings - * @property {Array.|null} [messageTransforms] Topic messageTransforms - * @property {Object.|null} [tags] Topic tags - */ - - /** - * Constructs a new Topic. - * @memberof google.pubsub.v1 - * @classdesc Represents a Topic. - * @implements ITopic - * @constructor - * @param {google.pubsub.v1.ITopic=} [properties] Properties to set - */ - function Topic(properties) { - this.labels = {}; - this.messageTransforms = []; - this.tags = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Topic name. - * @member {string} name - * @memberof google.pubsub.v1.Topic - * @instance - */ - Topic.prototype.name = ""; - - /** - * Topic labels. - * @member {Object.} labels - * @memberof google.pubsub.v1.Topic - * @instance - */ - Topic.prototype.labels = $util.emptyObject; - - /** - * Topic messageStoragePolicy. - * @member {google.pubsub.v1.IMessageStoragePolicy|null|undefined} messageStoragePolicy - * @memberof google.pubsub.v1.Topic - * @instance - */ - Topic.prototype.messageStoragePolicy = null; - - /** - * Topic kmsKeyName. - * @member {string} kmsKeyName - * @memberof google.pubsub.v1.Topic - * @instance - */ - Topic.prototype.kmsKeyName = ""; - - /** - * Topic schemaSettings. - * @member {google.pubsub.v1.ISchemaSettings|null|undefined} schemaSettings - * @memberof google.pubsub.v1.Topic - * @instance - */ - Topic.prototype.schemaSettings = null; - - /** - * Topic satisfiesPzs. - * @member {boolean} satisfiesPzs - * @memberof google.pubsub.v1.Topic - * @instance - */ - Topic.prototype.satisfiesPzs = false; - - /** - * Topic messageRetentionDuration. - * @member {google.protobuf.IDuration|null|undefined} messageRetentionDuration - * @memberof google.pubsub.v1.Topic - * @instance - */ - Topic.prototype.messageRetentionDuration = null; - - /** - * Topic state. - * @member {google.pubsub.v1.Topic.State} state - * @memberof google.pubsub.v1.Topic - * @instance - */ - Topic.prototype.state = 0; - - /** - * Topic ingestionDataSourceSettings. - * @member {google.pubsub.v1.IIngestionDataSourceSettings|null|undefined} ingestionDataSourceSettings - * @memberof google.pubsub.v1.Topic - * @instance - */ - Topic.prototype.ingestionDataSourceSettings = null; - - /** - * Topic messageTransforms. - * @member {Array.} messageTransforms - * @memberof google.pubsub.v1.Topic - * @instance - */ - Topic.prototype.messageTransforms = $util.emptyArray; - - /** - * Topic tags. - * @member {Object.} tags - * @memberof google.pubsub.v1.Topic - * @instance - */ - Topic.prototype.tags = $util.emptyObject; - - /** - * Creates a new Topic instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.Topic - * @static - * @param {google.pubsub.v1.ITopic=} [properties] Properties to set - * @returns {google.pubsub.v1.Topic} Topic instance - */ - Topic.create = function create(properties) { - return new Topic(properties); - }; - - /** - * Encodes the specified Topic message. Does not implicitly {@link google.pubsub.v1.Topic.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.Topic - * @static - * @param {google.pubsub.v1.ITopic} message Topic message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Topic.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.messageStoragePolicy != null && Object.hasOwnProperty.call(message, "messageStoragePolicy")) - $root.google.pubsub.v1.MessageStoragePolicy.encode(message.messageStoragePolicy, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.kmsKeyName); - if (message.schemaSettings != null && Object.hasOwnProperty.call(message, "schemaSettings")) - $root.google.pubsub.v1.SchemaSettings.encode(message.schemaSettings, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); - if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.satisfiesPzs); - if (message.messageRetentionDuration != null && Object.hasOwnProperty.call(message, "messageRetentionDuration")) - $root.google.protobuf.Duration.encode(message.messageRetentionDuration, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.state); - if (message.ingestionDataSourceSettings != null && Object.hasOwnProperty.call(message, "ingestionDataSourceSettings")) - $root.google.pubsub.v1.IngestionDataSourceSettings.encode(message.ingestionDataSourceSettings, writer.uint32(/* id 10, wireType 2 =*/82).fork(), q + 1).ldelim(); - if (message.messageTransforms != null && message.messageTransforms.length) - for (var i = 0; i < message.messageTransforms.length; ++i) - $root.google.pubsub.v1.MessageTransform.encode(message.messageTransforms[i], writer.uint32(/* id 13, wireType 2 =*/106).fork(), q + 1).ldelim(); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) - for (var keys = Object.keys(message.tags), i = 0; i < keys.length; ++i) - writer.uint32(/* id 14, wireType 2 =*/114).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified Topic message, length delimited. Does not implicitly {@link google.pubsub.v1.Topic.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.Topic - * @static - * @param {google.pubsub.v1.ITopic} message Topic message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Topic.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a Topic message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.Topic - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.Topic} Topic - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Topic.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.Topic(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7, long); - break; - } - } - if (key === "__proto__") - $util.makeProp(message.labels, key); - message.labels[key] = value; - break; - } - case 3: { - message.messageStoragePolicy = $root.google.pubsub.v1.MessageStoragePolicy.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 5: { - message.kmsKeyName = reader.string(); - break; - } - case 6: { - message.schemaSettings = $root.google.pubsub.v1.SchemaSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 7: { - message.satisfiesPzs = reader.bool(); - break; - } - case 8: { - message.messageRetentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 9: { - message.state = reader.int32(); - break; - } - case 10: { - message.ingestionDataSourceSettings = $root.google.pubsub.v1.IngestionDataSourceSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 13: { - if (!(message.messageTransforms && message.messageTransforms.length)) - message.messageTransforms = []; - message.messageTransforms.push($root.google.pubsub.v1.MessageTransform.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 14: { - if (message.tags === $util.emptyObject) - message.tags = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7, long); - break; - } - } - if (key === "__proto__") - $util.makeProp(message.tags, key); - message.tags[key] = value; - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a Topic message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.Topic - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.Topic} Topic - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Topic.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Topic message. - * @function verify - * @memberof google.pubsub.v1.Topic - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Topic.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.messageStoragePolicy != null && Object.hasOwnProperty.call(message, "messageStoragePolicy")) { - var error = $root.google.pubsub.v1.MessageStoragePolicy.verify(message.messageStoragePolicy, long + 1); - if (error) - return "messageStoragePolicy." + error; - } - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; - if (message.schemaSettings != null && Object.hasOwnProperty.call(message, "schemaSettings")) { - var error = $root.google.pubsub.v1.SchemaSettings.verify(message.schemaSettings, long + 1); - if (error) - return "schemaSettings." + error; - } - if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) - if (typeof message.satisfiesPzs !== "boolean") - return "satisfiesPzs: boolean expected"; - if (message.messageRetentionDuration != null && Object.hasOwnProperty.call(message, "messageRetentionDuration")) { - var error = $root.google.protobuf.Duration.verify(message.messageRetentionDuration, long + 1); - if (error) - return "messageRetentionDuration." + error; - } - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.ingestionDataSourceSettings != null && Object.hasOwnProperty.call(message, "ingestionDataSourceSettings")) { - var error = $root.google.pubsub.v1.IngestionDataSourceSettings.verify(message.ingestionDataSourceSettings, long + 1); - if (error) - return "ingestionDataSourceSettings." + error; - } - if (message.messageTransforms != null && Object.hasOwnProperty.call(message, "messageTransforms")) { - if (!Array.isArray(message.messageTransforms)) - return "messageTransforms: array expected"; - for (var i = 0; i < message.messageTransforms.length; ++i) { - var error = $root.google.pubsub.v1.MessageTransform.verify(message.messageTransforms[i], long + 1); - if (error) - return "messageTransforms." + error; - } - } - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) { - if (!$util.isObject(message.tags)) - return "tags: object expected"; - var key = Object.keys(message.tags); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.tags[key[i]])) - return "tags: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a Topic message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.Topic - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.Topic} Topic - */ - Topic.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.Topic) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.Topic: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.Topic(); - if (object.name != null) - message.name = String(object.name); - if (object.labels) { - if (!$util.isObject(object.labels)) - throw TypeError(".google.pubsub.v1.Topic.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) { - if (keys[i] === "__proto__") - $util.makeProp(message.labels, keys[i]); - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - } - if (object.messageStoragePolicy != null) { - if (!$util.isObject(object.messageStoragePolicy)) - throw TypeError(".google.pubsub.v1.Topic.messageStoragePolicy: object expected"); - message.messageStoragePolicy = $root.google.pubsub.v1.MessageStoragePolicy.fromObject(object.messageStoragePolicy, long + 1); - } - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); - if (object.schemaSettings != null) { - if (!$util.isObject(object.schemaSettings)) - throw TypeError(".google.pubsub.v1.Topic.schemaSettings: object expected"); - message.schemaSettings = $root.google.pubsub.v1.SchemaSettings.fromObject(object.schemaSettings, long + 1); - } - if (object.satisfiesPzs != null) - message.satisfiesPzs = Boolean(object.satisfiesPzs); - if (object.messageRetentionDuration != null) { - if (!$util.isObject(object.messageRetentionDuration)) - throw TypeError(".google.pubsub.v1.Topic.messageRetentionDuration: object expected"); - message.messageRetentionDuration = $root.google.protobuf.Duration.fromObject(object.messageRetentionDuration, long + 1); - } - 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 "ACTIVE": - case 1: - message.state = 1; - break; - case "INGESTION_RESOURCE_ERROR": - case 2: - message.state = 2; - break; - } - if (object.ingestionDataSourceSettings != null) { - if (!$util.isObject(object.ingestionDataSourceSettings)) - throw TypeError(".google.pubsub.v1.Topic.ingestionDataSourceSettings: object expected"); - message.ingestionDataSourceSettings = $root.google.pubsub.v1.IngestionDataSourceSettings.fromObject(object.ingestionDataSourceSettings, long + 1); - } - if (object.messageTransforms) { - if (!Array.isArray(object.messageTransforms)) - throw TypeError(".google.pubsub.v1.Topic.messageTransforms: array expected"); - message.messageTransforms = []; - for (var i = 0; i < object.messageTransforms.length; ++i) { - if (!$util.isObject(object.messageTransforms[i])) - throw TypeError(".google.pubsub.v1.Topic.messageTransforms: object expected"); - message.messageTransforms[i] = $root.google.pubsub.v1.MessageTransform.fromObject(object.messageTransforms[i], long + 1); - } - } - if (object.tags) { - if (!$util.isObject(object.tags)) - throw TypeError(".google.pubsub.v1.Topic.tags: object expected"); - message.tags = {}; - for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) { - if (keys[i] === "__proto__") - $util.makeProp(message.tags, keys[i]); - message.tags[keys[i]] = String(object.tags[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a Topic message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.Topic - * @static - * @param {google.pubsub.v1.Topic} message Topic - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Topic.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.messageTransforms = []; - if (options.objects || options.defaults) { - object.labels = {}; - object.tags = {}; - } - if (options.defaults) { - object.name = ""; - object.messageStoragePolicy = null; - object.kmsKeyName = ""; - object.schemaSettings = null; - object.satisfiesPzs = false; - object.messageRetentionDuration = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.ingestionDataSourceSettings = null; - } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - object.name = message.name; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) { - if (keys2[j] === "__proto__") - $util.makeProp(object.labels, keys2[j]); - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - } - if (message.messageStoragePolicy != null && Object.hasOwnProperty.call(message, "messageStoragePolicy")) - object.messageStoragePolicy = $root.google.pubsub.v1.MessageStoragePolicy.toObject(message.messageStoragePolicy, options, q + 1); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - object.kmsKeyName = message.kmsKeyName; - if (message.schemaSettings != null && Object.hasOwnProperty.call(message, "schemaSettings")) - object.schemaSettings = $root.google.pubsub.v1.SchemaSettings.toObject(message.schemaSettings, options, q + 1); - if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) - object.satisfiesPzs = message.satisfiesPzs; - if (message.messageRetentionDuration != null && Object.hasOwnProperty.call(message, "messageRetentionDuration")) - object.messageRetentionDuration = $root.google.protobuf.Duration.toObject(message.messageRetentionDuration, options, q + 1); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - object.state = options.enums === String ? $root.google.pubsub.v1.Topic.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.Topic.State[message.state] : message.state; - if (message.ingestionDataSourceSettings != null && Object.hasOwnProperty.call(message, "ingestionDataSourceSettings")) - object.ingestionDataSourceSettings = $root.google.pubsub.v1.IngestionDataSourceSettings.toObject(message.ingestionDataSourceSettings, options, q + 1); - if (message.messageTransforms && message.messageTransforms.length) { - object.messageTransforms = []; - for (var j = 0; j < message.messageTransforms.length; ++j) - object.messageTransforms[j] = $root.google.pubsub.v1.MessageTransform.toObject(message.messageTransforms[j], options, q + 1); - } - if (message.tags && (keys2 = Object.keys(message.tags)).length) { - object.tags = {}; - for (var j = 0; j < keys2.length; ++j) { - if (keys2[j] === "__proto__") - $util.makeProp(object.tags, keys2[j]); - object.tags[keys2[j]] = message.tags[keys2[j]]; - } - } - return object; - }; - - /** - * Converts this Topic to JSON. - * @function toJSON - * @memberof google.pubsub.v1.Topic - * @instance - * @returns {Object.} JSON object - */ - Topic.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Topic - * @function getTypeUrl - * @memberof google.pubsub.v1.Topic - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Topic.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.Topic"; - }; - - /** - * State enum. - * @name google.pubsub.v1.Topic.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} INGESTION_RESOURCE_ERROR=2 INGESTION_RESOURCE_ERROR value - */ - Topic.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "INGESTION_RESOURCE_ERROR"] = 2; - return values; - })(); - - return Topic; - })(); - - v1.PubsubMessage = (function() { - - /** - * Properties of a PubsubMessage. - * @memberof google.pubsub.v1 - * @interface IPubsubMessage - * @property {Uint8Array|null} [data] PubsubMessage data - * @property {Object.|null} [attributes] PubsubMessage attributes - * @property {string|null} [messageId] PubsubMessage messageId - * @property {google.protobuf.ITimestamp|null} [publishTime] PubsubMessage publishTime - * @property {string|null} [orderingKey] PubsubMessage orderingKey - */ - - /** - * Constructs a new PubsubMessage. - * @memberof google.pubsub.v1 - * @classdesc Represents a PubsubMessage. - * @implements IPubsubMessage - * @constructor - * @param {google.pubsub.v1.IPubsubMessage=} [properties] Properties to set - */ - function PubsubMessage(properties) { - this.attributes = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * PubsubMessage data. - * @member {Uint8Array} data - * @memberof google.pubsub.v1.PubsubMessage - * @instance - */ - PubsubMessage.prototype.data = $util.newBuffer([]); - - /** - * PubsubMessage attributes. - * @member {Object.} attributes - * @memberof google.pubsub.v1.PubsubMessage - * @instance - */ - PubsubMessage.prototype.attributes = $util.emptyObject; - - /** - * PubsubMessage messageId. - * @member {string} messageId - * @memberof google.pubsub.v1.PubsubMessage - * @instance - */ - PubsubMessage.prototype.messageId = ""; - - /** - * PubsubMessage publishTime. - * @member {google.protobuf.ITimestamp|null|undefined} publishTime - * @memberof google.pubsub.v1.PubsubMessage - * @instance - */ - PubsubMessage.prototype.publishTime = null; - - /** - * PubsubMessage orderingKey. - * @member {string} orderingKey - * @memberof google.pubsub.v1.PubsubMessage - * @instance - */ - PubsubMessage.prototype.orderingKey = ""; - - /** - * Creates a new PubsubMessage instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.PubsubMessage - * @static - * @param {google.pubsub.v1.IPubsubMessage=} [properties] Properties to set - * @returns {google.pubsub.v1.PubsubMessage} PubsubMessage instance - */ - PubsubMessage.create = function create(properties) { - return new PubsubMessage(properties); - }; - - /** - * Encodes the specified PubsubMessage message. Does not implicitly {@link google.pubsub.v1.PubsubMessage.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.PubsubMessage - * @static - * @param {google.pubsub.v1.IPubsubMessage} message PubsubMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PubsubMessage.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.data); - if (message.attributes != null && Object.hasOwnProperty.call(message, "attributes")) - for (var keys = Object.keys(message.attributes), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.attributes[keys[i]]).ldelim(); - if (message.messageId != null && Object.hasOwnProperty.call(message, "messageId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.messageId); - if (message.publishTime != null && Object.hasOwnProperty.call(message, "publishTime")) - $root.google.protobuf.Timestamp.encode(message.publishTime, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); - if (message.orderingKey != null && Object.hasOwnProperty.call(message, "orderingKey")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderingKey); - return writer; - }; - - /** - * Encodes the specified PubsubMessage message, length delimited. Does not implicitly {@link google.pubsub.v1.PubsubMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.PubsubMessage - * @static - * @param {google.pubsub.v1.IPubsubMessage} message PubsubMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PubsubMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a PubsubMessage message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.PubsubMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.PubsubMessage} PubsubMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PubsubMessage.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.PubsubMessage(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.data = reader.bytes(); - break; - } - case 2: { - if (message.attributes === $util.emptyObject) - message.attributes = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7, long); - break; - } - } - if (key === "__proto__") - $util.makeProp(message.attributes, key); - message.attributes[key] = value; - break; - } - case 3: { - message.messageId = reader.string(); - break; - } - case 4: { - message.publishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 5: { - message.orderingKey = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a PubsubMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.PubsubMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.PubsubMessage} PubsubMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PubsubMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PubsubMessage message. - * @function verify - * @memberof google.pubsub.v1.PubsubMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PubsubMessage.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) - return "data: buffer expected"; - if (message.attributes != null && Object.hasOwnProperty.call(message, "attributes")) { - if (!$util.isObject(message.attributes)) - return "attributes: object expected"; - var key = Object.keys(message.attributes); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.attributes[key[i]])) - return "attributes: string{k:string} expected"; - } - if (message.messageId != null && Object.hasOwnProperty.call(message, "messageId")) - if (!$util.isString(message.messageId)) - return "messageId: string expected"; - if (message.publishTime != null && Object.hasOwnProperty.call(message, "publishTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.publishTime, long + 1); - if (error) - return "publishTime." + error; - } - if (message.orderingKey != null && Object.hasOwnProperty.call(message, "orderingKey")) - if (!$util.isString(message.orderingKey)) - return "orderingKey: string expected"; - return null; - }; - - /** - * Creates a PubsubMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.PubsubMessage - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.PubsubMessage} PubsubMessage - */ - PubsubMessage.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.PubsubMessage) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.PubsubMessage: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.PubsubMessage(); - if (object.data != null) - if (typeof object.data === "string") - $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); - else if (object.data.length >= 0) - message.data = object.data; - if (object.attributes) { - if (!$util.isObject(object.attributes)) - throw TypeError(".google.pubsub.v1.PubsubMessage.attributes: object expected"); - message.attributes = {}; - for (var keys = Object.keys(object.attributes), i = 0; i < keys.length; ++i) { - if (keys[i] === "__proto__") - $util.makeProp(message.attributes, keys[i]); - message.attributes[keys[i]] = String(object.attributes[keys[i]]); - } - } - if (object.messageId != null) - message.messageId = String(object.messageId); - if (object.publishTime != null) { - if (!$util.isObject(object.publishTime)) - throw TypeError(".google.pubsub.v1.PubsubMessage.publishTime: object expected"); - message.publishTime = $root.google.protobuf.Timestamp.fromObject(object.publishTime, long + 1); - } - if (object.orderingKey != null) - message.orderingKey = String(object.orderingKey); - return message; - }; - - /** - * Creates a plain object from a PubsubMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.PubsubMessage - * @static - * @param {google.pubsub.v1.PubsubMessage} message PubsubMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PubsubMessage.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.objects || options.defaults) - object.attributes = {}; - if (options.defaults) { - if (options.bytes === String) - object.data = ""; - else { - object.data = []; - if (options.bytes !== Array) - object.data = $util.newBuffer(object.data); - } - object.messageId = ""; - object.publishTime = null; - object.orderingKey = ""; - } - if (message.data != null && Object.hasOwnProperty.call(message, "data")) - object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; - var keys2; - if (message.attributes && (keys2 = Object.keys(message.attributes)).length) { - object.attributes = {}; - for (var j = 0; j < keys2.length; ++j) { - if (keys2[j] === "__proto__") - $util.makeProp(object.attributes, keys2[j]); - object.attributes[keys2[j]] = message.attributes[keys2[j]]; - } - } - if (message.messageId != null && Object.hasOwnProperty.call(message, "messageId")) - object.messageId = message.messageId; - if (message.publishTime != null && Object.hasOwnProperty.call(message, "publishTime")) - object.publishTime = $root.google.protobuf.Timestamp.toObject(message.publishTime, options, q + 1); - if (message.orderingKey != null && Object.hasOwnProperty.call(message, "orderingKey")) - object.orderingKey = message.orderingKey; - return object; - }; - - /** - * Converts this PubsubMessage to JSON. - * @function toJSON - * @memberof google.pubsub.v1.PubsubMessage - * @instance - * @returns {Object.} JSON object - */ - PubsubMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PubsubMessage - * @function getTypeUrl - * @memberof google.pubsub.v1.PubsubMessage - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PubsubMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.PubsubMessage"; - }; - - return PubsubMessage; - })(); - - v1.GetTopicRequest = (function() { - - /** - * Properties of a GetTopicRequest. - * @memberof google.pubsub.v1 - * @interface IGetTopicRequest - * @property {string|null} [topic] GetTopicRequest topic - */ - - /** - * Constructs a new GetTopicRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a GetTopicRequest. - * @implements IGetTopicRequest - * @constructor - * @param {google.pubsub.v1.IGetTopicRequest=} [properties] Properties to set - */ - function GetTopicRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetTopicRequest topic. - * @member {string} topic - * @memberof google.pubsub.v1.GetTopicRequest - * @instance - */ - GetTopicRequest.prototype.topic = ""; - - /** - * Creates a new GetTopicRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.GetTopicRequest - * @static - * @param {google.pubsub.v1.IGetTopicRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.GetTopicRequest} GetTopicRequest instance - */ - GetTopicRequest.create = function create(properties) { - return new GetTopicRequest(properties); - }; - - /** - * Encodes the specified GetTopicRequest message. Does not implicitly {@link google.pubsub.v1.GetTopicRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.GetTopicRequest - * @static - * @param {google.pubsub.v1.IGetTopicRequest} message GetTopicRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTopicRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); - return writer; - }; - - /** - * Encodes the specified GetTopicRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.GetTopicRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.GetTopicRequest - * @static - * @param {google.pubsub.v1.IGetTopicRequest} message GetTopicRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetTopicRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a GetTopicRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.GetTopicRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.GetTopicRequest} GetTopicRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTopicRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.GetTopicRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.topic = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a GetTopicRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.GetTopicRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.GetTopicRequest} GetTopicRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetTopicRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetTopicRequest message. - * @function verify - * @memberof google.pubsub.v1.GetTopicRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetTopicRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - return null; - }; - - /** - * Creates a GetTopicRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.GetTopicRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.GetTopicRequest} GetTopicRequest - */ - GetTopicRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.GetTopicRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.GetTopicRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.GetTopicRequest(); - if (object.topic != null) - message.topic = String(object.topic); - return message; - }; - - /** - * Creates a plain object from a GetTopicRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.GetTopicRequest - * @static - * @param {google.pubsub.v1.GetTopicRequest} message GetTopicRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetTopicRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.topic = ""; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - object.topic = message.topic; - return object; - }; - - /** - * Converts this GetTopicRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.GetTopicRequest - * @instance - * @returns {Object.} JSON object - */ - GetTopicRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetTopicRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.GetTopicRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetTopicRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.GetTopicRequest"; - }; - - return GetTopicRequest; - })(); - - v1.UpdateTopicRequest = (function() { - - /** - * Properties of an UpdateTopicRequest. - * @memberof google.pubsub.v1 - * @interface IUpdateTopicRequest - * @property {google.pubsub.v1.ITopic|null} [topic] UpdateTopicRequest topic - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateTopicRequest updateMask - */ - - /** - * Constructs a new UpdateTopicRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents an UpdateTopicRequest. - * @implements IUpdateTopicRequest - * @constructor - * @param {google.pubsub.v1.IUpdateTopicRequest=} [properties] Properties to set - */ - function UpdateTopicRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateTopicRequest topic. - * @member {google.pubsub.v1.ITopic|null|undefined} topic - * @memberof google.pubsub.v1.UpdateTopicRequest - * @instance - */ - UpdateTopicRequest.prototype.topic = null; - - /** - * UpdateTopicRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.pubsub.v1.UpdateTopicRequest - * @instance - */ - UpdateTopicRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateTopicRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.UpdateTopicRequest - * @static - * @param {google.pubsub.v1.IUpdateTopicRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.UpdateTopicRequest} UpdateTopicRequest instance - */ - UpdateTopicRequest.create = function create(properties) { - return new UpdateTopicRequest(properties); - }; - - /** - * Encodes the specified UpdateTopicRequest message. Does not implicitly {@link google.pubsub.v1.UpdateTopicRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.UpdateTopicRequest - * @static - * @param {google.pubsub.v1.IUpdateTopicRequest} message UpdateTopicRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTopicRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - $root.google.pubsub.v1.Topic.encode(message.topic, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateTopicRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.UpdateTopicRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.UpdateTopicRequest - * @static - * @param {google.pubsub.v1.IUpdateTopicRequest} message UpdateTopicRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateTopicRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an UpdateTopicRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.UpdateTopicRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.UpdateTopicRequest} UpdateTopicRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTopicRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.UpdateTopicRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.topic = $root.google.pubsub.v1.Topic.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateTopicRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.UpdateTopicRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.UpdateTopicRequest} UpdateTopicRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateTopicRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateTopicRequest message. - * @function verify - * @memberof google.pubsub.v1.UpdateTopicRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateTopicRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) { - var error = $root.google.pubsub.v1.Topic.verify(message.topic, long + 1); - if (error) - return "topic." + error; - } - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates an UpdateTopicRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.UpdateTopicRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.UpdateTopicRequest} UpdateTopicRequest - */ - UpdateTopicRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.UpdateTopicRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.UpdateTopicRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.UpdateTopicRequest(); - if (object.topic != null) { - if (!$util.isObject(object.topic)) - throw TypeError(".google.pubsub.v1.UpdateTopicRequest.topic: object expected"); - message.topic = $root.google.pubsub.v1.Topic.fromObject(object.topic, long + 1); - } - if (object.updateMask != null) { - if (!$util.isObject(object.updateMask)) - throw TypeError(".google.pubsub.v1.UpdateTopicRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); - } - return message; - }; - - /** - * Creates a plain object from an UpdateTopicRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.UpdateTopicRequest - * @static - * @param {google.pubsub.v1.UpdateTopicRequest} message UpdateTopicRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateTopicRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.topic = null; - object.updateMask = null; - } - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - object.topic = $root.google.pubsub.v1.Topic.toObject(message.topic, options, q + 1); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); - return object; - }; - - /** - * Converts this UpdateTopicRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.UpdateTopicRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateTopicRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateTopicRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.UpdateTopicRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateTopicRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.UpdateTopicRequest"; - }; - - return UpdateTopicRequest; - })(); - - v1.PublishRequest = (function() { - - /** - * Properties of a PublishRequest. - * @memberof google.pubsub.v1 - * @interface IPublishRequest - * @property {string|null} [topic] PublishRequest topic - * @property {Array.|null} [messages] PublishRequest messages - */ - - /** - * Constructs a new PublishRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a PublishRequest. - * @implements IPublishRequest - * @constructor - * @param {google.pubsub.v1.IPublishRequest=} [properties] Properties to set - */ - function PublishRequest(properties) { - this.messages = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * PublishRequest topic. - * @member {string} topic - * @memberof google.pubsub.v1.PublishRequest - * @instance - */ - PublishRequest.prototype.topic = ""; - - /** - * PublishRequest messages. - * @member {Array.} messages - * @memberof google.pubsub.v1.PublishRequest - * @instance - */ - PublishRequest.prototype.messages = $util.emptyArray; - - /** - * Creates a new PublishRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.PublishRequest - * @static - * @param {google.pubsub.v1.IPublishRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.PublishRequest} PublishRequest instance - */ - PublishRequest.create = function create(properties) { - return new PublishRequest(properties); - }; - - /** - * Encodes the specified PublishRequest message. Does not implicitly {@link google.pubsub.v1.PublishRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.PublishRequest - * @static - * @param {google.pubsub.v1.IPublishRequest} message PublishRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublishRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); - if (message.messages != null && message.messages.length) - for (var i = 0; i < message.messages.length; ++i) - $root.google.pubsub.v1.PubsubMessage.encode(message.messages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified PublishRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.PublishRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.PublishRequest - * @static - * @param {google.pubsub.v1.IPublishRequest} message PublishRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublishRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a PublishRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.PublishRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.PublishRequest} PublishRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublishRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.PublishRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.topic = reader.string(); - break; - } - case 2: { - if (!(message.messages && message.messages.length)) - message.messages = []; - message.messages.push($root.google.pubsub.v1.PubsubMessage.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a PublishRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.PublishRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.PublishRequest} PublishRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublishRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PublishRequest message. - * @function verify - * @memberof google.pubsub.v1.PublishRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PublishRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - if (message.messages != null && Object.hasOwnProperty.call(message, "messages")) { - if (!Array.isArray(message.messages)) - return "messages: array expected"; - for (var i = 0; i < message.messages.length; ++i) { - var error = $root.google.pubsub.v1.PubsubMessage.verify(message.messages[i], long + 1); - if (error) - return "messages." + error; - } - } - return null; - }; - - /** - * Creates a PublishRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.PublishRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.PublishRequest} PublishRequest - */ - PublishRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.PublishRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.PublishRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.PublishRequest(); - if (object.topic != null) - message.topic = String(object.topic); - if (object.messages) { - if (!Array.isArray(object.messages)) - throw TypeError(".google.pubsub.v1.PublishRequest.messages: array expected"); - message.messages = []; - for (var i = 0; i < object.messages.length; ++i) { - if (!$util.isObject(object.messages[i])) - throw TypeError(".google.pubsub.v1.PublishRequest.messages: object expected"); - message.messages[i] = $root.google.pubsub.v1.PubsubMessage.fromObject(object.messages[i], long + 1); - } - } - return message; - }; - - /** - * Creates a plain object from a PublishRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.PublishRequest - * @static - * @param {google.pubsub.v1.PublishRequest} message PublishRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PublishRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.messages = []; - if (options.defaults) - object.topic = ""; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - object.topic = message.topic; - if (message.messages && message.messages.length) { - object.messages = []; - for (var j = 0; j < message.messages.length; ++j) - object.messages[j] = $root.google.pubsub.v1.PubsubMessage.toObject(message.messages[j], options, q + 1); - } - return object; - }; - - /** - * Converts this PublishRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.PublishRequest - * @instance - * @returns {Object.} JSON object - */ - PublishRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PublishRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.PublishRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PublishRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.PublishRequest"; - }; - - return PublishRequest; - })(); - - v1.PublishResponse = (function() { - - /** - * Properties of a PublishResponse. - * @memberof google.pubsub.v1 - * @interface IPublishResponse - * @property {Array.|null} [messageIds] PublishResponse messageIds - */ - - /** - * Constructs a new PublishResponse. - * @memberof google.pubsub.v1 - * @classdesc Represents a PublishResponse. - * @implements IPublishResponse - * @constructor - * @param {google.pubsub.v1.IPublishResponse=} [properties] Properties to set - */ - function PublishResponse(properties) { - this.messageIds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * PublishResponse messageIds. - * @member {Array.} messageIds - * @memberof google.pubsub.v1.PublishResponse - * @instance - */ - PublishResponse.prototype.messageIds = $util.emptyArray; - - /** - * Creates a new PublishResponse instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.PublishResponse - * @static - * @param {google.pubsub.v1.IPublishResponse=} [properties] Properties to set - * @returns {google.pubsub.v1.PublishResponse} PublishResponse instance - */ - PublishResponse.create = function create(properties) { - return new PublishResponse(properties); - }; - - /** - * Encodes the specified PublishResponse message. Does not implicitly {@link google.pubsub.v1.PublishResponse.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.PublishResponse - * @static - * @param {google.pubsub.v1.IPublishResponse} message PublishResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublishResponse.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.messageIds != null && message.messageIds.length) - for (var i = 0; i < message.messageIds.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.messageIds[i]); - return writer; - }; - - /** - * Encodes the specified PublishResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.PublishResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.PublishResponse - * @static - * @param {google.pubsub.v1.IPublishResponse} message PublishResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PublishResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a PublishResponse message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.PublishResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.PublishResponse} PublishResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublishResponse.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.PublishResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.messageIds && message.messageIds.length)) - message.messageIds = []; - message.messageIds.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a PublishResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.PublishResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.PublishResponse} PublishResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PublishResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PublishResponse message. - * @function verify - * @memberof google.pubsub.v1.PublishResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PublishResponse.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.messageIds != null && Object.hasOwnProperty.call(message, "messageIds")) { - if (!Array.isArray(message.messageIds)) - return "messageIds: array expected"; - for (var i = 0; i < message.messageIds.length; ++i) - if (!$util.isString(message.messageIds[i])) - return "messageIds: string[] expected"; - } - return null; - }; - - /** - * Creates a PublishResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.PublishResponse - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.PublishResponse} PublishResponse - */ - PublishResponse.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.PublishResponse) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.PublishResponse: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.PublishResponse(); - if (object.messageIds) { - if (!Array.isArray(object.messageIds)) - throw TypeError(".google.pubsub.v1.PublishResponse.messageIds: array expected"); - message.messageIds = []; - for (var i = 0; i < object.messageIds.length; ++i) - message.messageIds[i] = String(object.messageIds[i]); - } - return message; - }; - - /** - * Creates a plain object from a PublishResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.PublishResponse - * @static - * @param {google.pubsub.v1.PublishResponse} message PublishResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PublishResponse.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.messageIds = []; - if (message.messageIds && message.messageIds.length) { - object.messageIds = []; - for (var j = 0; j < message.messageIds.length; ++j) - object.messageIds[j] = message.messageIds[j]; - } - return object; - }; - - /** - * Converts this PublishResponse to JSON. - * @function toJSON - * @memberof google.pubsub.v1.PublishResponse - * @instance - * @returns {Object.} JSON object - */ - PublishResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PublishResponse - * @function getTypeUrl - * @memberof google.pubsub.v1.PublishResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PublishResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.PublishResponse"; - }; - - return PublishResponse; - })(); - - v1.ListTopicsRequest = (function() { - - /** - * Properties of a ListTopicsRequest. - * @memberof google.pubsub.v1 - * @interface IListTopicsRequest - * @property {string|null} [project] ListTopicsRequest project - * @property {number|null} [pageSize] ListTopicsRequest pageSize - * @property {string|null} [pageToken] ListTopicsRequest pageToken - */ - - /** - * Constructs a new ListTopicsRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a ListTopicsRequest. - * @implements IListTopicsRequest - * @constructor - * @param {google.pubsub.v1.IListTopicsRequest=} [properties] Properties to set - */ - function ListTopicsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTopicsRequest project. - * @member {string} project - * @memberof google.pubsub.v1.ListTopicsRequest - * @instance - */ - ListTopicsRequest.prototype.project = ""; - - /** - * ListTopicsRequest pageSize. - * @member {number} pageSize - * @memberof google.pubsub.v1.ListTopicsRequest - * @instance - */ - ListTopicsRequest.prototype.pageSize = 0; - - /** - * ListTopicsRequest pageToken. - * @member {string} pageToken - * @memberof google.pubsub.v1.ListTopicsRequest - * @instance - */ - ListTopicsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListTopicsRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ListTopicsRequest - * @static - * @param {google.pubsub.v1.IListTopicsRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.ListTopicsRequest} ListTopicsRequest instance - */ - ListTopicsRequest.create = function create(properties) { - return new ListTopicsRequest(properties); - }; - - /** - * Encodes the specified ListTopicsRequest message. Does not implicitly {@link google.pubsub.v1.ListTopicsRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ListTopicsRequest - * @static - * @param {google.pubsub.v1.IListTopicsRequest} message ListTopicsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTopicsRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListTopicsRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ListTopicsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ListTopicsRequest - * @static - * @param {google.pubsub.v1.IListTopicsRequest} message ListTopicsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTopicsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ListTopicsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ListTopicsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ListTopicsRequest} ListTopicsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTopicsRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ListTopicsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.project = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ListTopicsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ListTopicsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ListTopicsRequest} ListTopicsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTopicsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTopicsRequest message. - * @function verify - * @memberof google.pubsub.v1.ListTopicsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTopicsRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListTopicsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ListTopicsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ListTopicsRequest} ListTopicsRequest - */ - ListTopicsRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ListTopicsRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ListTopicsRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ListTopicsRequest(); - if (object.project != null) - message.project = String(object.project); - 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 ListTopicsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ListTopicsRequest - * @static - * @param {google.pubsub.v1.ListTopicsRequest} message ListTopicsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTopicsRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.project = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - object.project = message.project; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListTopicsRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ListTopicsRequest - * @instance - * @returns {Object.} JSON object - */ - ListTopicsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTopicsRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.ListTopicsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTopicsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ListTopicsRequest"; - }; - - return ListTopicsRequest; - })(); - - v1.ListTopicsResponse = (function() { - - /** - * Properties of a ListTopicsResponse. - * @memberof google.pubsub.v1 - * @interface IListTopicsResponse - * @property {Array.|null} [topics] ListTopicsResponse topics - * @property {string|null} [nextPageToken] ListTopicsResponse nextPageToken - */ - - /** - * Constructs a new ListTopicsResponse. - * @memberof google.pubsub.v1 - * @classdesc Represents a ListTopicsResponse. - * @implements IListTopicsResponse - * @constructor - * @param {google.pubsub.v1.IListTopicsResponse=} [properties] Properties to set - */ - function ListTopicsResponse(properties) { - this.topics = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTopicsResponse topics. - * @member {Array.} topics - * @memberof google.pubsub.v1.ListTopicsResponse - * @instance - */ - ListTopicsResponse.prototype.topics = $util.emptyArray; - - /** - * ListTopicsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.pubsub.v1.ListTopicsResponse - * @instance - */ - ListTopicsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListTopicsResponse instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ListTopicsResponse - * @static - * @param {google.pubsub.v1.IListTopicsResponse=} [properties] Properties to set - * @returns {google.pubsub.v1.ListTopicsResponse} ListTopicsResponse instance - */ - ListTopicsResponse.create = function create(properties) { - return new ListTopicsResponse(properties); - }; - - /** - * Encodes the specified ListTopicsResponse message. Does not implicitly {@link google.pubsub.v1.ListTopicsResponse.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ListTopicsResponse - * @static - * @param {google.pubsub.v1.IListTopicsResponse} message ListTopicsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTopicsResponse.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.topics != null && message.topics.length) - for (var i = 0; i < message.topics.length; ++i) - $root.google.pubsub.v1.Topic.encode(message.topics[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListTopicsResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ListTopicsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ListTopicsResponse - * @static - * @param {google.pubsub.v1.IListTopicsResponse} message ListTopicsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTopicsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ListTopicsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ListTopicsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ListTopicsResponse} ListTopicsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTopicsResponse.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ListTopicsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.topics && message.topics.length)) - message.topics = []; - message.topics.push($root.google.pubsub.v1.Topic.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ListTopicsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ListTopicsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ListTopicsResponse} ListTopicsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTopicsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTopicsResponse message. - * @function verify - * @memberof google.pubsub.v1.ListTopicsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTopicsResponse.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.topics != null && Object.hasOwnProperty.call(message, "topics")) { - if (!Array.isArray(message.topics)) - return "topics: array expected"; - for (var i = 0; i < message.topics.length; ++i) { - var error = $root.google.pubsub.v1.Topic.verify(message.topics[i], long + 1); - if (error) - return "topics." + error; - } - } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListTopicsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ListTopicsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ListTopicsResponse} ListTopicsResponse - */ - ListTopicsResponse.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ListTopicsResponse) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ListTopicsResponse: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ListTopicsResponse(); - if (object.topics) { - if (!Array.isArray(object.topics)) - throw TypeError(".google.pubsub.v1.ListTopicsResponse.topics: array expected"); - message.topics = []; - for (var i = 0; i < object.topics.length; ++i) { - if (!$util.isObject(object.topics[i])) - throw TypeError(".google.pubsub.v1.ListTopicsResponse.topics: object expected"); - message.topics[i] = $root.google.pubsub.v1.Topic.fromObject(object.topics[i], long + 1); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListTopicsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ListTopicsResponse - * @static - * @param {google.pubsub.v1.ListTopicsResponse} message ListTopicsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTopicsResponse.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.topics = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.topics && message.topics.length) { - object.topics = []; - for (var j = 0; j < message.topics.length; ++j) - object.topics[j] = $root.google.pubsub.v1.Topic.toObject(message.topics[j], options, q + 1); - } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListTopicsResponse to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ListTopicsResponse - * @instance - * @returns {Object.} JSON object - */ - ListTopicsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTopicsResponse - * @function getTypeUrl - * @memberof google.pubsub.v1.ListTopicsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTopicsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ListTopicsResponse"; - }; - - return ListTopicsResponse; - })(); - - v1.ListTopicSubscriptionsRequest = (function() { - - /** - * Properties of a ListTopicSubscriptionsRequest. - * @memberof google.pubsub.v1 - * @interface IListTopicSubscriptionsRequest - * @property {string|null} [topic] ListTopicSubscriptionsRequest topic - * @property {number|null} [pageSize] ListTopicSubscriptionsRequest pageSize - * @property {string|null} [pageToken] ListTopicSubscriptionsRequest pageToken - */ - - /** - * Constructs a new ListTopicSubscriptionsRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a ListTopicSubscriptionsRequest. - * @implements IListTopicSubscriptionsRequest - * @constructor - * @param {google.pubsub.v1.IListTopicSubscriptionsRequest=} [properties] Properties to set - */ - function ListTopicSubscriptionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTopicSubscriptionsRequest topic. - * @member {string} topic - * @memberof google.pubsub.v1.ListTopicSubscriptionsRequest - * @instance - */ - ListTopicSubscriptionsRequest.prototype.topic = ""; - - /** - * ListTopicSubscriptionsRequest pageSize. - * @member {number} pageSize - * @memberof google.pubsub.v1.ListTopicSubscriptionsRequest - * @instance - */ - ListTopicSubscriptionsRequest.prototype.pageSize = 0; - - /** - * ListTopicSubscriptionsRequest pageToken. - * @member {string} pageToken - * @memberof google.pubsub.v1.ListTopicSubscriptionsRequest - * @instance - */ - ListTopicSubscriptionsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListTopicSubscriptionsRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ListTopicSubscriptionsRequest - * @static - * @param {google.pubsub.v1.IListTopicSubscriptionsRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.ListTopicSubscriptionsRequest} ListTopicSubscriptionsRequest instance - */ - ListTopicSubscriptionsRequest.create = function create(properties) { - return new ListTopicSubscriptionsRequest(properties); - }; - - /** - * Encodes the specified ListTopicSubscriptionsRequest message. Does not implicitly {@link google.pubsub.v1.ListTopicSubscriptionsRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ListTopicSubscriptionsRequest - * @static - * @param {google.pubsub.v1.IListTopicSubscriptionsRequest} message ListTopicSubscriptionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTopicSubscriptionsRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListTopicSubscriptionsRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ListTopicSubscriptionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ListTopicSubscriptionsRequest - * @static - * @param {google.pubsub.v1.IListTopicSubscriptionsRequest} message ListTopicSubscriptionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTopicSubscriptionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ListTopicSubscriptionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ListTopicSubscriptionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ListTopicSubscriptionsRequest} ListTopicSubscriptionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTopicSubscriptionsRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ListTopicSubscriptionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.topic = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ListTopicSubscriptionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ListTopicSubscriptionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ListTopicSubscriptionsRequest} ListTopicSubscriptionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTopicSubscriptionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTopicSubscriptionsRequest message. - * @function verify - * @memberof google.pubsub.v1.ListTopicSubscriptionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTopicSubscriptionsRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListTopicSubscriptionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ListTopicSubscriptionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ListTopicSubscriptionsRequest} ListTopicSubscriptionsRequest - */ - ListTopicSubscriptionsRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ListTopicSubscriptionsRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ListTopicSubscriptionsRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ListTopicSubscriptionsRequest(); - if (object.topic != null) - message.topic = String(object.topic); - 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 ListTopicSubscriptionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ListTopicSubscriptionsRequest - * @static - * @param {google.pubsub.v1.ListTopicSubscriptionsRequest} message ListTopicSubscriptionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTopicSubscriptionsRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.topic = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - object.topic = message.topic; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListTopicSubscriptionsRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ListTopicSubscriptionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListTopicSubscriptionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTopicSubscriptionsRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.ListTopicSubscriptionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTopicSubscriptionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ListTopicSubscriptionsRequest"; - }; - - return ListTopicSubscriptionsRequest; - })(); - - v1.ListTopicSubscriptionsResponse = (function() { - - /** - * Properties of a ListTopicSubscriptionsResponse. - * @memberof google.pubsub.v1 - * @interface IListTopicSubscriptionsResponse - * @property {Array.|null} [subscriptions] ListTopicSubscriptionsResponse subscriptions - * @property {string|null} [nextPageToken] ListTopicSubscriptionsResponse nextPageToken - */ - - /** - * Constructs a new ListTopicSubscriptionsResponse. - * @memberof google.pubsub.v1 - * @classdesc Represents a ListTopicSubscriptionsResponse. - * @implements IListTopicSubscriptionsResponse - * @constructor - * @param {google.pubsub.v1.IListTopicSubscriptionsResponse=} [properties] Properties to set - */ - function ListTopicSubscriptionsResponse(properties) { - this.subscriptions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTopicSubscriptionsResponse subscriptions. - * @member {Array.} subscriptions - * @memberof google.pubsub.v1.ListTopicSubscriptionsResponse - * @instance - */ - ListTopicSubscriptionsResponse.prototype.subscriptions = $util.emptyArray; - - /** - * ListTopicSubscriptionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.pubsub.v1.ListTopicSubscriptionsResponse - * @instance - */ - ListTopicSubscriptionsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListTopicSubscriptionsResponse instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ListTopicSubscriptionsResponse - * @static - * @param {google.pubsub.v1.IListTopicSubscriptionsResponse=} [properties] Properties to set - * @returns {google.pubsub.v1.ListTopicSubscriptionsResponse} ListTopicSubscriptionsResponse instance - */ - ListTopicSubscriptionsResponse.create = function create(properties) { - return new ListTopicSubscriptionsResponse(properties); - }; - - /** - * Encodes the specified ListTopicSubscriptionsResponse message. Does not implicitly {@link google.pubsub.v1.ListTopicSubscriptionsResponse.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ListTopicSubscriptionsResponse - * @static - * @param {google.pubsub.v1.IListTopicSubscriptionsResponse} message ListTopicSubscriptionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTopicSubscriptionsResponse.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.subscriptions != null && message.subscriptions.length) - for (var i = 0; i < message.subscriptions.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subscriptions[i]); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListTopicSubscriptionsResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ListTopicSubscriptionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ListTopicSubscriptionsResponse - * @static - * @param {google.pubsub.v1.IListTopicSubscriptionsResponse} message ListTopicSubscriptionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTopicSubscriptionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ListTopicSubscriptionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ListTopicSubscriptionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ListTopicSubscriptionsResponse} ListTopicSubscriptionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTopicSubscriptionsResponse.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ListTopicSubscriptionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.subscriptions && message.subscriptions.length)) - message.subscriptions = []; - message.subscriptions.push(reader.string()); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ListTopicSubscriptionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ListTopicSubscriptionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ListTopicSubscriptionsResponse} ListTopicSubscriptionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTopicSubscriptionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTopicSubscriptionsResponse message. - * @function verify - * @memberof google.pubsub.v1.ListTopicSubscriptionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTopicSubscriptionsResponse.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.subscriptions != null && Object.hasOwnProperty.call(message, "subscriptions")) { - if (!Array.isArray(message.subscriptions)) - return "subscriptions: array expected"; - for (var i = 0; i < message.subscriptions.length; ++i) - if (!$util.isString(message.subscriptions[i])) - return "subscriptions: string[] expected"; - } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListTopicSubscriptionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ListTopicSubscriptionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ListTopicSubscriptionsResponse} ListTopicSubscriptionsResponse - */ - ListTopicSubscriptionsResponse.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ListTopicSubscriptionsResponse) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ListTopicSubscriptionsResponse: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ListTopicSubscriptionsResponse(); - if (object.subscriptions) { - if (!Array.isArray(object.subscriptions)) - throw TypeError(".google.pubsub.v1.ListTopicSubscriptionsResponse.subscriptions: array expected"); - message.subscriptions = []; - for (var i = 0; i < object.subscriptions.length; ++i) - message.subscriptions[i] = String(object.subscriptions[i]); - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListTopicSubscriptionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ListTopicSubscriptionsResponse - * @static - * @param {google.pubsub.v1.ListTopicSubscriptionsResponse} message ListTopicSubscriptionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTopicSubscriptionsResponse.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.subscriptions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.subscriptions && message.subscriptions.length) { - object.subscriptions = []; - for (var j = 0; j < message.subscriptions.length; ++j) - object.subscriptions[j] = message.subscriptions[j]; - } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListTopicSubscriptionsResponse to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ListTopicSubscriptionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListTopicSubscriptionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTopicSubscriptionsResponse - * @function getTypeUrl - * @memberof google.pubsub.v1.ListTopicSubscriptionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTopicSubscriptionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ListTopicSubscriptionsResponse"; - }; - - return ListTopicSubscriptionsResponse; - })(); - - v1.ListTopicSnapshotsRequest = (function() { - - /** - * Properties of a ListTopicSnapshotsRequest. - * @memberof google.pubsub.v1 - * @interface IListTopicSnapshotsRequest - * @property {string|null} [topic] ListTopicSnapshotsRequest topic - * @property {number|null} [pageSize] ListTopicSnapshotsRequest pageSize - * @property {string|null} [pageToken] ListTopicSnapshotsRequest pageToken - */ - - /** - * Constructs a new ListTopicSnapshotsRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a ListTopicSnapshotsRequest. - * @implements IListTopicSnapshotsRequest - * @constructor - * @param {google.pubsub.v1.IListTopicSnapshotsRequest=} [properties] Properties to set - */ - function ListTopicSnapshotsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTopicSnapshotsRequest topic. - * @member {string} topic - * @memberof google.pubsub.v1.ListTopicSnapshotsRequest - * @instance - */ - ListTopicSnapshotsRequest.prototype.topic = ""; - - /** - * ListTopicSnapshotsRequest pageSize. - * @member {number} pageSize - * @memberof google.pubsub.v1.ListTopicSnapshotsRequest - * @instance - */ - ListTopicSnapshotsRequest.prototype.pageSize = 0; - - /** - * ListTopicSnapshotsRequest pageToken. - * @member {string} pageToken - * @memberof google.pubsub.v1.ListTopicSnapshotsRequest - * @instance - */ - ListTopicSnapshotsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListTopicSnapshotsRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ListTopicSnapshotsRequest - * @static - * @param {google.pubsub.v1.IListTopicSnapshotsRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.ListTopicSnapshotsRequest} ListTopicSnapshotsRequest instance - */ - ListTopicSnapshotsRequest.create = function create(properties) { - return new ListTopicSnapshotsRequest(properties); - }; - - /** - * Encodes the specified ListTopicSnapshotsRequest message. Does not implicitly {@link google.pubsub.v1.ListTopicSnapshotsRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ListTopicSnapshotsRequest - * @static - * @param {google.pubsub.v1.IListTopicSnapshotsRequest} message ListTopicSnapshotsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTopicSnapshotsRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListTopicSnapshotsRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ListTopicSnapshotsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ListTopicSnapshotsRequest - * @static - * @param {google.pubsub.v1.IListTopicSnapshotsRequest} message ListTopicSnapshotsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTopicSnapshotsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ListTopicSnapshotsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ListTopicSnapshotsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ListTopicSnapshotsRequest} ListTopicSnapshotsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTopicSnapshotsRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ListTopicSnapshotsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.topic = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ListTopicSnapshotsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ListTopicSnapshotsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ListTopicSnapshotsRequest} ListTopicSnapshotsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTopicSnapshotsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTopicSnapshotsRequest message. - * @function verify - * @memberof google.pubsub.v1.ListTopicSnapshotsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTopicSnapshotsRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListTopicSnapshotsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ListTopicSnapshotsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ListTopicSnapshotsRequest} ListTopicSnapshotsRequest - */ - ListTopicSnapshotsRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ListTopicSnapshotsRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ListTopicSnapshotsRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ListTopicSnapshotsRequest(); - if (object.topic != null) - message.topic = String(object.topic); - 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 ListTopicSnapshotsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ListTopicSnapshotsRequest - * @static - * @param {google.pubsub.v1.ListTopicSnapshotsRequest} message ListTopicSnapshotsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTopicSnapshotsRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.topic = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - object.topic = message.topic; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListTopicSnapshotsRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ListTopicSnapshotsRequest - * @instance - * @returns {Object.} JSON object - */ - ListTopicSnapshotsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTopicSnapshotsRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.ListTopicSnapshotsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTopicSnapshotsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ListTopicSnapshotsRequest"; - }; - - return ListTopicSnapshotsRequest; - })(); - - v1.ListTopicSnapshotsResponse = (function() { - - /** - * Properties of a ListTopicSnapshotsResponse. - * @memberof google.pubsub.v1 - * @interface IListTopicSnapshotsResponse - * @property {Array.|null} [snapshots] ListTopicSnapshotsResponse snapshots - * @property {string|null} [nextPageToken] ListTopicSnapshotsResponse nextPageToken - */ - - /** - * Constructs a new ListTopicSnapshotsResponse. - * @memberof google.pubsub.v1 - * @classdesc Represents a ListTopicSnapshotsResponse. - * @implements IListTopicSnapshotsResponse - * @constructor - * @param {google.pubsub.v1.IListTopicSnapshotsResponse=} [properties] Properties to set - */ - function ListTopicSnapshotsResponse(properties) { - this.snapshots = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListTopicSnapshotsResponse snapshots. - * @member {Array.} snapshots - * @memberof google.pubsub.v1.ListTopicSnapshotsResponse - * @instance - */ - ListTopicSnapshotsResponse.prototype.snapshots = $util.emptyArray; - - /** - * ListTopicSnapshotsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.pubsub.v1.ListTopicSnapshotsResponse - * @instance - */ - ListTopicSnapshotsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListTopicSnapshotsResponse instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ListTopicSnapshotsResponse - * @static - * @param {google.pubsub.v1.IListTopicSnapshotsResponse=} [properties] Properties to set - * @returns {google.pubsub.v1.ListTopicSnapshotsResponse} ListTopicSnapshotsResponse instance - */ - ListTopicSnapshotsResponse.create = function create(properties) { - return new ListTopicSnapshotsResponse(properties); - }; - - /** - * Encodes the specified ListTopicSnapshotsResponse message. Does not implicitly {@link google.pubsub.v1.ListTopicSnapshotsResponse.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ListTopicSnapshotsResponse - * @static - * @param {google.pubsub.v1.IListTopicSnapshotsResponse} message ListTopicSnapshotsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTopicSnapshotsResponse.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.snapshots != null && message.snapshots.length) - for (var i = 0; i < message.snapshots.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.snapshots[i]); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListTopicSnapshotsResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ListTopicSnapshotsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ListTopicSnapshotsResponse - * @static - * @param {google.pubsub.v1.IListTopicSnapshotsResponse} message ListTopicSnapshotsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListTopicSnapshotsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ListTopicSnapshotsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ListTopicSnapshotsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ListTopicSnapshotsResponse} ListTopicSnapshotsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTopicSnapshotsResponse.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ListTopicSnapshotsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.snapshots && message.snapshots.length)) - message.snapshots = []; - message.snapshots.push(reader.string()); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ListTopicSnapshotsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ListTopicSnapshotsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ListTopicSnapshotsResponse} ListTopicSnapshotsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListTopicSnapshotsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListTopicSnapshotsResponse message. - * @function verify - * @memberof google.pubsub.v1.ListTopicSnapshotsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListTopicSnapshotsResponse.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.snapshots != null && Object.hasOwnProperty.call(message, "snapshots")) { - if (!Array.isArray(message.snapshots)) - return "snapshots: array expected"; - for (var i = 0; i < message.snapshots.length; ++i) - if (!$util.isString(message.snapshots[i])) - return "snapshots: string[] expected"; - } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListTopicSnapshotsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ListTopicSnapshotsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ListTopicSnapshotsResponse} ListTopicSnapshotsResponse - */ - ListTopicSnapshotsResponse.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ListTopicSnapshotsResponse) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ListTopicSnapshotsResponse: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ListTopicSnapshotsResponse(); - if (object.snapshots) { - if (!Array.isArray(object.snapshots)) - throw TypeError(".google.pubsub.v1.ListTopicSnapshotsResponse.snapshots: array expected"); - message.snapshots = []; - for (var i = 0; i < object.snapshots.length; ++i) - message.snapshots[i] = String(object.snapshots[i]); - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListTopicSnapshotsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ListTopicSnapshotsResponse - * @static - * @param {google.pubsub.v1.ListTopicSnapshotsResponse} message ListTopicSnapshotsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListTopicSnapshotsResponse.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.snapshots = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.snapshots && message.snapshots.length) { - object.snapshots = []; - for (var j = 0; j < message.snapshots.length; ++j) - object.snapshots[j] = message.snapshots[j]; - } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListTopicSnapshotsResponse to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ListTopicSnapshotsResponse - * @instance - * @returns {Object.} JSON object - */ - ListTopicSnapshotsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListTopicSnapshotsResponse - * @function getTypeUrl - * @memberof google.pubsub.v1.ListTopicSnapshotsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListTopicSnapshotsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ListTopicSnapshotsResponse"; - }; - - return ListTopicSnapshotsResponse; - })(); - - v1.DeleteTopicRequest = (function() { - - /** - * Properties of a DeleteTopicRequest. - * @memberof google.pubsub.v1 - * @interface IDeleteTopicRequest - * @property {string|null} [topic] DeleteTopicRequest topic - */ - - /** - * Constructs a new DeleteTopicRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a DeleteTopicRequest. - * @implements IDeleteTopicRequest - * @constructor - * @param {google.pubsub.v1.IDeleteTopicRequest=} [properties] Properties to set - */ - function DeleteTopicRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteTopicRequest topic. - * @member {string} topic - * @memberof google.pubsub.v1.DeleteTopicRequest - * @instance - */ - DeleteTopicRequest.prototype.topic = ""; - - /** - * Creates a new DeleteTopicRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.DeleteTopicRequest - * @static - * @param {google.pubsub.v1.IDeleteTopicRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.DeleteTopicRequest} DeleteTopicRequest instance - */ - DeleteTopicRequest.create = function create(properties) { - return new DeleteTopicRequest(properties); - }; - - /** - * Encodes the specified DeleteTopicRequest message. Does not implicitly {@link google.pubsub.v1.DeleteTopicRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.DeleteTopicRequest - * @static - * @param {google.pubsub.v1.IDeleteTopicRequest} message DeleteTopicRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTopicRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); - return writer; - }; - - /** - * Encodes the specified DeleteTopicRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.DeleteTopicRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.DeleteTopicRequest - * @static - * @param {google.pubsub.v1.IDeleteTopicRequest} message DeleteTopicRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteTopicRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a DeleteTopicRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.DeleteTopicRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.DeleteTopicRequest} DeleteTopicRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTopicRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.DeleteTopicRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.topic = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteTopicRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.DeleteTopicRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.DeleteTopicRequest} DeleteTopicRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteTopicRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteTopicRequest message. - * @function verify - * @memberof google.pubsub.v1.DeleteTopicRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteTopicRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - return null; - }; - - /** - * Creates a DeleteTopicRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.DeleteTopicRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.DeleteTopicRequest} DeleteTopicRequest - */ - DeleteTopicRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.DeleteTopicRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.DeleteTopicRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.DeleteTopicRequest(); - if (object.topic != null) - message.topic = String(object.topic); - return message; - }; - - /** - * Creates a plain object from a DeleteTopicRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.DeleteTopicRequest - * @static - * @param {google.pubsub.v1.DeleteTopicRequest} message DeleteTopicRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteTopicRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.topic = ""; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - object.topic = message.topic; - return object; - }; - - /** - * Converts this DeleteTopicRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.DeleteTopicRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteTopicRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteTopicRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.DeleteTopicRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteTopicRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.DeleteTopicRequest"; - }; - - return DeleteTopicRequest; - })(); - - v1.DetachSubscriptionRequest = (function() { - - /** - * Properties of a DetachSubscriptionRequest. - * @memberof google.pubsub.v1 - * @interface IDetachSubscriptionRequest - * @property {string|null} [subscription] DetachSubscriptionRequest subscription - */ - - /** - * Constructs a new DetachSubscriptionRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a DetachSubscriptionRequest. - * @implements IDetachSubscriptionRequest - * @constructor - * @param {google.pubsub.v1.IDetachSubscriptionRequest=} [properties] Properties to set - */ - function DetachSubscriptionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * DetachSubscriptionRequest subscription. - * @member {string} subscription - * @memberof google.pubsub.v1.DetachSubscriptionRequest - * @instance - */ - DetachSubscriptionRequest.prototype.subscription = ""; - - /** - * Creates a new DetachSubscriptionRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.DetachSubscriptionRequest - * @static - * @param {google.pubsub.v1.IDetachSubscriptionRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.DetachSubscriptionRequest} DetachSubscriptionRequest instance - */ - DetachSubscriptionRequest.create = function create(properties) { - return new DetachSubscriptionRequest(properties); - }; - - /** - * Encodes the specified DetachSubscriptionRequest message. Does not implicitly {@link google.pubsub.v1.DetachSubscriptionRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.DetachSubscriptionRequest - * @static - * @param {google.pubsub.v1.IDetachSubscriptionRequest} message DetachSubscriptionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DetachSubscriptionRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subscription); - return writer; - }; - - /** - * Encodes the specified DetachSubscriptionRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.DetachSubscriptionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.DetachSubscriptionRequest - * @static - * @param {google.pubsub.v1.IDetachSubscriptionRequest} message DetachSubscriptionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DetachSubscriptionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a DetachSubscriptionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.DetachSubscriptionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.DetachSubscriptionRequest} DetachSubscriptionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DetachSubscriptionRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.DetachSubscriptionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.subscription = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a DetachSubscriptionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.DetachSubscriptionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.DetachSubscriptionRequest} DetachSubscriptionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DetachSubscriptionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DetachSubscriptionRequest message. - * @function verify - * @memberof google.pubsub.v1.DetachSubscriptionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DetachSubscriptionRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - if (!$util.isString(message.subscription)) - return "subscription: string expected"; - return null; - }; - - /** - * Creates a DetachSubscriptionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.DetachSubscriptionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.DetachSubscriptionRequest} DetachSubscriptionRequest - */ - DetachSubscriptionRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.DetachSubscriptionRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.DetachSubscriptionRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.DetachSubscriptionRequest(); - if (object.subscription != null) - message.subscription = String(object.subscription); - return message; - }; - - /** - * Creates a plain object from a DetachSubscriptionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.DetachSubscriptionRequest - * @static - * @param {google.pubsub.v1.DetachSubscriptionRequest} message DetachSubscriptionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DetachSubscriptionRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.subscription = ""; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - object.subscription = message.subscription; - return object; - }; - - /** - * Converts this DetachSubscriptionRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.DetachSubscriptionRequest - * @instance - * @returns {Object.} JSON object - */ - DetachSubscriptionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DetachSubscriptionRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.DetachSubscriptionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DetachSubscriptionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.DetachSubscriptionRequest"; - }; - - return DetachSubscriptionRequest; - })(); - - v1.DetachSubscriptionResponse = (function() { - - /** - * Properties of a DetachSubscriptionResponse. - * @memberof google.pubsub.v1 - * @interface IDetachSubscriptionResponse - */ - - /** - * Constructs a new DetachSubscriptionResponse. - * @memberof google.pubsub.v1 - * @classdesc Represents a DetachSubscriptionResponse. - * @implements IDetachSubscriptionResponse - * @constructor - * @param {google.pubsub.v1.IDetachSubscriptionResponse=} [properties] Properties to set - */ - function DetachSubscriptionResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new DetachSubscriptionResponse instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.DetachSubscriptionResponse - * @static - * @param {google.pubsub.v1.IDetachSubscriptionResponse=} [properties] Properties to set - * @returns {google.pubsub.v1.DetachSubscriptionResponse} DetachSubscriptionResponse instance - */ - DetachSubscriptionResponse.create = function create(properties) { - return new DetachSubscriptionResponse(properties); - }; - - /** - * Encodes the specified DetachSubscriptionResponse message. Does not implicitly {@link google.pubsub.v1.DetachSubscriptionResponse.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.DetachSubscriptionResponse - * @static - * @param {google.pubsub.v1.IDetachSubscriptionResponse} message DetachSubscriptionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DetachSubscriptionResponse.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - return writer; - }; - - /** - * Encodes the specified DetachSubscriptionResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.DetachSubscriptionResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.DetachSubscriptionResponse - * @static - * @param {google.pubsub.v1.IDetachSubscriptionResponse} message DetachSubscriptionResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DetachSubscriptionResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a DetachSubscriptionResponse message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.DetachSubscriptionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.DetachSubscriptionResponse} DetachSubscriptionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DetachSubscriptionResponse.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.DetachSubscriptionResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a DetachSubscriptionResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.DetachSubscriptionResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.DetachSubscriptionResponse} DetachSubscriptionResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DetachSubscriptionResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DetachSubscriptionResponse message. - * @function verify - * @memberof google.pubsub.v1.DetachSubscriptionResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DetachSubscriptionResponse.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - return null; - }; - - /** - * Creates a DetachSubscriptionResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.DetachSubscriptionResponse - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.DetachSubscriptionResponse} DetachSubscriptionResponse - */ - DetachSubscriptionResponse.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.DetachSubscriptionResponse) - return object; - return new $root.google.pubsub.v1.DetachSubscriptionResponse(); - }; - - /** - * Creates a plain object from a DetachSubscriptionResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.DetachSubscriptionResponse - * @static - * @param {google.pubsub.v1.DetachSubscriptionResponse} message DetachSubscriptionResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DetachSubscriptionResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this DetachSubscriptionResponse to JSON. - * @function toJSON - * @memberof google.pubsub.v1.DetachSubscriptionResponse - * @instance - * @returns {Object.} JSON object - */ - DetachSubscriptionResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DetachSubscriptionResponse - * @function getTypeUrl - * @memberof google.pubsub.v1.DetachSubscriptionResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DetachSubscriptionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.DetachSubscriptionResponse"; - }; - - return DetachSubscriptionResponse; - })(); - - v1.Subscriber = (function() { - - /** - * Constructs a new Subscriber service. - * @memberof google.pubsub.v1 - * @classdesc Represents a Subscriber - * @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 Subscriber(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Subscriber.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Subscriber; - - /** - * Creates new Subscriber service using the specified rpc implementation. - * @function create - * @memberof google.pubsub.v1.Subscriber - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {Subscriber} RPC service. Useful where requests and/or responses are streamed. - */ - Subscriber.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|createSubscription}. - * @memberof google.pubsub.v1.Subscriber - * @typedef CreateSubscriptionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.Subscription} [response] Subscription - */ - - /** - * Calls CreateSubscription. - * @function createSubscription - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.ISubscription} request Subscription message or plain object - * @param {google.pubsub.v1.Subscriber.CreateSubscriptionCallback} callback Node-style callback called with the error, if any, and Subscription - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Subscriber.prototype.createSubscription = function createSubscription(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, createSubscription, $root.google.pubsub.v1.Subscription, $root.google.pubsub.v1.Subscription, request, callback); - }, "name", { value: "CreateSubscription" }); - - /** - * Calls CreateSubscription. - * @function createSubscription - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.ISubscription} request Subscription message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|getSubscription}. - * @memberof google.pubsub.v1.Subscriber - * @typedef GetSubscriptionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.Subscription} [response] Subscription - */ - - /** - * Calls GetSubscription. - * @function getSubscription - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IGetSubscriptionRequest} request GetSubscriptionRequest message or plain object - * @param {google.pubsub.v1.Subscriber.GetSubscriptionCallback} callback Node-style callback called with the error, if any, and Subscription - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Subscriber.prototype.getSubscription = function getSubscription(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, getSubscription, $root.google.pubsub.v1.GetSubscriptionRequest, $root.google.pubsub.v1.Subscription, request, callback); - }, "name", { value: "GetSubscription" }); - - /** - * Calls GetSubscription. - * @function getSubscription - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IGetSubscriptionRequest} request GetSubscriptionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|updateSubscription}. - * @memberof google.pubsub.v1.Subscriber - * @typedef UpdateSubscriptionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.Subscription} [response] Subscription - */ - - /** - * Calls UpdateSubscription. - * @function updateSubscription - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IUpdateSubscriptionRequest} request UpdateSubscriptionRequest message or plain object - * @param {google.pubsub.v1.Subscriber.UpdateSubscriptionCallback} callback Node-style callback called with the error, if any, and Subscription - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Subscriber.prototype.updateSubscription = function updateSubscription(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateSubscription, $root.google.pubsub.v1.UpdateSubscriptionRequest, $root.google.pubsub.v1.Subscription, request, callback); - }, "name", { value: "UpdateSubscription" }); - - /** - * Calls UpdateSubscription. - * @function updateSubscription - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IUpdateSubscriptionRequest} request UpdateSubscriptionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|listSubscriptions}. - * @memberof google.pubsub.v1.Subscriber - * @typedef ListSubscriptionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.ListSubscriptionsResponse} [response] ListSubscriptionsResponse - */ - - /** - * Calls ListSubscriptions. - * @function listSubscriptions - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IListSubscriptionsRequest} request ListSubscriptionsRequest message or plain object - * @param {google.pubsub.v1.Subscriber.ListSubscriptionsCallback} callback Node-style callback called with the error, if any, and ListSubscriptionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Subscriber.prototype.listSubscriptions = function listSubscriptions(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, listSubscriptions, $root.google.pubsub.v1.ListSubscriptionsRequest, $root.google.pubsub.v1.ListSubscriptionsResponse, request, callback); - }, "name", { value: "ListSubscriptions" }); - - /** - * Calls ListSubscriptions. - * @function listSubscriptions - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IListSubscriptionsRequest} request ListSubscriptionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|deleteSubscription}. - * @memberof google.pubsub.v1.Subscriber - * @typedef DeleteSubscriptionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteSubscription. - * @function deleteSubscription - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IDeleteSubscriptionRequest} request DeleteSubscriptionRequest message or plain object - * @param {google.pubsub.v1.Subscriber.DeleteSubscriptionCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Subscriber.prototype.deleteSubscription = function deleteSubscription(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteSubscription, $root.google.pubsub.v1.DeleteSubscriptionRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSubscription" }); - - /** - * Calls DeleteSubscription. - * @function deleteSubscription - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IDeleteSubscriptionRequest} request DeleteSubscriptionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|modifyAckDeadline}. - * @memberof google.pubsub.v1.Subscriber - * @typedef ModifyAckDeadlineCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls ModifyAckDeadline. - * @function modifyAckDeadline - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IModifyAckDeadlineRequest} request ModifyAckDeadlineRequest message or plain object - * @param {google.pubsub.v1.Subscriber.ModifyAckDeadlineCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Subscriber.prototype.modifyAckDeadline = function modifyAckDeadline(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, modifyAckDeadline, $root.google.pubsub.v1.ModifyAckDeadlineRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "ModifyAckDeadline" }); - - /** - * Calls ModifyAckDeadline. - * @function modifyAckDeadline - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IModifyAckDeadlineRequest} request ModifyAckDeadlineRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|acknowledge}. - * @memberof google.pubsub.v1.Subscriber - * @typedef AcknowledgeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls Acknowledge. - * @function acknowledge - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IAcknowledgeRequest} request AcknowledgeRequest message or plain object - * @param {google.pubsub.v1.Subscriber.AcknowledgeCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Subscriber.prototype.acknowledge = function acknowledge(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, acknowledge, $root.google.pubsub.v1.AcknowledgeRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "Acknowledge" }); - - /** - * Calls Acknowledge. - * @function acknowledge - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IAcknowledgeRequest} request AcknowledgeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|pull}. - * @memberof google.pubsub.v1.Subscriber - * @typedef PullCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.PullResponse} [response] PullResponse - */ - - /** - * Calls Pull. - * @function pull - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IPullRequest} request PullRequest message or plain object - * @param {google.pubsub.v1.Subscriber.PullCallback} callback Node-style callback called with the error, if any, and PullResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Subscriber.prototype.pull = function pull(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, pull, $root.google.pubsub.v1.PullRequest, $root.google.pubsub.v1.PullResponse, request, callback); - }, "name", { value: "Pull" }); - - /** - * Calls Pull. - * @function pull - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IPullRequest} request PullRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|streamingPull}. - * @memberof google.pubsub.v1.Subscriber - * @typedef StreamingPullCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.StreamingPullResponse} [response] StreamingPullResponse - */ - - /** - * Calls StreamingPull. - * @function streamingPull - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IStreamingPullRequest} request StreamingPullRequest message or plain object - * @param {google.pubsub.v1.Subscriber.StreamingPullCallback} callback Node-style callback called with the error, if any, and StreamingPullResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Subscriber.prototype.streamingPull = function streamingPull(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, streamingPull, $root.google.pubsub.v1.StreamingPullRequest, $root.google.pubsub.v1.StreamingPullResponse, request, callback); - }, "name", { value: "StreamingPull" }); - - /** - * Calls StreamingPull. - * @function streamingPull - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IStreamingPullRequest} request StreamingPullRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|modifyPushConfig}. - * @memberof google.pubsub.v1.Subscriber - * @typedef ModifyPushConfigCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls ModifyPushConfig. - * @function modifyPushConfig - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IModifyPushConfigRequest} request ModifyPushConfigRequest message or plain object - * @param {google.pubsub.v1.Subscriber.ModifyPushConfigCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Subscriber.prototype.modifyPushConfig = function modifyPushConfig(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, modifyPushConfig, $root.google.pubsub.v1.ModifyPushConfigRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "ModifyPushConfig" }); - - /** - * Calls ModifyPushConfig. - * @function modifyPushConfig - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IModifyPushConfigRequest} request ModifyPushConfigRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|getSnapshot}. - * @memberof google.pubsub.v1.Subscriber - * @typedef GetSnapshotCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.Snapshot} [response] Snapshot - */ - - /** - * Calls GetSnapshot. - * @function getSnapshot - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IGetSnapshotRequest} request GetSnapshotRequest message or plain object - * @param {google.pubsub.v1.Subscriber.GetSnapshotCallback} callback Node-style callback called with the error, if any, and Snapshot - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Subscriber.prototype.getSnapshot = function getSnapshot(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, getSnapshot, $root.google.pubsub.v1.GetSnapshotRequest, $root.google.pubsub.v1.Snapshot, request, callback); - }, "name", { value: "GetSnapshot" }); - - /** - * Calls GetSnapshot. - * @function getSnapshot - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IGetSnapshotRequest} request GetSnapshotRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|listSnapshots}. - * @memberof google.pubsub.v1.Subscriber - * @typedef ListSnapshotsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.ListSnapshotsResponse} [response] ListSnapshotsResponse - */ - - /** - * Calls ListSnapshots. - * @function listSnapshots - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IListSnapshotsRequest} request ListSnapshotsRequest message or plain object - * @param {google.pubsub.v1.Subscriber.ListSnapshotsCallback} callback Node-style callback called with the error, if any, and ListSnapshotsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Subscriber.prototype.listSnapshots = function listSnapshots(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, listSnapshots, $root.google.pubsub.v1.ListSnapshotsRequest, $root.google.pubsub.v1.ListSnapshotsResponse, request, callback); - }, "name", { value: "ListSnapshots" }); - - /** - * Calls ListSnapshots. - * @function listSnapshots - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IListSnapshotsRequest} request ListSnapshotsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|createSnapshot}. - * @memberof google.pubsub.v1.Subscriber - * @typedef CreateSnapshotCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.Snapshot} [response] Snapshot - */ - - /** - * Calls CreateSnapshot. - * @function createSnapshot - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.ICreateSnapshotRequest} request CreateSnapshotRequest message or plain object - * @param {google.pubsub.v1.Subscriber.CreateSnapshotCallback} callback Node-style callback called with the error, if any, and Snapshot - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Subscriber.prototype.createSnapshot = function createSnapshot(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, createSnapshot, $root.google.pubsub.v1.CreateSnapshotRequest, $root.google.pubsub.v1.Snapshot, request, callback); - }, "name", { value: "CreateSnapshot" }); - - /** - * Calls CreateSnapshot. - * @function createSnapshot - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.ICreateSnapshotRequest} request CreateSnapshotRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|updateSnapshot}. - * @memberof google.pubsub.v1.Subscriber - * @typedef UpdateSnapshotCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.Snapshot} [response] Snapshot - */ - - /** - * Calls UpdateSnapshot. - * @function updateSnapshot - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IUpdateSnapshotRequest} request UpdateSnapshotRequest message or plain object - * @param {google.pubsub.v1.Subscriber.UpdateSnapshotCallback} callback Node-style callback called with the error, if any, and Snapshot - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Subscriber.prototype.updateSnapshot = function updateSnapshot(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, updateSnapshot, $root.google.pubsub.v1.UpdateSnapshotRequest, $root.google.pubsub.v1.Snapshot, request, callback); - }, "name", { value: "UpdateSnapshot" }); - - /** - * Calls UpdateSnapshot. - * @function updateSnapshot - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IUpdateSnapshotRequest} request UpdateSnapshotRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|deleteSnapshot}. - * @memberof google.pubsub.v1.Subscriber - * @typedef DeleteSnapshotCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteSnapshot. - * @function deleteSnapshot - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IDeleteSnapshotRequest} request DeleteSnapshotRequest message or plain object - * @param {google.pubsub.v1.Subscriber.DeleteSnapshotCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Subscriber.prototype.deleteSnapshot = function deleteSnapshot(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteSnapshot, $root.google.pubsub.v1.DeleteSnapshotRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSnapshot" }); - - /** - * Calls DeleteSnapshot. - * @function deleteSnapshot - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.IDeleteSnapshotRequest} request DeleteSnapshotRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.Subscriber|seek}. - * @memberof google.pubsub.v1.Subscriber - * @typedef SeekCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.SeekResponse} [response] SeekResponse - */ - - /** - * Calls Seek. - * @function seek - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.ISeekRequest} request SeekRequest message or plain object - * @param {google.pubsub.v1.Subscriber.SeekCallback} callback Node-style callback called with the error, if any, and SeekResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Subscriber.prototype.seek = function seek(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, seek, $root.google.pubsub.v1.SeekRequest, $root.google.pubsub.v1.SeekResponse, request, callback); - }, "name", { value: "Seek" }); - - /** - * Calls Seek. - * @function seek - * @memberof google.pubsub.v1.Subscriber - * @instance - * @param {google.pubsub.v1.ISeekRequest} request SeekRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Subscriber; - })(); - - v1.Subscription = (function() { - - /** - * Properties of a Subscription. - * @memberof google.pubsub.v1 - * @interface ISubscription - * @property {string|null} [name] Subscription name - * @property {string|null} [topic] Subscription topic - * @property {google.pubsub.v1.IPushConfig|null} [pushConfig] Subscription pushConfig - * @property {google.pubsub.v1.IBigQueryConfig|null} [bigqueryConfig] Subscription bigqueryConfig - * @property {google.pubsub.v1.ICloudStorageConfig|null} [cloudStorageConfig] Subscription cloudStorageConfig - * @property {google.pubsub.v1.IBigtableConfig|null} [bigtableConfig] Subscription bigtableConfig - * @property {number|null} [ackDeadlineSeconds] Subscription ackDeadlineSeconds - * @property {boolean|null} [retainAckedMessages] Subscription retainAckedMessages - * @property {google.protobuf.IDuration|null} [messageRetentionDuration] Subscription messageRetentionDuration - * @property {Object.|null} [labels] Subscription labels - * @property {boolean|null} [enableMessageOrdering] Subscription enableMessageOrdering - * @property {google.pubsub.v1.IExpirationPolicy|null} [expirationPolicy] Subscription expirationPolicy - * @property {string|null} [filter] Subscription filter - * @property {google.pubsub.v1.IDeadLetterPolicy|null} [deadLetterPolicy] Subscription deadLetterPolicy - * @property {google.pubsub.v1.IRetryPolicy|null} [retryPolicy] Subscription retryPolicy - * @property {boolean|null} [detached] Subscription detached - * @property {boolean|null} [enableExactlyOnceDelivery] Subscription enableExactlyOnceDelivery - * @property {google.protobuf.IDuration|null} [topicMessageRetentionDuration] Subscription topicMessageRetentionDuration - * @property {google.pubsub.v1.Subscription.State|null} [state] Subscription state - * @property {google.pubsub.v1.Subscription.IAnalyticsHubSubscriptionInfo|null} [analyticsHubSubscriptionInfo] Subscription analyticsHubSubscriptionInfo - * @property {Array.|null} [messageTransforms] Subscription messageTransforms - * @property {Object.|null} [tags] Subscription tags - */ - - /** - * Constructs a new Subscription. - * @memberof google.pubsub.v1 - * @classdesc Represents a Subscription. - * @implements ISubscription - * @constructor - * @param {google.pubsub.v1.ISubscription=} [properties] Properties to set - */ - function Subscription(properties) { - this.labels = {}; - this.messageTransforms = []; - this.tags = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Subscription name. - * @member {string} name - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.name = ""; - - /** - * Subscription topic. - * @member {string} topic - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.topic = ""; - - /** - * Subscription pushConfig. - * @member {google.pubsub.v1.IPushConfig|null|undefined} pushConfig - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.pushConfig = null; - - /** - * Subscription bigqueryConfig. - * @member {google.pubsub.v1.IBigQueryConfig|null|undefined} bigqueryConfig - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.bigqueryConfig = null; - - /** - * Subscription cloudStorageConfig. - * @member {google.pubsub.v1.ICloudStorageConfig|null|undefined} cloudStorageConfig - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.cloudStorageConfig = null; - - /** - * Subscription bigtableConfig. - * @member {google.pubsub.v1.IBigtableConfig|null|undefined} bigtableConfig - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.bigtableConfig = null; - - /** - * Subscription ackDeadlineSeconds. - * @member {number} ackDeadlineSeconds - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.ackDeadlineSeconds = 0; - - /** - * Subscription retainAckedMessages. - * @member {boolean} retainAckedMessages - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.retainAckedMessages = false; - - /** - * Subscription messageRetentionDuration. - * @member {google.protobuf.IDuration|null|undefined} messageRetentionDuration - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.messageRetentionDuration = null; - - /** - * Subscription labels. - * @member {Object.} labels - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.labels = $util.emptyObject; - - /** - * Subscription enableMessageOrdering. - * @member {boolean} enableMessageOrdering - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.enableMessageOrdering = false; - - /** - * Subscription expirationPolicy. - * @member {google.pubsub.v1.IExpirationPolicy|null|undefined} expirationPolicy - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.expirationPolicy = null; - - /** - * Subscription filter. - * @member {string} filter - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.filter = ""; - - /** - * Subscription deadLetterPolicy. - * @member {google.pubsub.v1.IDeadLetterPolicy|null|undefined} deadLetterPolicy - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.deadLetterPolicy = null; - - /** - * Subscription retryPolicy. - * @member {google.pubsub.v1.IRetryPolicy|null|undefined} retryPolicy - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.retryPolicy = null; - - /** - * Subscription detached. - * @member {boolean} detached - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.detached = false; - - /** - * Subscription enableExactlyOnceDelivery. - * @member {boolean} enableExactlyOnceDelivery - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.enableExactlyOnceDelivery = false; - - /** - * Subscription topicMessageRetentionDuration. - * @member {google.protobuf.IDuration|null|undefined} topicMessageRetentionDuration - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.topicMessageRetentionDuration = null; - - /** - * Subscription state. - * @member {google.pubsub.v1.Subscription.State} state - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.state = 0; - - /** - * Subscription analyticsHubSubscriptionInfo. - * @member {google.pubsub.v1.Subscription.IAnalyticsHubSubscriptionInfo|null|undefined} analyticsHubSubscriptionInfo - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.analyticsHubSubscriptionInfo = null; - - /** - * Subscription messageTransforms. - * @member {Array.} messageTransforms - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.messageTransforms = $util.emptyArray; - - /** - * Subscription tags. - * @member {Object.} tags - * @memberof google.pubsub.v1.Subscription - * @instance - */ - Subscription.prototype.tags = $util.emptyObject; - - /** - * Creates a new Subscription instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.Subscription - * @static - * @param {google.pubsub.v1.ISubscription=} [properties] Properties to set - * @returns {google.pubsub.v1.Subscription} Subscription instance - */ - Subscription.create = function create(properties) { - return new Subscription(properties); - }; - - /** - * Encodes the specified Subscription message. Does not implicitly {@link google.pubsub.v1.Subscription.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.Subscription - * @static - * @param {google.pubsub.v1.ISubscription} message Subscription message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Subscription.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.topic); - if (message.pushConfig != null && Object.hasOwnProperty.call(message, "pushConfig")) - $root.google.pubsub.v1.PushConfig.encode(message.pushConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); - if (message.ackDeadlineSeconds != null && Object.hasOwnProperty.call(message, "ackDeadlineSeconds")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.ackDeadlineSeconds); - if (message.retainAckedMessages != null && Object.hasOwnProperty.call(message, "retainAckedMessages")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.retainAckedMessages); - if (message.messageRetentionDuration != null && Object.hasOwnProperty.call(message, "messageRetentionDuration")) - $root.google.protobuf.Duration.encode(message.messageRetentionDuration, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.enableMessageOrdering != null && Object.hasOwnProperty.call(message, "enableMessageOrdering")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.enableMessageOrdering); - if (message.expirationPolicy != null && Object.hasOwnProperty.call(message, "expirationPolicy")) - $root.google.pubsub.v1.ExpirationPolicy.encode(message.expirationPolicy, writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.filter); - if (message.deadLetterPolicy != null && Object.hasOwnProperty.call(message, "deadLetterPolicy")) - $root.google.pubsub.v1.DeadLetterPolicy.encode(message.deadLetterPolicy, writer.uint32(/* id 13, wireType 2 =*/106).fork(), q + 1).ldelim(); - if (message.retryPolicy != null && Object.hasOwnProperty.call(message, "retryPolicy")) - $root.google.pubsub.v1.RetryPolicy.encode(message.retryPolicy, writer.uint32(/* id 14, wireType 2 =*/114).fork(), q + 1).ldelim(); - if (message.detached != null && Object.hasOwnProperty.call(message, "detached")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.detached); - if (message.enableExactlyOnceDelivery != null && Object.hasOwnProperty.call(message, "enableExactlyOnceDelivery")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.enableExactlyOnceDelivery); - if (message.topicMessageRetentionDuration != null && Object.hasOwnProperty.call(message, "topicMessageRetentionDuration")) - $root.google.protobuf.Duration.encode(message.topicMessageRetentionDuration, writer.uint32(/* id 17, wireType 2 =*/138).fork(), q + 1).ldelim(); - if (message.bigqueryConfig != null && Object.hasOwnProperty.call(message, "bigqueryConfig")) - $root.google.pubsub.v1.BigQueryConfig.encode(message.bigqueryConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork(), q + 1).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.state); - if (message.cloudStorageConfig != null && Object.hasOwnProperty.call(message, "cloudStorageConfig")) - $root.google.pubsub.v1.CloudStorageConfig.encode(message.cloudStorageConfig, writer.uint32(/* id 22, wireType 2 =*/178).fork(), q + 1).ldelim(); - if (message.analyticsHubSubscriptionInfo != null && Object.hasOwnProperty.call(message, "analyticsHubSubscriptionInfo")) - $root.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.encode(message.analyticsHubSubscriptionInfo, writer.uint32(/* id 23, wireType 2 =*/186).fork(), q + 1).ldelim(); - if (message.messageTransforms != null && message.messageTransforms.length) - for (var i = 0; i < message.messageTransforms.length; ++i) - $root.google.pubsub.v1.MessageTransform.encode(message.messageTransforms[i], writer.uint32(/* id 25, wireType 2 =*/202).fork(), q + 1).ldelim(); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) - for (var keys = Object.keys(message.tags), i = 0; i < keys.length; ++i) - writer.uint32(/* id 26, wireType 2 =*/210).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim(); - if (message.bigtableConfig != null && Object.hasOwnProperty.call(message, "bigtableConfig")) - $root.google.pubsub.v1.BigtableConfig.encode(message.bigtableConfig, writer.uint32(/* id 27, wireType 2 =*/218).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified Subscription message, length delimited. Does not implicitly {@link google.pubsub.v1.Subscription.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.Subscription - * @static - * @param {google.pubsub.v1.ISubscription} message Subscription message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Subscription.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a Subscription message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.Subscription - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.Subscription} Subscription - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Subscription.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.Subscription(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.topic = reader.string(); - break; - } - case 4: { - message.pushConfig = $root.google.pubsub.v1.PushConfig.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 18: { - message.bigqueryConfig = $root.google.pubsub.v1.BigQueryConfig.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 22: { - message.cloudStorageConfig = $root.google.pubsub.v1.CloudStorageConfig.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 27: { - message.bigtableConfig = $root.google.pubsub.v1.BigtableConfig.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 5: { - message.ackDeadlineSeconds = reader.int32(); - break; - } - case 7: { - message.retainAckedMessages = reader.bool(); - break; - } - case 8: { - message.messageRetentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 9: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7, long); - break; - } - } - if (key === "__proto__") - $util.makeProp(message.labels, key); - message.labels[key] = value; - break; - } - case 10: { - message.enableMessageOrdering = reader.bool(); - break; - } - case 11: { - message.expirationPolicy = $root.google.pubsub.v1.ExpirationPolicy.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 12: { - message.filter = reader.string(); - break; - } - case 13: { - message.deadLetterPolicy = $root.google.pubsub.v1.DeadLetterPolicy.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 14: { - message.retryPolicy = $root.google.pubsub.v1.RetryPolicy.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 15: { - message.detached = reader.bool(); - break; - } - case 16: { - message.enableExactlyOnceDelivery = reader.bool(); - break; - } - case 17: { - message.topicMessageRetentionDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 19: { - message.state = reader.int32(); - break; - } - case 23: { - message.analyticsHubSubscriptionInfo = $root.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 25: { - if (!(message.messageTransforms && message.messageTransforms.length)) - message.messageTransforms = []; - message.messageTransforms.push($root.google.pubsub.v1.MessageTransform.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 26: { - if (message.tags === $util.emptyObject) - message.tags = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7, long); - break; - } - } - if (key === "__proto__") - $util.makeProp(message.tags, key); - message.tags[key] = value; - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a Subscription message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.Subscription - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.Subscription} Subscription - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Subscription.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Subscription message. - * @function verify - * @memberof google.pubsub.v1.Subscription - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Subscription.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - if (message.pushConfig != null && Object.hasOwnProperty.call(message, "pushConfig")) { - var error = $root.google.pubsub.v1.PushConfig.verify(message.pushConfig, long + 1); - if (error) - return "pushConfig." + error; - } - if (message.bigqueryConfig != null && Object.hasOwnProperty.call(message, "bigqueryConfig")) { - var error = $root.google.pubsub.v1.BigQueryConfig.verify(message.bigqueryConfig, long + 1); - if (error) - return "bigqueryConfig." + error; - } - if (message.cloudStorageConfig != null && Object.hasOwnProperty.call(message, "cloudStorageConfig")) { - var error = $root.google.pubsub.v1.CloudStorageConfig.verify(message.cloudStorageConfig, long + 1); - if (error) - return "cloudStorageConfig." + error; - } - if (message.bigtableConfig != null && Object.hasOwnProperty.call(message, "bigtableConfig")) { - var error = $root.google.pubsub.v1.BigtableConfig.verify(message.bigtableConfig, long + 1); - if (error) - return "bigtableConfig." + error; - } - if (message.ackDeadlineSeconds != null && Object.hasOwnProperty.call(message, "ackDeadlineSeconds")) - if (!$util.isInteger(message.ackDeadlineSeconds)) - return "ackDeadlineSeconds: integer expected"; - if (message.retainAckedMessages != null && Object.hasOwnProperty.call(message, "retainAckedMessages")) - if (typeof message.retainAckedMessages !== "boolean") - return "retainAckedMessages: boolean expected"; - if (message.messageRetentionDuration != null && Object.hasOwnProperty.call(message, "messageRetentionDuration")) { - var error = $root.google.protobuf.Duration.verify(message.messageRetentionDuration, long + 1); - if (error) - return "messageRetentionDuration." + error; - } - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.enableMessageOrdering != null && Object.hasOwnProperty.call(message, "enableMessageOrdering")) - if (typeof message.enableMessageOrdering !== "boolean") - return "enableMessageOrdering: boolean expected"; - if (message.expirationPolicy != null && Object.hasOwnProperty.call(message, "expirationPolicy")) { - var error = $root.google.pubsub.v1.ExpirationPolicy.verify(message.expirationPolicy, long + 1); - if (error) - return "expirationPolicy." + error; - } - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.deadLetterPolicy != null && Object.hasOwnProperty.call(message, "deadLetterPolicy")) { - var error = $root.google.pubsub.v1.DeadLetterPolicy.verify(message.deadLetterPolicy, long + 1); - if (error) - return "deadLetterPolicy." + error; - } - if (message.retryPolicy != null && Object.hasOwnProperty.call(message, "retryPolicy")) { - var error = $root.google.pubsub.v1.RetryPolicy.verify(message.retryPolicy, long + 1); - if (error) - return "retryPolicy." + error; - } - if (message.detached != null && Object.hasOwnProperty.call(message, "detached")) - if (typeof message.detached !== "boolean") - return "detached: boolean expected"; - if (message.enableExactlyOnceDelivery != null && Object.hasOwnProperty.call(message, "enableExactlyOnceDelivery")) - if (typeof message.enableExactlyOnceDelivery !== "boolean") - return "enableExactlyOnceDelivery: boolean expected"; - if (message.topicMessageRetentionDuration != null && Object.hasOwnProperty.call(message, "topicMessageRetentionDuration")) { - var error = $root.google.protobuf.Duration.verify(message.topicMessageRetentionDuration, long + 1); - if (error) - return "topicMessageRetentionDuration." + error; - } - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.analyticsHubSubscriptionInfo != null && Object.hasOwnProperty.call(message, "analyticsHubSubscriptionInfo")) { - var error = $root.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.verify(message.analyticsHubSubscriptionInfo, long + 1); - if (error) - return "analyticsHubSubscriptionInfo." + error; - } - if (message.messageTransforms != null && Object.hasOwnProperty.call(message, "messageTransforms")) { - if (!Array.isArray(message.messageTransforms)) - return "messageTransforms: array expected"; - for (var i = 0; i < message.messageTransforms.length; ++i) { - var error = $root.google.pubsub.v1.MessageTransform.verify(message.messageTransforms[i], long + 1); - if (error) - return "messageTransforms." + error; - } - } - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) { - if (!$util.isObject(message.tags)) - return "tags: object expected"; - var key = Object.keys(message.tags); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.tags[key[i]])) - return "tags: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a Subscription message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.Subscription - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.Subscription} Subscription - */ - Subscription.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.Subscription) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.Subscription: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.Subscription(); - if (object.name != null) - message.name = String(object.name); - if (object.topic != null) - message.topic = String(object.topic); - if (object.pushConfig != null) { - if (!$util.isObject(object.pushConfig)) - throw TypeError(".google.pubsub.v1.Subscription.pushConfig: object expected"); - message.pushConfig = $root.google.pubsub.v1.PushConfig.fromObject(object.pushConfig, long + 1); - } - if (object.bigqueryConfig != null) { - if (!$util.isObject(object.bigqueryConfig)) - throw TypeError(".google.pubsub.v1.Subscription.bigqueryConfig: object expected"); - message.bigqueryConfig = $root.google.pubsub.v1.BigQueryConfig.fromObject(object.bigqueryConfig, long + 1); - } - if (object.cloudStorageConfig != null) { - if (!$util.isObject(object.cloudStorageConfig)) - throw TypeError(".google.pubsub.v1.Subscription.cloudStorageConfig: object expected"); - message.cloudStorageConfig = $root.google.pubsub.v1.CloudStorageConfig.fromObject(object.cloudStorageConfig, long + 1); - } - if (object.bigtableConfig != null) { - if (!$util.isObject(object.bigtableConfig)) - throw TypeError(".google.pubsub.v1.Subscription.bigtableConfig: object expected"); - message.bigtableConfig = $root.google.pubsub.v1.BigtableConfig.fromObject(object.bigtableConfig, long + 1); - } - if (object.ackDeadlineSeconds != null) - message.ackDeadlineSeconds = object.ackDeadlineSeconds | 0; - if (object.retainAckedMessages != null) - message.retainAckedMessages = Boolean(object.retainAckedMessages); - if (object.messageRetentionDuration != null) { - if (!$util.isObject(object.messageRetentionDuration)) - throw TypeError(".google.pubsub.v1.Subscription.messageRetentionDuration: object expected"); - message.messageRetentionDuration = $root.google.protobuf.Duration.fromObject(object.messageRetentionDuration, long + 1); - } - if (object.labels) { - if (!$util.isObject(object.labels)) - throw TypeError(".google.pubsub.v1.Subscription.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) { - if (keys[i] === "__proto__") - $util.makeProp(message.labels, keys[i]); - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - } - if (object.enableMessageOrdering != null) - message.enableMessageOrdering = Boolean(object.enableMessageOrdering); - if (object.expirationPolicy != null) { - if (!$util.isObject(object.expirationPolicy)) - throw TypeError(".google.pubsub.v1.Subscription.expirationPolicy: object expected"); - message.expirationPolicy = $root.google.pubsub.v1.ExpirationPolicy.fromObject(object.expirationPolicy, long + 1); - } - if (object.filter != null) - message.filter = String(object.filter); - if (object.deadLetterPolicy != null) { - if (!$util.isObject(object.deadLetterPolicy)) - throw TypeError(".google.pubsub.v1.Subscription.deadLetterPolicy: object expected"); - message.deadLetterPolicy = $root.google.pubsub.v1.DeadLetterPolicy.fromObject(object.deadLetterPolicy, long + 1); - } - if (object.retryPolicy != null) { - if (!$util.isObject(object.retryPolicy)) - throw TypeError(".google.pubsub.v1.Subscription.retryPolicy: object expected"); - message.retryPolicy = $root.google.pubsub.v1.RetryPolicy.fromObject(object.retryPolicy, long + 1); - } - if (object.detached != null) - message.detached = Boolean(object.detached); - if (object.enableExactlyOnceDelivery != null) - message.enableExactlyOnceDelivery = Boolean(object.enableExactlyOnceDelivery); - if (object.topicMessageRetentionDuration != null) { - if (!$util.isObject(object.topicMessageRetentionDuration)) - throw TypeError(".google.pubsub.v1.Subscription.topicMessageRetentionDuration: object expected"); - message.topicMessageRetentionDuration = $root.google.protobuf.Duration.fromObject(object.topicMessageRetentionDuration, long + 1); - } - 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 "ACTIVE": - case 1: - message.state = 1; - break; - case "RESOURCE_ERROR": - case 2: - message.state = 2; - break; - } - if (object.analyticsHubSubscriptionInfo != null) { - if (!$util.isObject(object.analyticsHubSubscriptionInfo)) - throw TypeError(".google.pubsub.v1.Subscription.analyticsHubSubscriptionInfo: object expected"); - message.analyticsHubSubscriptionInfo = $root.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.fromObject(object.analyticsHubSubscriptionInfo, long + 1); - } - if (object.messageTransforms) { - if (!Array.isArray(object.messageTransforms)) - throw TypeError(".google.pubsub.v1.Subscription.messageTransforms: array expected"); - message.messageTransforms = []; - for (var i = 0; i < object.messageTransforms.length; ++i) { - if (!$util.isObject(object.messageTransforms[i])) - throw TypeError(".google.pubsub.v1.Subscription.messageTransforms: object expected"); - message.messageTransforms[i] = $root.google.pubsub.v1.MessageTransform.fromObject(object.messageTransforms[i], long + 1); - } - } - if (object.tags) { - if (!$util.isObject(object.tags)) - throw TypeError(".google.pubsub.v1.Subscription.tags: object expected"); - message.tags = {}; - for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) { - if (keys[i] === "__proto__") - $util.makeProp(message.tags, keys[i]); - message.tags[keys[i]] = String(object.tags[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a Subscription message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.Subscription - * @static - * @param {google.pubsub.v1.Subscription} message Subscription - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Subscription.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.messageTransforms = []; - if (options.objects || options.defaults) { - object.labels = {}; - object.tags = {}; - } - if (options.defaults) { - object.name = ""; - object.topic = ""; - object.pushConfig = null; - object.ackDeadlineSeconds = 0; - object.retainAckedMessages = false; - object.messageRetentionDuration = null; - object.enableMessageOrdering = false; - object.expirationPolicy = null; - object.filter = ""; - object.deadLetterPolicy = null; - object.retryPolicy = null; - object.detached = false; - object.enableExactlyOnceDelivery = false; - object.topicMessageRetentionDuration = null; - object.bigqueryConfig = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.cloudStorageConfig = null; - object.analyticsHubSubscriptionInfo = null; - object.bigtableConfig = null; - } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - object.name = message.name; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - object.topic = message.topic; - if (message.pushConfig != null && Object.hasOwnProperty.call(message, "pushConfig")) - object.pushConfig = $root.google.pubsub.v1.PushConfig.toObject(message.pushConfig, options, q + 1); - if (message.ackDeadlineSeconds != null && Object.hasOwnProperty.call(message, "ackDeadlineSeconds")) - object.ackDeadlineSeconds = message.ackDeadlineSeconds; - if (message.retainAckedMessages != null && Object.hasOwnProperty.call(message, "retainAckedMessages")) - object.retainAckedMessages = message.retainAckedMessages; - if (message.messageRetentionDuration != null && Object.hasOwnProperty.call(message, "messageRetentionDuration")) - object.messageRetentionDuration = $root.google.protobuf.Duration.toObject(message.messageRetentionDuration, options, q + 1); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) { - if (keys2[j] === "__proto__") - $util.makeProp(object.labels, keys2[j]); - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - } - if (message.enableMessageOrdering != null && Object.hasOwnProperty.call(message, "enableMessageOrdering")) - object.enableMessageOrdering = message.enableMessageOrdering; - if (message.expirationPolicy != null && Object.hasOwnProperty.call(message, "expirationPolicy")) - object.expirationPolicy = $root.google.pubsub.v1.ExpirationPolicy.toObject(message.expirationPolicy, options, q + 1); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - object.filter = message.filter; - if (message.deadLetterPolicy != null && Object.hasOwnProperty.call(message, "deadLetterPolicy")) - object.deadLetterPolicy = $root.google.pubsub.v1.DeadLetterPolicy.toObject(message.deadLetterPolicy, options, q + 1); - if (message.retryPolicy != null && Object.hasOwnProperty.call(message, "retryPolicy")) - object.retryPolicy = $root.google.pubsub.v1.RetryPolicy.toObject(message.retryPolicy, options, q + 1); - if (message.detached != null && Object.hasOwnProperty.call(message, "detached")) - object.detached = message.detached; - if (message.enableExactlyOnceDelivery != null && Object.hasOwnProperty.call(message, "enableExactlyOnceDelivery")) - object.enableExactlyOnceDelivery = message.enableExactlyOnceDelivery; - if (message.topicMessageRetentionDuration != null && Object.hasOwnProperty.call(message, "topicMessageRetentionDuration")) - object.topicMessageRetentionDuration = $root.google.protobuf.Duration.toObject(message.topicMessageRetentionDuration, options, q + 1); - if (message.bigqueryConfig != null && Object.hasOwnProperty.call(message, "bigqueryConfig")) - object.bigqueryConfig = $root.google.pubsub.v1.BigQueryConfig.toObject(message.bigqueryConfig, options, q + 1); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - object.state = options.enums === String ? $root.google.pubsub.v1.Subscription.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.Subscription.State[message.state] : message.state; - if (message.cloudStorageConfig != null && Object.hasOwnProperty.call(message, "cloudStorageConfig")) - object.cloudStorageConfig = $root.google.pubsub.v1.CloudStorageConfig.toObject(message.cloudStorageConfig, options, q + 1); - if (message.analyticsHubSubscriptionInfo != null && Object.hasOwnProperty.call(message, "analyticsHubSubscriptionInfo")) - object.analyticsHubSubscriptionInfo = $root.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.toObject(message.analyticsHubSubscriptionInfo, options, q + 1); - if (message.messageTransforms && message.messageTransforms.length) { - object.messageTransforms = []; - for (var j = 0; j < message.messageTransforms.length; ++j) - object.messageTransforms[j] = $root.google.pubsub.v1.MessageTransform.toObject(message.messageTransforms[j], options, q + 1); - } - if (message.tags && (keys2 = Object.keys(message.tags)).length) { - object.tags = {}; - for (var j = 0; j < keys2.length; ++j) { - if (keys2[j] === "__proto__") - $util.makeProp(object.tags, keys2[j]); - object.tags[keys2[j]] = message.tags[keys2[j]]; - } - } - if (message.bigtableConfig != null && Object.hasOwnProperty.call(message, "bigtableConfig")) - object.bigtableConfig = $root.google.pubsub.v1.BigtableConfig.toObject(message.bigtableConfig, options, q + 1); - return object; - }; - - /** - * Converts this Subscription to JSON. - * @function toJSON - * @memberof google.pubsub.v1.Subscription - * @instance - * @returns {Object.} JSON object - */ - Subscription.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Subscription - * @function getTypeUrl - * @memberof google.pubsub.v1.Subscription - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Subscription.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.Subscription"; - }; - - /** - * State enum. - * @name google.pubsub.v1.Subscription.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} RESOURCE_ERROR=2 RESOURCE_ERROR value - */ - Subscription.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "RESOURCE_ERROR"] = 2; - return values; - })(); - - Subscription.AnalyticsHubSubscriptionInfo = (function() { - - /** - * Properties of an AnalyticsHubSubscriptionInfo. - * @memberof google.pubsub.v1.Subscription - * @interface IAnalyticsHubSubscriptionInfo - * @property {string|null} [listing] AnalyticsHubSubscriptionInfo listing - * @property {string|null} [subscription] AnalyticsHubSubscriptionInfo subscription - */ - - /** - * Constructs a new AnalyticsHubSubscriptionInfo. - * @memberof google.pubsub.v1.Subscription - * @classdesc Represents an AnalyticsHubSubscriptionInfo. - * @implements IAnalyticsHubSubscriptionInfo - * @constructor - * @param {google.pubsub.v1.Subscription.IAnalyticsHubSubscriptionInfo=} [properties] Properties to set - */ - function AnalyticsHubSubscriptionInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * AnalyticsHubSubscriptionInfo listing. - * @member {string} listing - * @memberof google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo - * @instance - */ - AnalyticsHubSubscriptionInfo.prototype.listing = ""; - - /** - * AnalyticsHubSubscriptionInfo subscription. - * @member {string} subscription - * @memberof google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo - * @instance - */ - AnalyticsHubSubscriptionInfo.prototype.subscription = ""; - - /** - * Creates a new AnalyticsHubSubscriptionInfo instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo - * @static - * @param {google.pubsub.v1.Subscription.IAnalyticsHubSubscriptionInfo=} [properties] Properties to set - * @returns {google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo} AnalyticsHubSubscriptionInfo instance - */ - AnalyticsHubSubscriptionInfo.create = function create(properties) { - return new AnalyticsHubSubscriptionInfo(properties); - }; - - /** - * Encodes the specified AnalyticsHubSubscriptionInfo message. Does not implicitly {@link google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo - * @static - * @param {google.pubsub.v1.Subscription.IAnalyticsHubSubscriptionInfo} message AnalyticsHubSubscriptionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnalyticsHubSubscriptionInfo.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.listing != null && Object.hasOwnProperty.call(message, "listing")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.listing); - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subscription); - return writer; - }; - - /** - * Encodes the specified AnalyticsHubSubscriptionInfo message, length delimited. Does not implicitly {@link google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo - * @static - * @param {google.pubsub.v1.Subscription.IAnalyticsHubSubscriptionInfo} message AnalyticsHubSubscriptionInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AnalyticsHubSubscriptionInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an AnalyticsHubSubscriptionInfo message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo} AnalyticsHubSubscriptionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnalyticsHubSubscriptionInfo.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.listing = reader.string(); - break; - } - case 2: { - message.subscription = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an AnalyticsHubSubscriptionInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo} AnalyticsHubSubscriptionInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AnalyticsHubSubscriptionInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AnalyticsHubSubscriptionInfo message. - * @function verify - * @memberof google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AnalyticsHubSubscriptionInfo.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.listing != null && Object.hasOwnProperty.call(message, "listing")) - if (!$util.isString(message.listing)) - return "listing: string expected"; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - if (!$util.isString(message.subscription)) - return "subscription: string expected"; - return null; - }; - - /** - * Creates an AnalyticsHubSubscriptionInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo} AnalyticsHubSubscriptionInfo - */ - AnalyticsHubSubscriptionInfo.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo(); - if (object.listing != null) - message.listing = String(object.listing); - if (object.subscription != null) - message.subscription = String(object.subscription); - return message; - }; - - /** - * Creates a plain object from an AnalyticsHubSubscriptionInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo - * @static - * @param {google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo} message AnalyticsHubSubscriptionInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AnalyticsHubSubscriptionInfo.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.listing = ""; - object.subscription = ""; - } - if (message.listing != null && Object.hasOwnProperty.call(message, "listing")) - object.listing = message.listing; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - object.subscription = message.subscription; - return object; - }; - - /** - * Converts this AnalyticsHubSubscriptionInfo to JSON. - * @function toJSON - * @memberof google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo - * @instance - * @returns {Object.} JSON object - */ - AnalyticsHubSubscriptionInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AnalyticsHubSubscriptionInfo - * @function getTypeUrl - * @memberof google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AnalyticsHubSubscriptionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.Subscription.AnalyticsHubSubscriptionInfo"; - }; - - return AnalyticsHubSubscriptionInfo; - })(); - - return Subscription; - })(); - - v1.RetryPolicy = (function() { - - /** - * Properties of a RetryPolicy. - * @memberof google.pubsub.v1 - * @interface IRetryPolicy - * @property {google.protobuf.IDuration|null} [minimumBackoff] RetryPolicy minimumBackoff - * @property {google.protobuf.IDuration|null} [maximumBackoff] RetryPolicy maximumBackoff - */ - - /** - * Constructs a new RetryPolicy. - * @memberof google.pubsub.v1 - * @classdesc Represents a RetryPolicy. - * @implements IRetryPolicy - * @constructor - * @param {google.pubsub.v1.IRetryPolicy=} [properties] Properties to set - */ - function RetryPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * RetryPolicy minimumBackoff. - * @member {google.protobuf.IDuration|null|undefined} minimumBackoff - * @memberof google.pubsub.v1.RetryPolicy - * @instance - */ - RetryPolicy.prototype.minimumBackoff = null; - - /** - * RetryPolicy maximumBackoff. - * @member {google.protobuf.IDuration|null|undefined} maximumBackoff - * @memberof google.pubsub.v1.RetryPolicy - * @instance - */ - RetryPolicy.prototype.maximumBackoff = null; - - /** - * Creates a new RetryPolicy instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.RetryPolicy - * @static - * @param {google.pubsub.v1.IRetryPolicy=} [properties] Properties to set - * @returns {google.pubsub.v1.RetryPolicy} RetryPolicy instance - */ - RetryPolicy.create = function create(properties) { - return new RetryPolicy(properties); - }; - - /** - * Encodes the specified RetryPolicy message. Does not implicitly {@link google.pubsub.v1.RetryPolicy.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.RetryPolicy - * @static - * @param {google.pubsub.v1.IRetryPolicy} message RetryPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RetryPolicy.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.minimumBackoff != null && Object.hasOwnProperty.call(message, "minimumBackoff")) - $root.google.protobuf.Duration.encode(message.minimumBackoff, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.maximumBackoff != null && Object.hasOwnProperty.call(message, "maximumBackoff")) - $root.google.protobuf.Duration.encode(message.maximumBackoff, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified RetryPolicy message, length delimited. Does not implicitly {@link google.pubsub.v1.RetryPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.RetryPolicy - * @static - * @param {google.pubsub.v1.IRetryPolicy} message RetryPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RetryPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a RetryPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.RetryPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.RetryPolicy} RetryPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RetryPolicy.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.RetryPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.minimumBackoff = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 2: { - message.maximumBackoff = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a RetryPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.RetryPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.RetryPolicy} RetryPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RetryPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RetryPolicy message. - * @function verify - * @memberof google.pubsub.v1.RetryPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RetryPolicy.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.minimumBackoff != null && Object.hasOwnProperty.call(message, "minimumBackoff")) { - var error = $root.google.protobuf.Duration.verify(message.minimumBackoff, long + 1); - if (error) - return "minimumBackoff." + error; - } - if (message.maximumBackoff != null && Object.hasOwnProperty.call(message, "maximumBackoff")) { - var error = $root.google.protobuf.Duration.verify(message.maximumBackoff, long + 1); - if (error) - return "maximumBackoff." + error; - } - return null; - }; - - /** - * Creates a RetryPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.RetryPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.RetryPolicy} RetryPolicy - */ - RetryPolicy.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.RetryPolicy) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.RetryPolicy: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.RetryPolicy(); - if (object.minimumBackoff != null) { - if (!$util.isObject(object.minimumBackoff)) - throw TypeError(".google.pubsub.v1.RetryPolicy.minimumBackoff: object expected"); - message.minimumBackoff = $root.google.protobuf.Duration.fromObject(object.minimumBackoff, long + 1); - } - if (object.maximumBackoff != null) { - if (!$util.isObject(object.maximumBackoff)) - throw TypeError(".google.pubsub.v1.RetryPolicy.maximumBackoff: object expected"); - message.maximumBackoff = $root.google.protobuf.Duration.fromObject(object.maximumBackoff, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a RetryPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.RetryPolicy - * @static - * @param {google.pubsub.v1.RetryPolicy} message RetryPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RetryPolicy.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.minimumBackoff = null; - object.maximumBackoff = null; - } - if (message.minimumBackoff != null && Object.hasOwnProperty.call(message, "minimumBackoff")) - object.minimumBackoff = $root.google.protobuf.Duration.toObject(message.minimumBackoff, options, q + 1); - if (message.maximumBackoff != null && Object.hasOwnProperty.call(message, "maximumBackoff")) - object.maximumBackoff = $root.google.protobuf.Duration.toObject(message.maximumBackoff, options, q + 1); - return object; - }; - - /** - * Converts this RetryPolicy to JSON. - * @function toJSON - * @memberof google.pubsub.v1.RetryPolicy - * @instance - * @returns {Object.} JSON object - */ - RetryPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RetryPolicy - * @function getTypeUrl - * @memberof google.pubsub.v1.RetryPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RetryPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.RetryPolicy"; - }; - - return RetryPolicy; - })(); - - v1.DeadLetterPolicy = (function() { - - /** - * Properties of a DeadLetterPolicy. - * @memberof google.pubsub.v1 - * @interface IDeadLetterPolicy - * @property {string|null} [deadLetterTopic] DeadLetterPolicy deadLetterTopic - * @property {number|null} [maxDeliveryAttempts] DeadLetterPolicy maxDeliveryAttempts - */ - - /** - * Constructs a new DeadLetterPolicy. - * @memberof google.pubsub.v1 - * @classdesc Represents a DeadLetterPolicy. - * @implements IDeadLetterPolicy - * @constructor - * @param {google.pubsub.v1.IDeadLetterPolicy=} [properties] Properties to set - */ - function DeadLetterPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeadLetterPolicy deadLetterTopic. - * @member {string} deadLetterTopic - * @memberof google.pubsub.v1.DeadLetterPolicy - * @instance - */ - DeadLetterPolicy.prototype.deadLetterTopic = ""; - - /** - * DeadLetterPolicy maxDeliveryAttempts. - * @member {number} maxDeliveryAttempts - * @memberof google.pubsub.v1.DeadLetterPolicy - * @instance - */ - DeadLetterPolicy.prototype.maxDeliveryAttempts = 0; - - /** - * Creates a new DeadLetterPolicy instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.DeadLetterPolicy - * @static - * @param {google.pubsub.v1.IDeadLetterPolicy=} [properties] Properties to set - * @returns {google.pubsub.v1.DeadLetterPolicy} DeadLetterPolicy instance - */ - DeadLetterPolicy.create = function create(properties) { - return new DeadLetterPolicy(properties); - }; - - /** - * Encodes the specified DeadLetterPolicy message. Does not implicitly {@link google.pubsub.v1.DeadLetterPolicy.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.DeadLetterPolicy - * @static - * @param {google.pubsub.v1.IDeadLetterPolicy} message DeadLetterPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeadLetterPolicy.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.deadLetterTopic != null && Object.hasOwnProperty.call(message, "deadLetterTopic")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.deadLetterTopic); - if (message.maxDeliveryAttempts != null && Object.hasOwnProperty.call(message, "maxDeliveryAttempts")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxDeliveryAttempts); - return writer; - }; - - /** - * Encodes the specified DeadLetterPolicy message, length delimited. Does not implicitly {@link google.pubsub.v1.DeadLetterPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.DeadLetterPolicy - * @static - * @param {google.pubsub.v1.IDeadLetterPolicy} message DeadLetterPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeadLetterPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a DeadLetterPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.DeadLetterPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.DeadLetterPolicy} DeadLetterPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeadLetterPolicy.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.DeadLetterPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.deadLetterTopic = reader.string(); - break; - } - case 2: { - message.maxDeliveryAttempts = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a DeadLetterPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.DeadLetterPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.DeadLetterPolicy} DeadLetterPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeadLetterPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeadLetterPolicy message. - * @function verify - * @memberof google.pubsub.v1.DeadLetterPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeadLetterPolicy.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.deadLetterTopic != null && Object.hasOwnProperty.call(message, "deadLetterTopic")) - if (!$util.isString(message.deadLetterTopic)) - return "deadLetterTopic: string expected"; - if (message.maxDeliveryAttempts != null && Object.hasOwnProperty.call(message, "maxDeliveryAttempts")) - if (!$util.isInteger(message.maxDeliveryAttempts)) - return "maxDeliveryAttempts: integer expected"; - return null; - }; - - /** - * Creates a DeadLetterPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.DeadLetterPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.DeadLetterPolicy} DeadLetterPolicy - */ - DeadLetterPolicy.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.DeadLetterPolicy) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.DeadLetterPolicy: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.DeadLetterPolicy(); - if (object.deadLetterTopic != null) - message.deadLetterTopic = String(object.deadLetterTopic); - if (object.maxDeliveryAttempts != null) - message.maxDeliveryAttempts = object.maxDeliveryAttempts | 0; - return message; - }; - - /** - * Creates a plain object from a DeadLetterPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.DeadLetterPolicy - * @static - * @param {google.pubsub.v1.DeadLetterPolicy} message DeadLetterPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeadLetterPolicy.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.deadLetterTopic = ""; - object.maxDeliveryAttempts = 0; - } - if (message.deadLetterTopic != null && Object.hasOwnProperty.call(message, "deadLetterTopic")) - object.deadLetterTopic = message.deadLetterTopic; - if (message.maxDeliveryAttempts != null && Object.hasOwnProperty.call(message, "maxDeliveryAttempts")) - object.maxDeliveryAttempts = message.maxDeliveryAttempts; - return object; - }; - - /** - * Converts this DeadLetterPolicy to JSON. - * @function toJSON - * @memberof google.pubsub.v1.DeadLetterPolicy - * @instance - * @returns {Object.} JSON object - */ - DeadLetterPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeadLetterPolicy - * @function getTypeUrl - * @memberof google.pubsub.v1.DeadLetterPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeadLetterPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.DeadLetterPolicy"; - }; - - return DeadLetterPolicy; - })(); - - v1.ExpirationPolicy = (function() { - - /** - * Properties of an ExpirationPolicy. - * @memberof google.pubsub.v1 - * @interface IExpirationPolicy - * @property {google.protobuf.IDuration|null} [ttl] ExpirationPolicy ttl - */ - - /** - * Constructs a new ExpirationPolicy. - * @memberof google.pubsub.v1 - * @classdesc Represents an ExpirationPolicy. - * @implements IExpirationPolicy - * @constructor - * @param {google.pubsub.v1.IExpirationPolicy=} [properties] Properties to set - */ - function ExpirationPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExpirationPolicy ttl. - * @member {google.protobuf.IDuration|null|undefined} ttl - * @memberof google.pubsub.v1.ExpirationPolicy - * @instance - */ - ExpirationPolicy.prototype.ttl = null; - - /** - * Creates a new ExpirationPolicy instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ExpirationPolicy - * @static - * @param {google.pubsub.v1.IExpirationPolicy=} [properties] Properties to set - * @returns {google.pubsub.v1.ExpirationPolicy} ExpirationPolicy instance - */ - ExpirationPolicy.create = function create(properties) { - return new ExpirationPolicy(properties); - }; - - /** - * Encodes the specified ExpirationPolicy message. Does not implicitly {@link google.pubsub.v1.ExpirationPolicy.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ExpirationPolicy - * @static - * @param {google.pubsub.v1.IExpirationPolicy} message ExpirationPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExpirationPolicy.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) - $root.google.protobuf.Duration.encode(message.ttl, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExpirationPolicy message, length delimited. Does not implicitly {@link google.pubsub.v1.ExpirationPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ExpirationPolicy - * @static - * @param {google.pubsub.v1.IExpirationPolicy} message ExpirationPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExpirationPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an ExpirationPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ExpirationPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ExpirationPolicy} ExpirationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExpirationPolicy.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ExpirationPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.ttl = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an ExpirationPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ExpirationPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ExpirationPolicy} ExpirationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExpirationPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExpirationPolicy message. - * @function verify - * @memberof google.pubsub.v1.ExpirationPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExpirationPolicy.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) { - var error = $root.google.protobuf.Duration.verify(message.ttl, long + 1); - if (error) - return "ttl." + error; - } - return null; - }; - - /** - * Creates an ExpirationPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ExpirationPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ExpirationPolicy} ExpirationPolicy - */ - ExpirationPolicy.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ExpirationPolicy) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ExpirationPolicy: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ExpirationPolicy(); - if (object.ttl != null) { - if (!$util.isObject(object.ttl)) - throw TypeError(".google.pubsub.v1.ExpirationPolicy.ttl: object expected"); - message.ttl = $root.google.protobuf.Duration.fromObject(object.ttl, long + 1); - } - return message; - }; - - /** - * Creates a plain object from an ExpirationPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ExpirationPolicy - * @static - * @param {google.pubsub.v1.ExpirationPolicy} message ExpirationPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExpirationPolicy.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.ttl = null; - if (message.ttl != null && Object.hasOwnProperty.call(message, "ttl")) - object.ttl = $root.google.protobuf.Duration.toObject(message.ttl, options, q + 1); - return object; - }; - - /** - * Converts this ExpirationPolicy to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ExpirationPolicy - * @instance - * @returns {Object.} JSON object - */ - ExpirationPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExpirationPolicy - * @function getTypeUrl - * @memberof google.pubsub.v1.ExpirationPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExpirationPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ExpirationPolicy"; - }; - - return ExpirationPolicy; - })(); - - v1.PushConfig = (function() { - - /** - * Properties of a PushConfig. - * @memberof google.pubsub.v1 - * @interface IPushConfig - * @property {string|null} [pushEndpoint] PushConfig pushEndpoint - * @property {Object.|null} [attributes] PushConfig attributes - * @property {google.pubsub.v1.PushConfig.IOidcToken|null} [oidcToken] PushConfig oidcToken - * @property {google.pubsub.v1.PushConfig.IPubsubWrapper|null} [pubsubWrapper] PushConfig pubsubWrapper - * @property {google.pubsub.v1.PushConfig.INoWrapper|null} [noWrapper] PushConfig noWrapper - */ - - /** - * Constructs a new PushConfig. - * @memberof google.pubsub.v1 - * @classdesc Represents a PushConfig. - * @implements IPushConfig - * @constructor - * @param {google.pubsub.v1.IPushConfig=} [properties] Properties to set - */ - function PushConfig(properties) { - this.attributes = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * PushConfig pushEndpoint. - * @member {string} pushEndpoint - * @memberof google.pubsub.v1.PushConfig - * @instance - */ - PushConfig.prototype.pushEndpoint = ""; - - /** - * PushConfig attributes. - * @member {Object.} attributes - * @memberof google.pubsub.v1.PushConfig - * @instance - */ - PushConfig.prototype.attributes = $util.emptyObject; - - /** - * PushConfig oidcToken. - * @member {google.pubsub.v1.PushConfig.IOidcToken|null|undefined} oidcToken - * @memberof google.pubsub.v1.PushConfig - * @instance - */ - PushConfig.prototype.oidcToken = null; - - /** - * PushConfig pubsubWrapper. - * @member {google.pubsub.v1.PushConfig.IPubsubWrapper|null|undefined} pubsubWrapper - * @memberof google.pubsub.v1.PushConfig - * @instance - */ - PushConfig.prototype.pubsubWrapper = null; - - /** - * PushConfig noWrapper. - * @member {google.pubsub.v1.PushConfig.INoWrapper|null|undefined} noWrapper - * @memberof google.pubsub.v1.PushConfig - * @instance - */ - PushConfig.prototype.noWrapper = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * PushConfig authenticationMethod. - * @member {"oidcToken"|undefined} authenticationMethod - * @memberof google.pubsub.v1.PushConfig - * @instance - */ - Object.defineProperty(PushConfig.prototype, "authenticationMethod", { - get: $util.oneOfGetter($oneOfFields = ["oidcToken"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * PushConfig wrapper. - * @member {"pubsubWrapper"|"noWrapper"|undefined} wrapper - * @memberof google.pubsub.v1.PushConfig - * @instance - */ - Object.defineProperty(PushConfig.prototype, "wrapper", { - get: $util.oneOfGetter($oneOfFields = ["pubsubWrapper", "noWrapper"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new PushConfig instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.PushConfig - * @static - * @param {google.pubsub.v1.IPushConfig=} [properties] Properties to set - * @returns {google.pubsub.v1.PushConfig} PushConfig instance - */ - PushConfig.create = function create(properties) { - return new PushConfig(properties); - }; - - /** - * Encodes the specified PushConfig message. Does not implicitly {@link google.pubsub.v1.PushConfig.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.PushConfig - * @static - * @param {google.pubsub.v1.IPushConfig} message PushConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PushConfig.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.pushEndpoint != null && Object.hasOwnProperty.call(message, "pushEndpoint")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.pushEndpoint); - if (message.attributes != null && Object.hasOwnProperty.call(message, "attributes")) - for (var keys = Object.keys(message.attributes), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.attributes[keys[i]]).ldelim(); - if (message.oidcToken != null && Object.hasOwnProperty.call(message, "oidcToken")) - $root.google.pubsub.v1.PushConfig.OidcToken.encode(message.oidcToken, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); - if (message.pubsubWrapper != null && Object.hasOwnProperty.call(message, "pubsubWrapper")) - $root.google.pubsub.v1.PushConfig.PubsubWrapper.encode(message.pubsubWrapper, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); - if (message.noWrapper != null && Object.hasOwnProperty.call(message, "noWrapper")) - $root.google.pubsub.v1.PushConfig.NoWrapper.encode(message.noWrapper, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified PushConfig message, length delimited. Does not implicitly {@link google.pubsub.v1.PushConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.PushConfig - * @static - * @param {google.pubsub.v1.IPushConfig} message PushConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PushConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a PushConfig message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.PushConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.PushConfig} PushConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PushConfig.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.PushConfig(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.pushEndpoint = reader.string(); - break; - } - case 2: { - if (message.attributes === $util.emptyObject) - message.attributes = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7, long); - break; - } - } - if (key === "__proto__") - $util.makeProp(message.attributes, key); - message.attributes[key] = value; - break; - } - case 3: { - message.oidcToken = $root.google.pubsub.v1.PushConfig.OidcToken.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 4: { - message.pubsubWrapper = $root.google.pubsub.v1.PushConfig.PubsubWrapper.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 5: { - message.noWrapper = $root.google.pubsub.v1.PushConfig.NoWrapper.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a PushConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.PushConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.PushConfig} PushConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PushConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PushConfig message. - * @function verify - * @memberof google.pubsub.v1.PushConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PushConfig.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.pushEndpoint != null && Object.hasOwnProperty.call(message, "pushEndpoint")) - if (!$util.isString(message.pushEndpoint)) - return "pushEndpoint: string expected"; - if (message.attributes != null && Object.hasOwnProperty.call(message, "attributes")) { - if (!$util.isObject(message.attributes)) - return "attributes: object expected"; - var key = Object.keys(message.attributes); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.attributes[key[i]])) - return "attributes: string{k:string} expected"; - } - if (message.oidcToken != null && Object.hasOwnProperty.call(message, "oidcToken")) { - properties.authenticationMethod = 1; - { - var error = $root.google.pubsub.v1.PushConfig.OidcToken.verify(message.oidcToken, long + 1); - if (error) - return "oidcToken." + error; - } - } - if (message.pubsubWrapper != null && Object.hasOwnProperty.call(message, "pubsubWrapper")) { - properties.wrapper = 1; - { - var error = $root.google.pubsub.v1.PushConfig.PubsubWrapper.verify(message.pubsubWrapper, long + 1); - if (error) - return "pubsubWrapper." + error; - } - } - if (message.noWrapper != null && Object.hasOwnProperty.call(message, "noWrapper")) { - if (properties.wrapper === 1) - return "wrapper: multiple values"; - properties.wrapper = 1; - { - var error = $root.google.pubsub.v1.PushConfig.NoWrapper.verify(message.noWrapper, long + 1); - if (error) - return "noWrapper." + error; - } - } - return null; - }; - - /** - * Creates a PushConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.PushConfig - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.PushConfig} PushConfig - */ - PushConfig.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.PushConfig) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.PushConfig: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.PushConfig(); - if (object.pushEndpoint != null) - message.pushEndpoint = String(object.pushEndpoint); - if (object.attributes) { - if (!$util.isObject(object.attributes)) - throw TypeError(".google.pubsub.v1.PushConfig.attributes: object expected"); - message.attributes = {}; - for (var keys = Object.keys(object.attributes), i = 0; i < keys.length; ++i) { - if (keys[i] === "__proto__") - $util.makeProp(message.attributes, keys[i]); - message.attributes[keys[i]] = String(object.attributes[keys[i]]); - } - } - if (object.oidcToken != null) { - if (!$util.isObject(object.oidcToken)) - throw TypeError(".google.pubsub.v1.PushConfig.oidcToken: object expected"); - message.oidcToken = $root.google.pubsub.v1.PushConfig.OidcToken.fromObject(object.oidcToken, long + 1); - } - if (object.pubsubWrapper != null) { - if (!$util.isObject(object.pubsubWrapper)) - throw TypeError(".google.pubsub.v1.PushConfig.pubsubWrapper: object expected"); - message.pubsubWrapper = $root.google.pubsub.v1.PushConfig.PubsubWrapper.fromObject(object.pubsubWrapper, long + 1); - } - if (object.noWrapper != null) { - if (!$util.isObject(object.noWrapper)) - throw TypeError(".google.pubsub.v1.PushConfig.noWrapper: object expected"); - message.noWrapper = $root.google.pubsub.v1.PushConfig.NoWrapper.fromObject(object.noWrapper, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a PushConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.PushConfig - * @static - * @param {google.pubsub.v1.PushConfig} message PushConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PushConfig.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.objects || options.defaults) - object.attributes = {}; - if (options.defaults) - object.pushEndpoint = ""; - if (message.pushEndpoint != null && Object.hasOwnProperty.call(message, "pushEndpoint")) - object.pushEndpoint = message.pushEndpoint; - var keys2; - if (message.attributes && (keys2 = Object.keys(message.attributes)).length) { - object.attributes = {}; - for (var j = 0; j < keys2.length; ++j) { - if (keys2[j] === "__proto__") - $util.makeProp(object.attributes, keys2[j]); - object.attributes[keys2[j]] = message.attributes[keys2[j]]; - } - } - if (message.oidcToken != null && Object.hasOwnProperty.call(message, "oidcToken")) { - object.oidcToken = $root.google.pubsub.v1.PushConfig.OidcToken.toObject(message.oidcToken, options, q + 1); - if (options.oneofs) - object.authenticationMethod = "oidcToken"; - } - if (message.pubsubWrapper != null && Object.hasOwnProperty.call(message, "pubsubWrapper")) { - object.pubsubWrapper = $root.google.pubsub.v1.PushConfig.PubsubWrapper.toObject(message.pubsubWrapper, options, q + 1); - if (options.oneofs) - object.wrapper = "pubsubWrapper"; - } - if (message.noWrapper != null && Object.hasOwnProperty.call(message, "noWrapper")) { - object.noWrapper = $root.google.pubsub.v1.PushConfig.NoWrapper.toObject(message.noWrapper, options, q + 1); - if (options.oneofs) - object.wrapper = "noWrapper"; - } - return object; - }; - - /** - * Converts this PushConfig to JSON. - * @function toJSON - * @memberof google.pubsub.v1.PushConfig - * @instance - * @returns {Object.} JSON object - */ - PushConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PushConfig - * @function getTypeUrl - * @memberof google.pubsub.v1.PushConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PushConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.PushConfig"; - }; - - PushConfig.OidcToken = (function() { - - /** - * Properties of an OidcToken. - * @memberof google.pubsub.v1.PushConfig - * @interface IOidcToken - * @property {string|null} [serviceAccountEmail] OidcToken serviceAccountEmail - * @property {string|null} [audience] OidcToken audience - */ - - /** - * Constructs a new OidcToken. - * @memberof google.pubsub.v1.PushConfig - * @classdesc Represents an OidcToken. - * @implements IOidcToken - * @constructor - * @param {google.pubsub.v1.PushConfig.IOidcToken=} [properties] Properties to set - */ - function OidcToken(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * OidcToken serviceAccountEmail. - * @member {string} serviceAccountEmail - * @memberof google.pubsub.v1.PushConfig.OidcToken - * @instance - */ - OidcToken.prototype.serviceAccountEmail = ""; - - /** - * OidcToken audience. - * @member {string} audience - * @memberof google.pubsub.v1.PushConfig.OidcToken - * @instance - */ - OidcToken.prototype.audience = ""; - - /** - * Creates a new OidcToken instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.PushConfig.OidcToken - * @static - * @param {google.pubsub.v1.PushConfig.IOidcToken=} [properties] Properties to set - * @returns {google.pubsub.v1.PushConfig.OidcToken} OidcToken instance - */ - OidcToken.create = function create(properties) { - return new OidcToken(properties); - }; - - /** - * Encodes the specified OidcToken message. Does not implicitly {@link google.pubsub.v1.PushConfig.OidcToken.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.PushConfig.OidcToken - * @static - * @param {google.pubsub.v1.PushConfig.IOidcToken} message OidcToken message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OidcToken.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.serviceAccountEmail); - if (message.audience != null && Object.hasOwnProperty.call(message, "audience")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.audience); - return writer; - }; - - /** - * Encodes the specified OidcToken message, length delimited. Does not implicitly {@link google.pubsub.v1.PushConfig.OidcToken.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.PushConfig.OidcToken - * @static - * @param {google.pubsub.v1.PushConfig.IOidcToken} message OidcToken message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OidcToken.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an OidcToken message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.PushConfig.OidcToken - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.PushConfig.OidcToken} OidcToken - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OidcToken.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.PushConfig.OidcToken(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.serviceAccountEmail = reader.string(); - break; - } - case 2: { - message.audience = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an OidcToken message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.PushConfig.OidcToken - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.PushConfig.OidcToken} OidcToken - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OidcToken.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OidcToken message. - * @function verify - * @memberof google.pubsub.v1.PushConfig.OidcToken - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OidcToken.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) - if (!$util.isString(message.serviceAccountEmail)) - return "serviceAccountEmail: string expected"; - if (message.audience != null && Object.hasOwnProperty.call(message, "audience")) - if (!$util.isString(message.audience)) - return "audience: string expected"; - return null; - }; - - /** - * Creates an OidcToken message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.PushConfig.OidcToken - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.PushConfig.OidcToken} OidcToken - */ - OidcToken.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.PushConfig.OidcToken) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.PushConfig.OidcToken: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.PushConfig.OidcToken(); - if (object.serviceAccountEmail != null) - message.serviceAccountEmail = String(object.serviceAccountEmail); - if (object.audience != null) - message.audience = String(object.audience); - return message; - }; - - /** - * Creates a plain object from an OidcToken message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.PushConfig.OidcToken - * @static - * @param {google.pubsub.v1.PushConfig.OidcToken} message OidcToken - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OidcToken.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.serviceAccountEmail = ""; - object.audience = ""; - } - if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) - object.serviceAccountEmail = message.serviceAccountEmail; - if (message.audience != null && Object.hasOwnProperty.call(message, "audience")) - object.audience = message.audience; - return object; - }; - - /** - * Converts this OidcToken to JSON. - * @function toJSON - * @memberof google.pubsub.v1.PushConfig.OidcToken - * @instance - * @returns {Object.} JSON object - */ - OidcToken.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OidcToken - * @function getTypeUrl - * @memberof google.pubsub.v1.PushConfig.OidcToken - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OidcToken.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.PushConfig.OidcToken"; - }; - - return OidcToken; - })(); - - PushConfig.PubsubWrapper = (function() { - - /** - * Properties of a PubsubWrapper. - * @memberof google.pubsub.v1.PushConfig - * @interface IPubsubWrapper - */ - - /** - * Constructs a new PubsubWrapper. - * @memberof google.pubsub.v1.PushConfig - * @classdesc Represents a PubsubWrapper. - * @implements IPubsubWrapper - * @constructor - * @param {google.pubsub.v1.PushConfig.IPubsubWrapper=} [properties] Properties to set - */ - function PubsubWrapper(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new PubsubWrapper instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.PushConfig.PubsubWrapper - * @static - * @param {google.pubsub.v1.PushConfig.IPubsubWrapper=} [properties] Properties to set - * @returns {google.pubsub.v1.PushConfig.PubsubWrapper} PubsubWrapper instance - */ - PubsubWrapper.create = function create(properties) { - return new PubsubWrapper(properties); - }; - - /** - * Encodes the specified PubsubWrapper message. Does not implicitly {@link google.pubsub.v1.PushConfig.PubsubWrapper.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.PushConfig.PubsubWrapper - * @static - * @param {google.pubsub.v1.PushConfig.IPubsubWrapper} message PubsubWrapper message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PubsubWrapper.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - return writer; - }; - - /** - * Encodes the specified PubsubWrapper message, length delimited. Does not implicitly {@link google.pubsub.v1.PushConfig.PubsubWrapper.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.PushConfig.PubsubWrapper - * @static - * @param {google.pubsub.v1.PushConfig.IPubsubWrapper} message PubsubWrapper message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PubsubWrapper.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a PubsubWrapper message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.PushConfig.PubsubWrapper - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.PushConfig.PubsubWrapper} PubsubWrapper - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PubsubWrapper.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.PushConfig.PubsubWrapper(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a PubsubWrapper message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.PushConfig.PubsubWrapper - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.PushConfig.PubsubWrapper} PubsubWrapper - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PubsubWrapper.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PubsubWrapper message. - * @function verify - * @memberof google.pubsub.v1.PushConfig.PubsubWrapper - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PubsubWrapper.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - return null; - }; - - /** - * Creates a PubsubWrapper message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.PushConfig.PubsubWrapper - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.PushConfig.PubsubWrapper} PubsubWrapper - */ - PubsubWrapper.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.PushConfig.PubsubWrapper) - return object; - return new $root.google.pubsub.v1.PushConfig.PubsubWrapper(); - }; - - /** - * Creates a plain object from a PubsubWrapper message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.PushConfig.PubsubWrapper - * @static - * @param {google.pubsub.v1.PushConfig.PubsubWrapper} message PubsubWrapper - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PubsubWrapper.toObject = function toObject() { - return {}; - }; - - /** - * Converts this PubsubWrapper to JSON. - * @function toJSON - * @memberof google.pubsub.v1.PushConfig.PubsubWrapper - * @instance - * @returns {Object.} JSON object - */ - PubsubWrapper.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PubsubWrapper - * @function getTypeUrl - * @memberof google.pubsub.v1.PushConfig.PubsubWrapper - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PubsubWrapper.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.PushConfig.PubsubWrapper"; - }; - - return PubsubWrapper; - })(); - - PushConfig.NoWrapper = (function() { - - /** - * Properties of a NoWrapper. - * @memberof google.pubsub.v1.PushConfig - * @interface INoWrapper - * @property {boolean|null} [writeMetadata] NoWrapper writeMetadata - */ - - /** - * Constructs a new NoWrapper. - * @memberof google.pubsub.v1.PushConfig - * @classdesc Represents a NoWrapper. - * @implements INoWrapper - * @constructor - * @param {google.pubsub.v1.PushConfig.INoWrapper=} [properties] Properties to set - */ - function NoWrapper(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * NoWrapper writeMetadata. - * @member {boolean} writeMetadata - * @memberof google.pubsub.v1.PushConfig.NoWrapper - * @instance - */ - NoWrapper.prototype.writeMetadata = false; - - /** - * Creates a new NoWrapper instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.PushConfig.NoWrapper - * @static - * @param {google.pubsub.v1.PushConfig.INoWrapper=} [properties] Properties to set - * @returns {google.pubsub.v1.PushConfig.NoWrapper} NoWrapper instance - */ - NoWrapper.create = function create(properties) { - return new NoWrapper(properties); - }; - - /** - * Encodes the specified NoWrapper message. Does not implicitly {@link google.pubsub.v1.PushConfig.NoWrapper.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.PushConfig.NoWrapper - * @static - * @param {google.pubsub.v1.PushConfig.INoWrapper} message NoWrapper message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NoWrapper.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.writeMetadata != null && Object.hasOwnProperty.call(message, "writeMetadata")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.writeMetadata); - return writer; - }; - - /** - * Encodes the specified NoWrapper message, length delimited. Does not implicitly {@link google.pubsub.v1.PushConfig.NoWrapper.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.PushConfig.NoWrapper - * @static - * @param {google.pubsub.v1.PushConfig.INoWrapper} message NoWrapper message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NoWrapper.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a NoWrapper message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.PushConfig.NoWrapper - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.PushConfig.NoWrapper} NoWrapper - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NoWrapper.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.PushConfig.NoWrapper(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.writeMetadata = reader.bool(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a NoWrapper message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.PushConfig.NoWrapper - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.PushConfig.NoWrapper} NoWrapper - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NoWrapper.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NoWrapper message. - * @function verify - * @memberof google.pubsub.v1.PushConfig.NoWrapper - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NoWrapper.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.writeMetadata != null && Object.hasOwnProperty.call(message, "writeMetadata")) - if (typeof message.writeMetadata !== "boolean") - return "writeMetadata: boolean expected"; - return null; - }; - - /** - * Creates a NoWrapper message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.PushConfig.NoWrapper - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.PushConfig.NoWrapper} NoWrapper - */ - NoWrapper.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.PushConfig.NoWrapper) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.PushConfig.NoWrapper: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.PushConfig.NoWrapper(); - if (object.writeMetadata != null) - message.writeMetadata = Boolean(object.writeMetadata); - return message; - }; - - /** - * Creates a plain object from a NoWrapper message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.PushConfig.NoWrapper - * @static - * @param {google.pubsub.v1.PushConfig.NoWrapper} message NoWrapper - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NoWrapper.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.writeMetadata = false; - if (message.writeMetadata != null && Object.hasOwnProperty.call(message, "writeMetadata")) - object.writeMetadata = message.writeMetadata; - return object; - }; - - /** - * Converts this NoWrapper to JSON. - * @function toJSON - * @memberof google.pubsub.v1.PushConfig.NoWrapper - * @instance - * @returns {Object.} JSON object - */ - NoWrapper.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NoWrapper - * @function getTypeUrl - * @memberof google.pubsub.v1.PushConfig.NoWrapper - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NoWrapper.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.PushConfig.NoWrapper"; - }; - - return NoWrapper; - })(); - - return PushConfig; - })(); - - v1.BigQueryConfig = (function() { - - /** - * Properties of a BigQueryConfig. - * @memberof google.pubsub.v1 - * @interface IBigQueryConfig - * @property {string|null} [table] BigQueryConfig table - * @property {boolean|null} [useTopicSchema] BigQueryConfig useTopicSchema - * @property {boolean|null} [writeMetadata] BigQueryConfig writeMetadata - * @property {boolean|null} [dropUnknownFields] BigQueryConfig dropUnknownFields - * @property {google.pubsub.v1.BigQueryConfig.State|null} [state] BigQueryConfig state - * @property {boolean|null} [useTableSchema] BigQueryConfig useTableSchema - * @property {string|null} [serviceAccountEmail] BigQueryConfig serviceAccountEmail - */ - - /** - * Constructs a new BigQueryConfig. - * @memberof google.pubsub.v1 - * @classdesc Represents a BigQueryConfig. - * @implements IBigQueryConfig - * @constructor - * @param {google.pubsub.v1.IBigQueryConfig=} [properties] Properties to set - */ - function BigQueryConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigQueryConfig table. - * @member {string} table - * @memberof google.pubsub.v1.BigQueryConfig - * @instance - */ - BigQueryConfig.prototype.table = ""; - - /** - * BigQueryConfig useTopicSchema. - * @member {boolean} useTopicSchema - * @memberof google.pubsub.v1.BigQueryConfig - * @instance - */ - BigQueryConfig.prototype.useTopicSchema = false; - - /** - * BigQueryConfig writeMetadata. - * @member {boolean} writeMetadata - * @memberof google.pubsub.v1.BigQueryConfig - * @instance - */ - BigQueryConfig.prototype.writeMetadata = false; - - /** - * BigQueryConfig dropUnknownFields. - * @member {boolean} dropUnknownFields - * @memberof google.pubsub.v1.BigQueryConfig - * @instance - */ - BigQueryConfig.prototype.dropUnknownFields = false; - - /** - * BigQueryConfig state. - * @member {google.pubsub.v1.BigQueryConfig.State} state - * @memberof google.pubsub.v1.BigQueryConfig - * @instance - */ - BigQueryConfig.prototype.state = 0; - - /** - * BigQueryConfig useTableSchema. - * @member {boolean} useTableSchema - * @memberof google.pubsub.v1.BigQueryConfig - * @instance - */ - BigQueryConfig.prototype.useTableSchema = false; - - /** - * BigQueryConfig serviceAccountEmail. - * @member {string} serviceAccountEmail - * @memberof google.pubsub.v1.BigQueryConfig - * @instance - */ - BigQueryConfig.prototype.serviceAccountEmail = ""; - - /** - * Creates a new BigQueryConfig instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.BigQueryConfig - * @static - * @param {google.pubsub.v1.IBigQueryConfig=} [properties] Properties to set - * @returns {google.pubsub.v1.BigQueryConfig} BigQueryConfig instance - */ - BigQueryConfig.create = function create(properties) { - return new BigQueryConfig(properties); - }; - - /** - * Encodes the specified BigQueryConfig message. Does not implicitly {@link google.pubsub.v1.BigQueryConfig.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.BigQueryConfig - * @static - * @param {google.pubsub.v1.IBigQueryConfig} message BigQueryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryConfig.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); - if (message.useTopicSchema != null && Object.hasOwnProperty.call(message, "useTopicSchema")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.useTopicSchema); - if (message.writeMetadata != null && Object.hasOwnProperty.call(message, "writeMetadata")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.writeMetadata); - if (message.dropUnknownFields != null && Object.hasOwnProperty.call(message, "dropUnknownFields")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.dropUnknownFields); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.useTableSchema != null && Object.hasOwnProperty.call(message, "useTableSchema")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.useTableSchema); - if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.serviceAccountEmail); - return writer; - }; - - /** - * Encodes the specified BigQueryConfig message, length delimited. Does not implicitly {@link google.pubsub.v1.BigQueryConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.BigQueryConfig - * @static - * @param {google.pubsub.v1.IBigQueryConfig} message BigQueryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigQueryConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a BigQueryConfig message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.BigQueryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.BigQueryConfig} BigQueryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryConfig.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.BigQueryConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.table = reader.string(); - break; - } - case 2: { - message.useTopicSchema = reader.bool(); - break; - } - case 3: { - message.writeMetadata = reader.bool(); - break; - } - case 4: { - message.dropUnknownFields = reader.bool(); - break; - } - case 5: { - message.state = reader.int32(); - break; - } - case 6: { - message.useTableSchema = reader.bool(); - break; - } - case 7: { - message.serviceAccountEmail = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.BigQueryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.BigQueryConfig} BigQueryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryConfig message. - * @function verify - * @memberof google.pubsub.v1.BigQueryConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryConfig.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.useTopicSchema != null && Object.hasOwnProperty.call(message, "useTopicSchema")) - if (typeof message.useTopicSchema !== "boolean") - return "useTopicSchema: boolean expected"; - if (message.writeMetadata != null && Object.hasOwnProperty.call(message, "writeMetadata")) - if (typeof message.writeMetadata !== "boolean") - return "writeMetadata: boolean expected"; - if (message.dropUnknownFields != null && Object.hasOwnProperty.call(message, "dropUnknownFields")) - if (typeof message.dropUnknownFields !== "boolean") - return "dropUnknownFields: boolean expected"; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.useTableSchema != null && Object.hasOwnProperty.call(message, "useTableSchema")) - if (typeof message.useTableSchema !== "boolean") - return "useTableSchema: boolean expected"; - if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) - if (!$util.isString(message.serviceAccountEmail)) - return "serviceAccountEmail: string expected"; - return null; - }; - - /** - * Creates a BigQueryConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.BigQueryConfig - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.BigQueryConfig} BigQueryConfig - */ - BigQueryConfig.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.BigQueryConfig) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.BigQueryConfig: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.BigQueryConfig(); - if (object.table != null) - message.table = String(object.table); - if (object.useTopicSchema != null) - message.useTopicSchema = Boolean(object.useTopicSchema); - if (object.writeMetadata != null) - message.writeMetadata = Boolean(object.writeMetadata); - if (object.dropUnknownFields != null) - message.dropUnknownFields = Boolean(object.dropUnknownFields); - 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 "ACTIVE": - case 1: - message.state = 1; - break; - case "PERMISSION_DENIED": - case 2: - message.state = 2; - break; - case "NOT_FOUND": - case 3: - message.state = 3; - break; - case "SCHEMA_MISMATCH": - case 4: - message.state = 4; - break; - case "IN_TRANSIT_LOCATION_RESTRICTION": - case 5: - message.state = 5; - break; - case "VERTEX_AI_LOCATION_RESTRICTION": - case 6: - message.state = 6; - break; - } - if (object.useTableSchema != null) - message.useTableSchema = Boolean(object.useTableSchema); - if (object.serviceAccountEmail != null) - message.serviceAccountEmail = String(object.serviceAccountEmail); - return message; - }; - - /** - * Creates a plain object from a BigQueryConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.BigQueryConfig - * @static - * @param {google.pubsub.v1.BigQueryConfig} message BigQueryConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryConfig.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.table = ""; - object.useTopicSchema = false; - object.writeMetadata = false; - object.dropUnknownFields = false; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.useTableSchema = false; - object.serviceAccountEmail = ""; - } - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - object.table = message.table; - if (message.useTopicSchema != null && Object.hasOwnProperty.call(message, "useTopicSchema")) - object.useTopicSchema = message.useTopicSchema; - if (message.writeMetadata != null && Object.hasOwnProperty.call(message, "writeMetadata")) - object.writeMetadata = message.writeMetadata; - if (message.dropUnknownFields != null && Object.hasOwnProperty.call(message, "dropUnknownFields")) - object.dropUnknownFields = message.dropUnknownFields; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - object.state = options.enums === String ? $root.google.pubsub.v1.BigQueryConfig.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.BigQueryConfig.State[message.state] : message.state; - if (message.useTableSchema != null && Object.hasOwnProperty.call(message, "useTableSchema")) - object.useTableSchema = message.useTableSchema; - if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) - object.serviceAccountEmail = message.serviceAccountEmail; - return object; - }; - - /** - * Converts this BigQueryConfig to JSON. - * @function toJSON - * @memberof google.pubsub.v1.BigQueryConfig - * @instance - * @returns {Object.} JSON object - */ - BigQueryConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryConfig - * @function getTypeUrl - * @memberof google.pubsub.v1.BigQueryConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.BigQueryConfig"; - }; - - /** - * State enum. - * @name google.pubsub.v1.BigQueryConfig.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} PERMISSION_DENIED=2 PERMISSION_DENIED value - * @property {number} NOT_FOUND=3 NOT_FOUND value - * @property {number} SCHEMA_MISMATCH=4 SCHEMA_MISMATCH value - * @property {number} IN_TRANSIT_LOCATION_RESTRICTION=5 IN_TRANSIT_LOCATION_RESTRICTION value - * @property {number} VERTEX_AI_LOCATION_RESTRICTION=6 VERTEX_AI_LOCATION_RESTRICTION value - */ - BigQueryConfig.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "PERMISSION_DENIED"] = 2; - values[valuesById[3] = "NOT_FOUND"] = 3; - values[valuesById[4] = "SCHEMA_MISMATCH"] = 4; - values[valuesById[5] = "IN_TRANSIT_LOCATION_RESTRICTION"] = 5; - values[valuesById[6] = "VERTEX_AI_LOCATION_RESTRICTION"] = 6; - return values; - })(); - - return BigQueryConfig; - })(); - - v1.BigtableConfig = (function() { - - /** - * Properties of a BigtableConfig. - * @memberof google.pubsub.v1 - * @interface IBigtableConfig - * @property {string|null} [table] BigtableConfig table - * @property {string|null} [appProfileId] BigtableConfig appProfileId - * @property {string|null} [serviceAccountEmail] BigtableConfig serviceAccountEmail - * @property {boolean|null} [writeMetadata] BigtableConfig writeMetadata - * @property {google.pubsub.v1.BigtableConfig.State|null} [state] BigtableConfig state - */ - - /** - * Constructs a new BigtableConfig. - * @memberof google.pubsub.v1 - * @classdesc Represents a BigtableConfig. - * @implements IBigtableConfig - * @constructor - * @param {google.pubsub.v1.IBigtableConfig=} [properties] Properties to set - */ - function BigtableConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * BigtableConfig table. - * @member {string} table - * @memberof google.pubsub.v1.BigtableConfig - * @instance - */ - BigtableConfig.prototype.table = ""; - - /** - * BigtableConfig appProfileId. - * @member {string} appProfileId - * @memberof google.pubsub.v1.BigtableConfig - * @instance - */ - BigtableConfig.prototype.appProfileId = ""; - - /** - * BigtableConfig serviceAccountEmail. - * @member {string} serviceAccountEmail - * @memberof google.pubsub.v1.BigtableConfig - * @instance - */ - BigtableConfig.prototype.serviceAccountEmail = ""; - - /** - * BigtableConfig writeMetadata. - * @member {boolean} writeMetadata - * @memberof google.pubsub.v1.BigtableConfig - * @instance - */ - BigtableConfig.prototype.writeMetadata = false; - - /** - * BigtableConfig state. - * @member {google.pubsub.v1.BigtableConfig.State} state - * @memberof google.pubsub.v1.BigtableConfig - * @instance - */ - BigtableConfig.prototype.state = 0; - - /** - * Creates a new BigtableConfig instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.BigtableConfig - * @static - * @param {google.pubsub.v1.IBigtableConfig=} [properties] Properties to set - * @returns {google.pubsub.v1.BigtableConfig} BigtableConfig instance - */ - BigtableConfig.create = function create(properties) { - return new BigtableConfig(properties); - }; - - /** - * Encodes the specified BigtableConfig message. Does not implicitly {@link google.pubsub.v1.BigtableConfig.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.BigtableConfig - * @static - * @param {google.pubsub.v1.IBigtableConfig} message BigtableConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigtableConfig.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); - if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); - if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.serviceAccountEmail); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.writeMetadata != null && Object.hasOwnProperty.call(message, "writeMetadata")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.writeMetadata); - return writer; - }; - - /** - * Encodes the specified BigtableConfig message, length delimited. Does not implicitly {@link google.pubsub.v1.BigtableConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.BigtableConfig - * @static - * @param {google.pubsub.v1.IBigtableConfig} message BigtableConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BigtableConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a BigtableConfig message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.BigtableConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.BigtableConfig} BigtableConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigtableConfig.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.BigtableConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.table = reader.string(); - break; - } - case 2: { - message.appProfileId = reader.string(); - break; - } - case 3: { - message.serviceAccountEmail = reader.string(); - break; - } - case 5: { - message.writeMetadata = reader.bool(); - break; - } - case 4: { - message.state = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a BigtableConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.BigtableConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.BigtableConfig} BigtableConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigtableConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigtableConfig message. - * @function verify - * @memberof google.pubsub.v1.BigtableConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigtableConfig.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) - if (!$util.isString(message.appProfileId)) - return "appProfileId: string expected"; - if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) - if (!$util.isString(message.serviceAccountEmail)) - return "serviceAccountEmail: string expected"; - if (message.writeMetadata != null && Object.hasOwnProperty.call(message, "writeMetadata")) - if (typeof message.writeMetadata !== "boolean") - return "writeMetadata: boolean expected"; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - return null; - }; - - /** - * Creates a BigtableConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.BigtableConfig - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.BigtableConfig} BigtableConfig - */ - BigtableConfig.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.BigtableConfig) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.BigtableConfig: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.BigtableConfig(); - if (object.table != null) - message.table = String(object.table); - if (object.appProfileId != null) - message.appProfileId = String(object.appProfileId); - if (object.serviceAccountEmail != null) - message.serviceAccountEmail = String(object.serviceAccountEmail); - if (object.writeMetadata != null) - message.writeMetadata = Boolean(object.writeMetadata); - 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 "ACTIVE": - case 1: - message.state = 1; - break; - case "NOT_FOUND": - case 2: - message.state = 2; - break; - case "APP_PROFILE_MISCONFIGURED": - case 3: - message.state = 3; - break; - case "PERMISSION_DENIED": - case 4: - message.state = 4; - break; - case "SCHEMA_MISMATCH": - case 5: - message.state = 5; - break; - case "IN_TRANSIT_LOCATION_RESTRICTION": - case 6: - message.state = 6; - break; - case "VERTEX_AI_LOCATION_RESTRICTION": - case 7: - message.state = 7; - break; - } - return message; - }; - - /** - * Creates a plain object from a BigtableConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.BigtableConfig - * @static - * @param {google.pubsub.v1.BigtableConfig} message BigtableConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigtableConfig.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.table = ""; - object.appProfileId = ""; - object.serviceAccountEmail = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.writeMetadata = false; - } - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - object.table = message.table; - if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) - object.appProfileId = message.appProfileId; - if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) - object.serviceAccountEmail = message.serviceAccountEmail; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - object.state = options.enums === String ? $root.google.pubsub.v1.BigtableConfig.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.BigtableConfig.State[message.state] : message.state; - if (message.writeMetadata != null && Object.hasOwnProperty.call(message, "writeMetadata")) - object.writeMetadata = message.writeMetadata; - return object; - }; - - /** - * Converts this BigtableConfig to JSON. - * @function toJSON - * @memberof google.pubsub.v1.BigtableConfig - * @instance - * @returns {Object.} JSON object - */ - BigtableConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigtableConfig - * @function getTypeUrl - * @memberof google.pubsub.v1.BigtableConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigtableConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.BigtableConfig"; - }; - - /** - * State enum. - * @name google.pubsub.v1.BigtableConfig.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} NOT_FOUND=2 NOT_FOUND value - * @property {number} APP_PROFILE_MISCONFIGURED=3 APP_PROFILE_MISCONFIGURED value - * @property {number} PERMISSION_DENIED=4 PERMISSION_DENIED value - * @property {number} SCHEMA_MISMATCH=5 SCHEMA_MISMATCH value - * @property {number} IN_TRANSIT_LOCATION_RESTRICTION=6 IN_TRANSIT_LOCATION_RESTRICTION value - * @property {number} VERTEX_AI_LOCATION_RESTRICTION=7 VERTEX_AI_LOCATION_RESTRICTION value - */ - BigtableConfig.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "NOT_FOUND"] = 2; - values[valuesById[3] = "APP_PROFILE_MISCONFIGURED"] = 3; - values[valuesById[4] = "PERMISSION_DENIED"] = 4; - values[valuesById[5] = "SCHEMA_MISMATCH"] = 5; - values[valuesById[6] = "IN_TRANSIT_LOCATION_RESTRICTION"] = 6; - values[valuesById[7] = "VERTEX_AI_LOCATION_RESTRICTION"] = 7; - return values; - })(); - - return BigtableConfig; - })(); - - v1.CloudStorageConfig = (function() { - - /** - * Properties of a CloudStorageConfig. - * @memberof google.pubsub.v1 - * @interface ICloudStorageConfig - * @property {string|null} [bucket] CloudStorageConfig bucket - * @property {string|null} [filenamePrefix] CloudStorageConfig filenamePrefix - * @property {string|null} [filenameSuffix] CloudStorageConfig filenameSuffix - * @property {string|null} [filenameDatetimeFormat] CloudStorageConfig filenameDatetimeFormat - * @property {google.pubsub.v1.CloudStorageConfig.ITextConfig|null} [textConfig] CloudStorageConfig textConfig - * @property {google.pubsub.v1.CloudStorageConfig.IAvroConfig|null} [avroConfig] CloudStorageConfig avroConfig - * @property {google.protobuf.IDuration|null} [maxDuration] CloudStorageConfig maxDuration - * @property {number|Long|null} [maxBytes] CloudStorageConfig maxBytes - * @property {number|Long|null} [maxMessages] CloudStorageConfig maxMessages - * @property {google.pubsub.v1.CloudStorageConfig.State|null} [state] CloudStorageConfig state - * @property {string|null} [serviceAccountEmail] CloudStorageConfig serviceAccountEmail - */ - - /** - * Constructs a new CloudStorageConfig. - * @memberof google.pubsub.v1 - * @classdesc Represents a CloudStorageConfig. - * @implements ICloudStorageConfig - * @constructor - * @param {google.pubsub.v1.ICloudStorageConfig=} [properties] Properties to set - */ - function CloudStorageConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudStorageConfig bucket. - * @member {string} bucket - * @memberof google.pubsub.v1.CloudStorageConfig - * @instance - */ - CloudStorageConfig.prototype.bucket = ""; - - /** - * CloudStorageConfig filenamePrefix. - * @member {string} filenamePrefix - * @memberof google.pubsub.v1.CloudStorageConfig - * @instance - */ - CloudStorageConfig.prototype.filenamePrefix = ""; - - /** - * CloudStorageConfig filenameSuffix. - * @member {string} filenameSuffix - * @memberof google.pubsub.v1.CloudStorageConfig - * @instance - */ - CloudStorageConfig.prototype.filenameSuffix = ""; - - /** - * CloudStorageConfig filenameDatetimeFormat. - * @member {string} filenameDatetimeFormat - * @memberof google.pubsub.v1.CloudStorageConfig - * @instance - */ - CloudStorageConfig.prototype.filenameDatetimeFormat = ""; - - /** - * CloudStorageConfig textConfig. - * @member {google.pubsub.v1.CloudStorageConfig.ITextConfig|null|undefined} textConfig - * @memberof google.pubsub.v1.CloudStorageConfig - * @instance - */ - CloudStorageConfig.prototype.textConfig = null; - - /** - * CloudStorageConfig avroConfig. - * @member {google.pubsub.v1.CloudStorageConfig.IAvroConfig|null|undefined} avroConfig - * @memberof google.pubsub.v1.CloudStorageConfig - * @instance - */ - CloudStorageConfig.prototype.avroConfig = null; - - /** - * CloudStorageConfig maxDuration. - * @member {google.protobuf.IDuration|null|undefined} maxDuration - * @memberof google.pubsub.v1.CloudStorageConfig - * @instance - */ - CloudStorageConfig.prototype.maxDuration = null; - - /** - * CloudStorageConfig maxBytes. - * @member {number|Long} maxBytes - * @memberof google.pubsub.v1.CloudStorageConfig - * @instance - */ - CloudStorageConfig.prototype.maxBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * CloudStorageConfig maxMessages. - * @member {number|Long} maxMessages - * @memberof google.pubsub.v1.CloudStorageConfig - * @instance - */ - CloudStorageConfig.prototype.maxMessages = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * CloudStorageConfig state. - * @member {google.pubsub.v1.CloudStorageConfig.State} state - * @memberof google.pubsub.v1.CloudStorageConfig - * @instance - */ - CloudStorageConfig.prototype.state = 0; - - /** - * CloudStorageConfig serviceAccountEmail. - * @member {string} serviceAccountEmail - * @memberof google.pubsub.v1.CloudStorageConfig - * @instance - */ - CloudStorageConfig.prototype.serviceAccountEmail = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * CloudStorageConfig outputFormat. - * @member {"textConfig"|"avroConfig"|undefined} outputFormat - * @memberof google.pubsub.v1.CloudStorageConfig - * @instance - */ - Object.defineProperty(CloudStorageConfig.prototype, "outputFormat", { - get: $util.oneOfGetter($oneOfFields = ["textConfig", "avroConfig"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new CloudStorageConfig instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.CloudStorageConfig - * @static - * @param {google.pubsub.v1.ICloudStorageConfig=} [properties] Properties to set - * @returns {google.pubsub.v1.CloudStorageConfig} CloudStorageConfig instance - */ - CloudStorageConfig.create = function create(properties) { - return new CloudStorageConfig(properties); - }; - - /** - * Encodes the specified CloudStorageConfig message. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.CloudStorageConfig - * @static - * @param {google.pubsub.v1.ICloudStorageConfig} message CloudStorageConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudStorageConfig.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); - if (message.filenamePrefix != null && Object.hasOwnProperty.call(message, "filenamePrefix")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.filenamePrefix); - if (message.filenameSuffix != null && Object.hasOwnProperty.call(message, "filenameSuffix")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.filenameSuffix); - if (message.textConfig != null && Object.hasOwnProperty.call(message, "textConfig")) - $root.google.pubsub.v1.CloudStorageConfig.TextConfig.encode(message.textConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); - if (message.avroConfig != null && Object.hasOwnProperty.call(message, "avroConfig")) - $root.google.pubsub.v1.CloudStorageConfig.AvroConfig.encode(message.avroConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); - if (message.maxDuration != null && Object.hasOwnProperty.call(message, "maxDuration")) - $root.google.protobuf.Duration.encode(message.maxDuration, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); - if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.maxBytes); - if (message.maxMessages != null && Object.hasOwnProperty.call(message, "maxMessages")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.maxMessages); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.state); - if (message.filenameDatetimeFormat != null && Object.hasOwnProperty.call(message, "filenameDatetimeFormat")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.filenameDatetimeFormat); - if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.serviceAccountEmail); - return writer; - }; - - /** - * Encodes the specified CloudStorageConfig message, length delimited. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.CloudStorageConfig - * @static - * @param {google.pubsub.v1.ICloudStorageConfig} message CloudStorageConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudStorageConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a CloudStorageConfig message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.CloudStorageConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.CloudStorageConfig} CloudStorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudStorageConfig.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.CloudStorageConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.bucket = reader.string(); - break; - } - case 2: { - message.filenamePrefix = reader.string(); - break; - } - case 3: { - message.filenameSuffix = reader.string(); - break; - } - case 10: { - message.filenameDatetimeFormat = reader.string(); - break; - } - case 4: { - message.textConfig = $root.google.pubsub.v1.CloudStorageConfig.TextConfig.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 5: { - message.avroConfig = $root.google.pubsub.v1.CloudStorageConfig.AvroConfig.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 6: { - message.maxDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 7: { - message.maxBytes = reader.int64(); - break; - } - case 8: { - message.maxMessages = reader.int64(); - break; - } - case 9: { - message.state = reader.int32(); - break; - } - case 11: { - message.serviceAccountEmail = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a CloudStorageConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.CloudStorageConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.CloudStorageConfig} CloudStorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudStorageConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudStorageConfig message. - * @function verify - * @memberof google.pubsub.v1.CloudStorageConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudStorageConfig.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - if (!$util.isString(message.bucket)) - return "bucket: string expected"; - if (message.filenamePrefix != null && Object.hasOwnProperty.call(message, "filenamePrefix")) - if (!$util.isString(message.filenamePrefix)) - return "filenamePrefix: string expected"; - if (message.filenameSuffix != null && Object.hasOwnProperty.call(message, "filenameSuffix")) - if (!$util.isString(message.filenameSuffix)) - return "filenameSuffix: string expected"; - if (message.filenameDatetimeFormat != null && Object.hasOwnProperty.call(message, "filenameDatetimeFormat")) - if (!$util.isString(message.filenameDatetimeFormat)) - return "filenameDatetimeFormat: string expected"; - if (message.textConfig != null && Object.hasOwnProperty.call(message, "textConfig")) { - properties.outputFormat = 1; - { - var error = $root.google.pubsub.v1.CloudStorageConfig.TextConfig.verify(message.textConfig, long + 1); - if (error) - return "textConfig." + error; - } - } - if (message.avroConfig != null && Object.hasOwnProperty.call(message, "avroConfig")) { - if (properties.outputFormat === 1) - return "outputFormat: multiple values"; - properties.outputFormat = 1; - { - var error = $root.google.pubsub.v1.CloudStorageConfig.AvroConfig.verify(message.avroConfig, long + 1); - if (error) - return "avroConfig." + error; - } - } - if (message.maxDuration != null && Object.hasOwnProperty.call(message, "maxDuration")) { - var error = $root.google.protobuf.Duration.verify(message.maxDuration, long + 1); - if (error) - return "maxDuration." + error; - } - if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes")) - if (!$util.isInteger(message.maxBytes) && !(message.maxBytes && $util.isInteger(message.maxBytes.low) && $util.isInteger(message.maxBytes.high))) - return "maxBytes: integer|Long expected"; - if (message.maxMessages != null && Object.hasOwnProperty.call(message, "maxMessages")) - if (!$util.isInteger(message.maxMessages) && !(message.maxMessages && $util.isInteger(message.maxMessages.low) && $util.isInteger(message.maxMessages.high))) - return "maxMessages: integer|Long expected"; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) - if (!$util.isString(message.serviceAccountEmail)) - return "serviceAccountEmail: string expected"; - return null; - }; - - /** - * Creates a CloudStorageConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.CloudStorageConfig - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.CloudStorageConfig} CloudStorageConfig - */ - CloudStorageConfig.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.CloudStorageConfig) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.CloudStorageConfig: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.CloudStorageConfig(); - if (object.bucket != null) - message.bucket = String(object.bucket); - if (object.filenamePrefix != null) - message.filenamePrefix = String(object.filenamePrefix); - if (object.filenameSuffix != null) - message.filenameSuffix = String(object.filenameSuffix); - if (object.filenameDatetimeFormat != null) - message.filenameDatetimeFormat = String(object.filenameDatetimeFormat); - if (object.textConfig != null) { - if (!$util.isObject(object.textConfig)) - throw TypeError(".google.pubsub.v1.CloudStorageConfig.textConfig: object expected"); - message.textConfig = $root.google.pubsub.v1.CloudStorageConfig.TextConfig.fromObject(object.textConfig, long + 1); - } - if (object.avroConfig != null) { - if (!$util.isObject(object.avroConfig)) - throw TypeError(".google.pubsub.v1.CloudStorageConfig.avroConfig: object expected"); - message.avroConfig = $root.google.pubsub.v1.CloudStorageConfig.AvroConfig.fromObject(object.avroConfig, long + 1); - } - if (object.maxDuration != null) { - if (!$util.isObject(object.maxDuration)) - throw TypeError(".google.pubsub.v1.CloudStorageConfig.maxDuration: object expected"); - message.maxDuration = $root.google.protobuf.Duration.fromObject(object.maxDuration, long + 1); - } - if (object.maxBytes != null) - if ($util.Long) - message.maxBytes = $util.Long.fromValue(object.maxBytes, false); - else if (typeof object.maxBytes === "string") - message.maxBytes = parseInt(object.maxBytes, 10); - else if (typeof object.maxBytes === "number") - message.maxBytes = object.maxBytes; - else if (typeof object.maxBytes === "object") - message.maxBytes = new $util.LongBits(object.maxBytes.low >>> 0, object.maxBytes.high >>> 0).toNumber(); - if (object.maxMessages != null) - if ($util.Long) - message.maxMessages = $util.Long.fromValue(object.maxMessages, false); - else if (typeof object.maxMessages === "string") - message.maxMessages = parseInt(object.maxMessages, 10); - else if (typeof object.maxMessages === "number") - message.maxMessages = object.maxMessages; - else if (typeof object.maxMessages === "object") - message.maxMessages = new $util.LongBits(object.maxMessages.low >>> 0, object.maxMessages.high >>> 0).toNumber(); - 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 "ACTIVE": - case 1: - message.state = 1; - break; - case "PERMISSION_DENIED": - case 2: - message.state = 2; - break; - case "NOT_FOUND": - case 3: - message.state = 3; - break; - case "IN_TRANSIT_LOCATION_RESTRICTION": - case 4: - message.state = 4; - break; - case "SCHEMA_MISMATCH": - case 5: - message.state = 5; - break; - case "VERTEX_AI_LOCATION_RESTRICTION": - case 6: - message.state = 6; - break; - } - if (object.serviceAccountEmail != null) - message.serviceAccountEmail = String(object.serviceAccountEmail); - return message; - }; - - /** - * Creates a plain object from a CloudStorageConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.CloudStorageConfig - * @static - * @param {google.pubsub.v1.CloudStorageConfig} message CloudStorageConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudStorageConfig.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.bucket = ""; - object.filenamePrefix = ""; - object.filenameSuffix = ""; - object.maxDuration = null; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.maxBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; - } else - object.maxBytes = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.maxMessages = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; - } else - object.maxMessages = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.filenameDatetimeFormat = ""; - object.serviceAccountEmail = ""; - } - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - object.bucket = message.bucket; - if (message.filenamePrefix != null && Object.hasOwnProperty.call(message, "filenamePrefix")) - object.filenamePrefix = message.filenamePrefix; - if (message.filenameSuffix != null && Object.hasOwnProperty.call(message, "filenameSuffix")) - object.filenameSuffix = message.filenameSuffix; - if (message.textConfig != null && Object.hasOwnProperty.call(message, "textConfig")) { - object.textConfig = $root.google.pubsub.v1.CloudStorageConfig.TextConfig.toObject(message.textConfig, options, q + 1); - if (options.oneofs) - object.outputFormat = "textConfig"; - } - if (message.avroConfig != null && Object.hasOwnProperty.call(message, "avroConfig")) { - object.avroConfig = $root.google.pubsub.v1.CloudStorageConfig.AvroConfig.toObject(message.avroConfig, options, q + 1); - if (options.oneofs) - object.outputFormat = "avroConfig"; - } - if (message.maxDuration != null && Object.hasOwnProperty.call(message, "maxDuration")) - object.maxDuration = $root.google.protobuf.Duration.toObject(message.maxDuration, options, q + 1); - if (message.maxBytes != null && Object.hasOwnProperty.call(message, "maxBytes")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.maxBytes = typeof message.maxBytes === "number" ? BigInt(message.maxBytes) : $util.Long.fromBits(message.maxBytes.low >>> 0, message.maxBytes.high >>> 0, false).toBigInt(); - else if (typeof message.maxBytes === "number") - object.maxBytes = options.longs === String ? String(message.maxBytes) : message.maxBytes; - else - object.maxBytes = options.longs === String ? $util.Long.prototype.toString.call(message.maxBytes) : options.longs === Number ? new $util.LongBits(message.maxBytes.low >>> 0, message.maxBytes.high >>> 0).toNumber() : message.maxBytes; - if (message.maxMessages != null && Object.hasOwnProperty.call(message, "maxMessages")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.maxMessages = typeof message.maxMessages === "number" ? BigInt(message.maxMessages) : $util.Long.fromBits(message.maxMessages.low >>> 0, message.maxMessages.high >>> 0, false).toBigInt(); - else if (typeof message.maxMessages === "number") - object.maxMessages = options.longs === String ? String(message.maxMessages) : message.maxMessages; - else - object.maxMessages = options.longs === String ? $util.Long.prototype.toString.call(message.maxMessages) : options.longs === Number ? new $util.LongBits(message.maxMessages.low >>> 0, message.maxMessages.high >>> 0).toNumber() : message.maxMessages; - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - object.state = options.enums === String ? $root.google.pubsub.v1.CloudStorageConfig.State[message.state] === undefined ? message.state : $root.google.pubsub.v1.CloudStorageConfig.State[message.state] : message.state; - if (message.filenameDatetimeFormat != null && Object.hasOwnProperty.call(message, "filenameDatetimeFormat")) - object.filenameDatetimeFormat = message.filenameDatetimeFormat; - if (message.serviceAccountEmail != null && Object.hasOwnProperty.call(message, "serviceAccountEmail")) - object.serviceAccountEmail = message.serviceAccountEmail; - return object; - }; - - /** - * Converts this CloudStorageConfig to JSON. - * @function toJSON - * @memberof google.pubsub.v1.CloudStorageConfig - * @instance - * @returns {Object.} JSON object - */ - CloudStorageConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudStorageConfig - * @function getTypeUrl - * @memberof google.pubsub.v1.CloudStorageConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudStorageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.CloudStorageConfig"; - }; - - CloudStorageConfig.TextConfig = (function() { - - /** - * Properties of a TextConfig. - * @memberof google.pubsub.v1.CloudStorageConfig - * @interface ITextConfig - */ - - /** - * Constructs a new TextConfig. - * @memberof google.pubsub.v1.CloudStorageConfig - * @classdesc Represents a TextConfig. - * @implements ITextConfig - * @constructor - * @param {google.pubsub.v1.CloudStorageConfig.ITextConfig=} [properties] Properties to set - */ - function TextConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new TextConfig instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.CloudStorageConfig.TextConfig - * @static - * @param {google.pubsub.v1.CloudStorageConfig.ITextConfig=} [properties] Properties to set - * @returns {google.pubsub.v1.CloudStorageConfig.TextConfig} TextConfig instance - */ - TextConfig.create = function create(properties) { - return new TextConfig(properties); - }; - - /** - * Encodes the specified TextConfig message. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.TextConfig.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.CloudStorageConfig.TextConfig - * @static - * @param {google.pubsub.v1.CloudStorageConfig.ITextConfig} message TextConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextConfig.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - return writer; - }; - - /** - * Encodes the specified TextConfig message, length delimited. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.TextConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.CloudStorageConfig.TextConfig - * @static - * @param {google.pubsub.v1.CloudStorageConfig.ITextConfig} message TextConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TextConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a TextConfig message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.CloudStorageConfig.TextConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.CloudStorageConfig.TextConfig} TextConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextConfig.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.CloudStorageConfig.TextConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a TextConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.CloudStorageConfig.TextConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.CloudStorageConfig.TextConfig} TextConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TextConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TextConfig message. - * @function verify - * @memberof google.pubsub.v1.CloudStorageConfig.TextConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TextConfig.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - return null; - }; - - /** - * Creates a TextConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.CloudStorageConfig.TextConfig - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.CloudStorageConfig.TextConfig} TextConfig - */ - TextConfig.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.CloudStorageConfig.TextConfig) - return object; - return new $root.google.pubsub.v1.CloudStorageConfig.TextConfig(); - }; - - /** - * Creates a plain object from a TextConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.CloudStorageConfig.TextConfig - * @static - * @param {google.pubsub.v1.CloudStorageConfig.TextConfig} message TextConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TextConfig.toObject = function toObject() { - return {}; - }; - - /** - * Converts this TextConfig to JSON. - * @function toJSON - * @memberof google.pubsub.v1.CloudStorageConfig.TextConfig - * @instance - * @returns {Object.} JSON object - */ - TextConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TextConfig - * @function getTypeUrl - * @memberof google.pubsub.v1.CloudStorageConfig.TextConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TextConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.CloudStorageConfig.TextConfig"; - }; - - return TextConfig; - })(); - - CloudStorageConfig.AvroConfig = (function() { - - /** - * Properties of an AvroConfig. - * @memberof google.pubsub.v1.CloudStorageConfig - * @interface IAvroConfig - * @property {boolean|null} [writeMetadata] AvroConfig writeMetadata - * @property {boolean|null} [useTopicSchema] AvroConfig useTopicSchema - */ - - /** - * Constructs a new AvroConfig. - * @memberof google.pubsub.v1.CloudStorageConfig - * @classdesc Represents an AvroConfig. - * @implements IAvroConfig - * @constructor - * @param {google.pubsub.v1.CloudStorageConfig.IAvroConfig=} [properties] Properties to set - */ - function AvroConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * AvroConfig writeMetadata. - * @member {boolean} writeMetadata - * @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig - * @instance - */ - AvroConfig.prototype.writeMetadata = false; - - /** - * AvroConfig useTopicSchema. - * @member {boolean} useTopicSchema - * @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig - * @instance - */ - AvroConfig.prototype.useTopicSchema = false; - - /** - * Creates a new AvroConfig instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig - * @static - * @param {google.pubsub.v1.CloudStorageConfig.IAvroConfig=} [properties] Properties to set - * @returns {google.pubsub.v1.CloudStorageConfig.AvroConfig} AvroConfig instance - */ - AvroConfig.create = function create(properties) { - return new AvroConfig(properties); - }; - - /** - * Encodes the specified AvroConfig message. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.AvroConfig.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig - * @static - * @param {google.pubsub.v1.CloudStorageConfig.IAvroConfig} message AvroConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AvroConfig.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.writeMetadata != null && Object.hasOwnProperty.call(message, "writeMetadata")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.writeMetadata); - if (message.useTopicSchema != null && Object.hasOwnProperty.call(message, "useTopicSchema")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.useTopicSchema); - return writer; - }; - - /** - * Encodes the specified AvroConfig message, length delimited. Does not implicitly {@link google.pubsub.v1.CloudStorageConfig.AvroConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig - * @static - * @param {google.pubsub.v1.CloudStorageConfig.IAvroConfig} message AvroConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AvroConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an AvroConfig message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.CloudStorageConfig.AvroConfig} AvroConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AvroConfig.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.CloudStorageConfig.AvroConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.writeMetadata = reader.bool(); - break; - } - case 2: { - message.useTopicSchema = reader.bool(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an AvroConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.CloudStorageConfig.AvroConfig} AvroConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AvroConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AvroConfig message. - * @function verify - * @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AvroConfig.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.writeMetadata != null && Object.hasOwnProperty.call(message, "writeMetadata")) - if (typeof message.writeMetadata !== "boolean") - return "writeMetadata: boolean expected"; - if (message.useTopicSchema != null && Object.hasOwnProperty.call(message, "useTopicSchema")) - if (typeof message.useTopicSchema !== "boolean") - return "useTopicSchema: boolean expected"; - return null; - }; - - /** - * Creates an AvroConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.CloudStorageConfig.AvroConfig} AvroConfig - */ - AvroConfig.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.CloudStorageConfig.AvroConfig) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.CloudStorageConfig.AvroConfig: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.CloudStorageConfig.AvroConfig(); - if (object.writeMetadata != null) - message.writeMetadata = Boolean(object.writeMetadata); - if (object.useTopicSchema != null) - message.useTopicSchema = Boolean(object.useTopicSchema); - return message; - }; - - /** - * Creates a plain object from an AvroConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig - * @static - * @param {google.pubsub.v1.CloudStorageConfig.AvroConfig} message AvroConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AvroConfig.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.writeMetadata = false; - object.useTopicSchema = false; - } - if (message.writeMetadata != null && Object.hasOwnProperty.call(message, "writeMetadata")) - object.writeMetadata = message.writeMetadata; - if (message.useTopicSchema != null && Object.hasOwnProperty.call(message, "useTopicSchema")) - object.useTopicSchema = message.useTopicSchema; - return object; - }; - - /** - * Converts this AvroConfig to JSON. - * @function toJSON - * @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig - * @instance - * @returns {Object.} JSON object - */ - AvroConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AvroConfig - * @function getTypeUrl - * @memberof google.pubsub.v1.CloudStorageConfig.AvroConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AvroConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.CloudStorageConfig.AvroConfig"; - }; - - return AvroConfig; - })(); - - /** - * State enum. - * @name google.pubsub.v1.CloudStorageConfig.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} PERMISSION_DENIED=2 PERMISSION_DENIED value - * @property {number} NOT_FOUND=3 NOT_FOUND value - * @property {number} IN_TRANSIT_LOCATION_RESTRICTION=4 IN_TRANSIT_LOCATION_RESTRICTION value - * @property {number} SCHEMA_MISMATCH=5 SCHEMA_MISMATCH value - * @property {number} VERTEX_AI_LOCATION_RESTRICTION=6 VERTEX_AI_LOCATION_RESTRICTION value - */ - CloudStorageConfig.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "PERMISSION_DENIED"] = 2; - values[valuesById[3] = "NOT_FOUND"] = 3; - values[valuesById[4] = "IN_TRANSIT_LOCATION_RESTRICTION"] = 4; - values[valuesById[5] = "SCHEMA_MISMATCH"] = 5; - values[valuesById[6] = "VERTEX_AI_LOCATION_RESTRICTION"] = 6; - return values; - })(); - - return CloudStorageConfig; - })(); - - v1.ReceivedMessage = (function() { - - /** - * Properties of a ReceivedMessage. - * @memberof google.pubsub.v1 - * @interface IReceivedMessage - * @property {string|null} [ackId] ReceivedMessage ackId - * @property {google.pubsub.v1.IPubsubMessage|null} [message] ReceivedMessage message - * @property {number|null} [deliveryAttempt] ReceivedMessage deliveryAttempt - */ - - /** - * Constructs a new ReceivedMessage. - * @memberof google.pubsub.v1 - * @classdesc Represents a ReceivedMessage. - * @implements IReceivedMessage - * @constructor - * @param {google.pubsub.v1.IReceivedMessage=} [properties] Properties to set - */ - function ReceivedMessage(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReceivedMessage ackId. - * @member {string} ackId - * @memberof google.pubsub.v1.ReceivedMessage - * @instance - */ - ReceivedMessage.prototype.ackId = ""; - - /** - * ReceivedMessage message. - * @member {google.pubsub.v1.IPubsubMessage|null|undefined} message - * @memberof google.pubsub.v1.ReceivedMessage - * @instance - */ - ReceivedMessage.prototype.message = null; - - /** - * ReceivedMessage deliveryAttempt. - * @member {number} deliveryAttempt - * @memberof google.pubsub.v1.ReceivedMessage - * @instance - */ - ReceivedMessage.prototype.deliveryAttempt = 0; - - /** - * Creates a new ReceivedMessage instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ReceivedMessage - * @static - * @param {google.pubsub.v1.IReceivedMessage=} [properties] Properties to set - * @returns {google.pubsub.v1.ReceivedMessage} ReceivedMessage instance - */ - ReceivedMessage.create = function create(properties) { - return new ReceivedMessage(properties); - }; - - /** - * Encodes the specified ReceivedMessage message. Does not implicitly {@link google.pubsub.v1.ReceivedMessage.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ReceivedMessage - * @static - * @param {google.pubsub.v1.IReceivedMessage} message ReceivedMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReceivedMessage.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.ackId != null && Object.hasOwnProperty.call(message, "ackId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ackId); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - $root.google.pubsub.v1.PubsubMessage.encode(message.message, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - if (message.deliveryAttempt != null && Object.hasOwnProperty.call(message, "deliveryAttempt")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.deliveryAttempt); - return writer; - }; - - /** - * Encodes the specified ReceivedMessage message, length delimited. Does not implicitly {@link google.pubsub.v1.ReceivedMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ReceivedMessage - * @static - * @param {google.pubsub.v1.IReceivedMessage} message ReceivedMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReceivedMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ReceivedMessage message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ReceivedMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ReceivedMessage} ReceivedMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReceivedMessage.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ReceivedMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.ackId = reader.string(); - break; - } - case 2: { - message.message = $root.google.pubsub.v1.PubsubMessage.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 3: { - message.deliveryAttempt = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ReceivedMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ReceivedMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ReceivedMessage} ReceivedMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReceivedMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReceivedMessage message. - * @function verify - * @memberof google.pubsub.v1.ReceivedMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReceivedMessage.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.ackId != null && Object.hasOwnProperty.call(message, "ackId")) - if (!$util.isString(message.ackId)) - return "ackId: string expected"; - if (message.message != null && Object.hasOwnProperty.call(message, "message")) { - var error = $root.google.pubsub.v1.PubsubMessage.verify(message.message, long + 1); - if (error) - return "message." + error; - } - if (message.deliveryAttempt != null && Object.hasOwnProperty.call(message, "deliveryAttempt")) - if (!$util.isInteger(message.deliveryAttempt)) - return "deliveryAttempt: integer expected"; - return null; - }; - - /** - * Creates a ReceivedMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ReceivedMessage - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ReceivedMessage} ReceivedMessage - */ - ReceivedMessage.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ReceivedMessage) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ReceivedMessage: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ReceivedMessage(); - if (object.ackId != null) - message.ackId = String(object.ackId); - if (object.message != null) { - if (!$util.isObject(object.message)) - throw TypeError(".google.pubsub.v1.ReceivedMessage.message: object expected"); - message.message = $root.google.pubsub.v1.PubsubMessage.fromObject(object.message, long + 1); - } - if (object.deliveryAttempt != null) - message.deliveryAttempt = object.deliveryAttempt | 0; - return message; - }; - - /** - * Creates a plain object from a ReceivedMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ReceivedMessage - * @static - * @param {google.pubsub.v1.ReceivedMessage} message ReceivedMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReceivedMessage.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.ackId = ""; - object.message = null; - object.deliveryAttempt = 0; - } - if (message.ackId != null && Object.hasOwnProperty.call(message, "ackId")) - object.ackId = message.ackId; - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - object.message = $root.google.pubsub.v1.PubsubMessage.toObject(message.message, options, q + 1); - if (message.deliveryAttempt != null && Object.hasOwnProperty.call(message, "deliveryAttempt")) - object.deliveryAttempt = message.deliveryAttempt; - return object; - }; - - /** - * Converts this ReceivedMessage to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ReceivedMessage - * @instance - * @returns {Object.} JSON object - */ - ReceivedMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReceivedMessage - * @function getTypeUrl - * @memberof google.pubsub.v1.ReceivedMessage - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReceivedMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ReceivedMessage"; - }; - - return ReceivedMessage; - })(); - - v1.GetSubscriptionRequest = (function() { - - /** - * Properties of a GetSubscriptionRequest. - * @memberof google.pubsub.v1 - * @interface IGetSubscriptionRequest - * @property {string|null} [subscription] GetSubscriptionRequest subscription - */ - - /** - * Constructs a new GetSubscriptionRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a GetSubscriptionRequest. - * @implements IGetSubscriptionRequest - * @constructor - * @param {google.pubsub.v1.IGetSubscriptionRequest=} [properties] Properties to set - */ - function GetSubscriptionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetSubscriptionRequest subscription. - * @member {string} subscription - * @memberof google.pubsub.v1.GetSubscriptionRequest - * @instance - */ - GetSubscriptionRequest.prototype.subscription = ""; - - /** - * Creates a new GetSubscriptionRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.GetSubscriptionRequest - * @static - * @param {google.pubsub.v1.IGetSubscriptionRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.GetSubscriptionRequest} GetSubscriptionRequest instance - */ - GetSubscriptionRequest.create = function create(properties) { - return new GetSubscriptionRequest(properties); - }; - - /** - * Encodes the specified GetSubscriptionRequest message. Does not implicitly {@link google.pubsub.v1.GetSubscriptionRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.GetSubscriptionRequest - * @static - * @param {google.pubsub.v1.IGetSubscriptionRequest} message GetSubscriptionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSubscriptionRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subscription); - return writer; - }; - - /** - * Encodes the specified GetSubscriptionRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.GetSubscriptionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.GetSubscriptionRequest - * @static - * @param {google.pubsub.v1.IGetSubscriptionRequest} message GetSubscriptionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSubscriptionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a GetSubscriptionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.GetSubscriptionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.GetSubscriptionRequest} GetSubscriptionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSubscriptionRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.GetSubscriptionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.subscription = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a GetSubscriptionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.GetSubscriptionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.GetSubscriptionRequest} GetSubscriptionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSubscriptionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSubscriptionRequest message. - * @function verify - * @memberof google.pubsub.v1.GetSubscriptionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSubscriptionRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - if (!$util.isString(message.subscription)) - return "subscription: string expected"; - return null; - }; - - /** - * Creates a GetSubscriptionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.GetSubscriptionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.GetSubscriptionRequest} GetSubscriptionRequest - */ - GetSubscriptionRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.GetSubscriptionRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.GetSubscriptionRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.GetSubscriptionRequest(); - if (object.subscription != null) - message.subscription = String(object.subscription); - return message; - }; - - /** - * Creates a plain object from a GetSubscriptionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.GetSubscriptionRequest - * @static - * @param {google.pubsub.v1.GetSubscriptionRequest} message GetSubscriptionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSubscriptionRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.subscription = ""; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - object.subscription = message.subscription; - return object; - }; - - /** - * Converts this GetSubscriptionRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.GetSubscriptionRequest - * @instance - * @returns {Object.} JSON object - */ - GetSubscriptionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetSubscriptionRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.GetSubscriptionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetSubscriptionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.GetSubscriptionRequest"; - }; - - return GetSubscriptionRequest; - })(); - - v1.UpdateSubscriptionRequest = (function() { - - /** - * Properties of an UpdateSubscriptionRequest. - * @memberof google.pubsub.v1 - * @interface IUpdateSubscriptionRequest - * @property {google.pubsub.v1.ISubscription|null} [subscription] UpdateSubscriptionRequest subscription - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSubscriptionRequest updateMask - */ - - /** - * Constructs a new UpdateSubscriptionRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents an UpdateSubscriptionRequest. - * @implements IUpdateSubscriptionRequest - * @constructor - * @param {google.pubsub.v1.IUpdateSubscriptionRequest=} [properties] Properties to set - */ - function UpdateSubscriptionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateSubscriptionRequest subscription. - * @member {google.pubsub.v1.ISubscription|null|undefined} subscription - * @memberof google.pubsub.v1.UpdateSubscriptionRequest - * @instance - */ - UpdateSubscriptionRequest.prototype.subscription = null; - - /** - * UpdateSubscriptionRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.pubsub.v1.UpdateSubscriptionRequest - * @instance - */ - UpdateSubscriptionRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateSubscriptionRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.UpdateSubscriptionRequest - * @static - * @param {google.pubsub.v1.IUpdateSubscriptionRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.UpdateSubscriptionRequest} UpdateSubscriptionRequest instance - */ - UpdateSubscriptionRequest.create = function create(properties) { - return new UpdateSubscriptionRequest(properties); - }; - - /** - * Encodes the specified UpdateSubscriptionRequest message. Does not implicitly {@link google.pubsub.v1.UpdateSubscriptionRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.UpdateSubscriptionRequest - * @static - * @param {google.pubsub.v1.IUpdateSubscriptionRequest} message UpdateSubscriptionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSubscriptionRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - $root.google.pubsub.v1.Subscription.encode(message.subscription, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateSubscriptionRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.UpdateSubscriptionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.UpdateSubscriptionRequest - * @static - * @param {google.pubsub.v1.IUpdateSubscriptionRequest} message UpdateSubscriptionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSubscriptionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an UpdateSubscriptionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.UpdateSubscriptionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.UpdateSubscriptionRequest} UpdateSubscriptionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSubscriptionRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.UpdateSubscriptionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.subscription = $root.google.pubsub.v1.Subscription.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateSubscriptionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.UpdateSubscriptionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.UpdateSubscriptionRequest} UpdateSubscriptionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSubscriptionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateSubscriptionRequest message. - * @function verify - * @memberof google.pubsub.v1.UpdateSubscriptionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateSubscriptionRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) { - var error = $root.google.pubsub.v1.Subscription.verify(message.subscription, long + 1); - if (error) - return "subscription." + error; - } - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates an UpdateSubscriptionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.UpdateSubscriptionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.UpdateSubscriptionRequest} UpdateSubscriptionRequest - */ - UpdateSubscriptionRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.UpdateSubscriptionRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.UpdateSubscriptionRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.UpdateSubscriptionRequest(); - if (object.subscription != null) { - if (!$util.isObject(object.subscription)) - throw TypeError(".google.pubsub.v1.UpdateSubscriptionRequest.subscription: object expected"); - message.subscription = $root.google.pubsub.v1.Subscription.fromObject(object.subscription, long + 1); - } - if (object.updateMask != null) { - if (!$util.isObject(object.updateMask)) - throw TypeError(".google.pubsub.v1.UpdateSubscriptionRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); - } - return message; - }; - - /** - * Creates a plain object from an UpdateSubscriptionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.UpdateSubscriptionRequest - * @static - * @param {google.pubsub.v1.UpdateSubscriptionRequest} message UpdateSubscriptionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateSubscriptionRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.subscription = null; - object.updateMask = null; - } - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - object.subscription = $root.google.pubsub.v1.Subscription.toObject(message.subscription, options, q + 1); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); - return object; - }; - - /** - * Converts this UpdateSubscriptionRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.UpdateSubscriptionRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateSubscriptionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateSubscriptionRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.UpdateSubscriptionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateSubscriptionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.UpdateSubscriptionRequest"; - }; - - return UpdateSubscriptionRequest; - })(); - - v1.ListSubscriptionsRequest = (function() { - - /** - * Properties of a ListSubscriptionsRequest. - * @memberof google.pubsub.v1 - * @interface IListSubscriptionsRequest - * @property {string|null} [project] ListSubscriptionsRequest project - * @property {number|null} [pageSize] ListSubscriptionsRequest pageSize - * @property {string|null} [pageToken] ListSubscriptionsRequest pageToken - */ - - /** - * Constructs a new ListSubscriptionsRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a ListSubscriptionsRequest. - * @implements IListSubscriptionsRequest - * @constructor - * @param {google.pubsub.v1.IListSubscriptionsRequest=} [properties] Properties to set - */ - function ListSubscriptionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSubscriptionsRequest project. - * @member {string} project - * @memberof google.pubsub.v1.ListSubscriptionsRequest - * @instance - */ - ListSubscriptionsRequest.prototype.project = ""; - - /** - * ListSubscriptionsRequest pageSize. - * @member {number} pageSize - * @memberof google.pubsub.v1.ListSubscriptionsRequest - * @instance - */ - ListSubscriptionsRequest.prototype.pageSize = 0; - - /** - * ListSubscriptionsRequest pageToken. - * @member {string} pageToken - * @memberof google.pubsub.v1.ListSubscriptionsRequest - * @instance - */ - ListSubscriptionsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListSubscriptionsRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ListSubscriptionsRequest - * @static - * @param {google.pubsub.v1.IListSubscriptionsRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.ListSubscriptionsRequest} ListSubscriptionsRequest instance - */ - ListSubscriptionsRequest.create = function create(properties) { - return new ListSubscriptionsRequest(properties); - }; - - /** - * Encodes the specified ListSubscriptionsRequest message. Does not implicitly {@link google.pubsub.v1.ListSubscriptionsRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ListSubscriptionsRequest - * @static - * @param {google.pubsub.v1.IListSubscriptionsRequest} message ListSubscriptionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSubscriptionsRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListSubscriptionsRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSubscriptionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ListSubscriptionsRequest - * @static - * @param {google.pubsub.v1.IListSubscriptionsRequest} message ListSubscriptionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSubscriptionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ListSubscriptionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ListSubscriptionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ListSubscriptionsRequest} ListSubscriptionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSubscriptionsRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ListSubscriptionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.project = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ListSubscriptionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ListSubscriptionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ListSubscriptionsRequest} ListSubscriptionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSubscriptionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSubscriptionsRequest message. - * @function verify - * @memberof google.pubsub.v1.ListSubscriptionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSubscriptionsRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListSubscriptionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ListSubscriptionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ListSubscriptionsRequest} ListSubscriptionsRequest - */ - ListSubscriptionsRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ListSubscriptionsRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ListSubscriptionsRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ListSubscriptionsRequest(); - if (object.project != null) - message.project = String(object.project); - 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 ListSubscriptionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ListSubscriptionsRequest - * @static - * @param {google.pubsub.v1.ListSubscriptionsRequest} message ListSubscriptionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListSubscriptionsRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.project = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - object.project = message.project; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListSubscriptionsRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ListSubscriptionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListSubscriptionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListSubscriptionsRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.ListSubscriptionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListSubscriptionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ListSubscriptionsRequest"; - }; - - return ListSubscriptionsRequest; - })(); - - v1.ListSubscriptionsResponse = (function() { - - /** - * Properties of a ListSubscriptionsResponse. - * @memberof google.pubsub.v1 - * @interface IListSubscriptionsResponse - * @property {Array.|null} [subscriptions] ListSubscriptionsResponse subscriptions - * @property {string|null} [nextPageToken] ListSubscriptionsResponse nextPageToken - */ - - /** - * Constructs a new ListSubscriptionsResponse. - * @memberof google.pubsub.v1 - * @classdesc Represents a ListSubscriptionsResponse. - * @implements IListSubscriptionsResponse - * @constructor - * @param {google.pubsub.v1.IListSubscriptionsResponse=} [properties] Properties to set - */ - function ListSubscriptionsResponse(properties) { - this.subscriptions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSubscriptionsResponse subscriptions. - * @member {Array.} subscriptions - * @memberof google.pubsub.v1.ListSubscriptionsResponse - * @instance - */ - ListSubscriptionsResponse.prototype.subscriptions = $util.emptyArray; - - /** - * ListSubscriptionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.pubsub.v1.ListSubscriptionsResponse - * @instance - */ - ListSubscriptionsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListSubscriptionsResponse instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ListSubscriptionsResponse - * @static - * @param {google.pubsub.v1.IListSubscriptionsResponse=} [properties] Properties to set - * @returns {google.pubsub.v1.ListSubscriptionsResponse} ListSubscriptionsResponse instance - */ - ListSubscriptionsResponse.create = function create(properties) { - return new ListSubscriptionsResponse(properties); - }; - - /** - * Encodes the specified ListSubscriptionsResponse message. Does not implicitly {@link google.pubsub.v1.ListSubscriptionsResponse.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ListSubscriptionsResponse - * @static - * @param {google.pubsub.v1.IListSubscriptionsResponse} message ListSubscriptionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSubscriptionsResponse.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.subscriptions != null && message.subscriptions.length) - for (var i = 0; i < message.subscriptions.length; ++i) - $root.google.pubsub.v1.Subscription.encode(message.subscriptions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListSubscriptionsResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSubscriptionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ListSubscriptionsResponse - * @static - * @param {google.pubsub.v1.IListSubscriptionsResponse} message ListSubscriptionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSubscriptionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ListSubscriptionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ListSubscriptionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ListSubscriptionsResponse} ListSubscriptionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSubscriptionsResponse.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ListSubscriptionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.subscriptions && message.subscriptions.length)) - message.subscriptions = []; - message.subscriptions.push($root.google.pubsub.v1.Subscription.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ListSubscriptionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ListSubscriptionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ListSubscriptionsResponse} ListSubscriptionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSubscriptionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSubscriptionsResponse message. - * @function verify - * @memberof google.pubsub.v1.ListSubscriptionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSubscriptionsResponse.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.subscriptions != null && Object.hasOwnProperty.call(message, "subscriptions")) { - if (!Array.isArray(message.subscriptions)) - return "subscriptions: array expected"; - for (var i = 0; i < message.subscriptions.length; ++i) { - var error = $root.google.pubsub.v1.Subscription.verify(message.subscriptions[i], long + 1); - if (error) - return "subscriptions." + error; - } - } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListSubscriptionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ListSubscriptionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ListSubscriptionsResponse} ListSubscriptionsResponse - */ - ListSubscriptionsResponse.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ListSubscriptionsResponse) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ListSubscriptionsResponse: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ListSubscriptionsResponse(); - if (object.subscriptions) { - if (!Array.isArray(object.subscriptions)) - throw TypeError(".google.pubsub.v1.ListSubscriptionsResponse.subscriptions: array expected"); - message.subscriptions = []; - for (var i = 0; i < object.subscriptions.length; ++i) { - if (!$util.isObject(object.subscriptions[i])) - throw TypeError(".google.pubsub.v1.ListSubscriptionsResponse.subscriptions: object expected"); - message.subscriptions[i] = $root.google.pubsub.v1.Subscription.fromObject(object.subscriptions[i], long + 1); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListSubscriptionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ListSubscriptionsResponse - * @static - * @param {google.pubsub.v1.ListSubscriptionsResponse} message ListSubscriptionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListSubscriptionsResponse.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.subscriptions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.subscriptions && message.subscriptions.length) { - object.subscriptions = []; - for (var j = 0; j < message.subscriptions.length; ++j) - object.subscriptions[j] = $root.google.pubsub.v1.Subscription.toObject(message.subscriptions[j], options, q + 1); - } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListSubscriptionsResponse to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ListSubscriptionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListSubscriptionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListSubscriptionsResponse - * @function getTypeUrl - * @memberof google.pubsub.v1.ListSubscriptionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListSubscriptionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ListSubscriptionsResponse"; - }; - - return ListSubscriptionsResponse; - })(); - - v1.DeleteSubscriptionRequest = (function() { - - /** - * Properties of a DeleteSubscriptionRequest. - * @memberof google.pubsub.v1 - * @interface IDeleteSubscriptionRequest - * @property {string|null} [subscription] DeleteSubscriptionRequest subscription - */ - - /** - * Constructs a new DeleteSubscriptionRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a DeleteSubscriptionRequest. - * @implements IDeleteSubscriptionRequest - * @constructor - * @param {google.pubsub.v1.IDeleteSubscriptionRequest=} [properties] Properties to set - */ - function DeleteSubscriptionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteSubscriptionRequest subscription. - * @member {string} subscription - * @memberof google.pubsub.v1.DeleteSubscriptionRequest - * @instance - */ - DeleteSubscriptionRequest.prototype.subscription = ""; - - /** - * Creates a new DeleteSubscriptionRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.DeleteSubscriptionRequest - * @static - * @param {google.pubsub.v1.IDeleteSubscriptionRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.DeleteSubscriptionRequest} DeleteSubscriptionRequest instance - */ - DeleteSubscriptionRequest.create = function create(properties) { - return new DeleteSubscriptionRequest(properties); - }; - - /** - * Encodes the specified DeleteSubscriptionRequest message. Does not implicitly {@link google.pubsub.v1.DeleteSubscriptionRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.DeleteSubscriptionRequest - * @static - * @param {google.pubsub.v1.IDeleteSubscriptionRequest} message DeleteSubscriptionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSubscriptionRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subscription); - return writer; - }; - - /** - * Encodes the specified DeleteSubscriptionRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.DeleteSubscriptionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.DeleteSubscriptionRequest - * @static - * @param {google.pubsub.v1.IDeleteSubscriptionRequest} message DeleteSubscriptionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSubscriptionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a DeleteSubscriptionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.DeleteSubscriptionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.DeleteSubscriptionRequest} DeleteSubscriptionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSubscriptionRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.DeleteSubscriptionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.subscription = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteSubscriptionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.DeleteSubscriptionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.DeleteSubscriptionRequest} DeleteSubscriptionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSubscriptionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteSubscriptionRequest message. - * @function verify - * @memberof google.pubsub.v1.DeleteSubscriptionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteSubscriptionRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - if (!$util.isString(message.subscription)) - return "subscription: string expected"; - return null; - }; - - /** - * Creates a DeleteSubscriptionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.DeleteSubscriptionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.DeleteSubscriptionRequest} DeleteSubscriptionRequest - */ - DeleteSubscriptionRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.DeleteSubscriptionRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.DeleteSubscriptionRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.DeleteSubscriptionRequest(); - if (object.subscription != null) - message.subscription = String(object.subscription); - return message; - }; - - /** - * Creates a plain object from a DeleteSubscriptionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.DeleteSubscriptionRequest - * @static - * @param {google.pubsub.v1.DeleteSubscriptionRequest} message DeleteSubscriptionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteSubscriptionRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.subscription = ""; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - object.subscription = message.subscription; - return object; - }; - - /** - * Converts this DeleteSubscriptionRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.DeleteSubscriptionRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteSubscriptionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteSubscriptionRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.DeleteSubscriptionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteSubscriptionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.DeleteSubscriptionRequest"; - }; - - return DeleteSubscriptionRequest; - })(); - - v1.ModifyPushConfigRequest = (function() { - - /** - * Properties of a ModifyPushConfigRequest. - * @memberof google.pubsub.v1 - * @interface IModifyPushConfigRequest - * @property {string|null} [subscription] ModifyPushConfigRequest subscription - * @property {google.pubsub.v1.IPushConfig|null} [pushConfig] ModifyPushConfigRequest pushConfig - */ - - /** - * Constructs a new ModifyPushConfigRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a ModifyPushConfigRequest. - * @implements IModifyPushConfigRequest - * @constructor - * @param {google.pubsub.v1.IModifyPushConfigRequest=} [properties] Properties to set - */ - function ModifyPushConfigRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ModifyPushConfigRequest subscription. - * @member {string} subscription - * @memberof google.pubsub.v1.ModifyPushConfigRequest - * @instance - */ - ModifyPushConfigRequest.prototype.subscription = ""; - - /** - * ModifyPushConfigRequest pushConfig. - * @member {google.pubsub.v1.IPushConfig|null|undefined} pushConfig - * @memberof google.pubsub.v1.ModifyPushConfigRequest - * @instance - */ - ModifyPushConfigRequest.prototype.pushConfig = null; - - /** - * Creates a new ModifyPushConfigRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ModifyPushConfigRequest - * @static - * @param {google.pubsub.v1.IModifyPushConfigRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.ModifyPushConfigRequest} ModifyPushConfigRequest instance - */ - ModifyPushConfigRequest.create = function create(properties) { - return new ModifyPushConfigRequest(properties); - }; - - /** - * Encodes the specified ModifyPushConfigRequest message. Does not implicitly {@link google.pubsub.v1.ModifyPushConfigRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ModifyPushConfigRequest - * @static - * @param {google.pubsub.v1.IModifyPushConfigRequest} message ModifyPushConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModifyPushConfigRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subscription); - if (message.pushConfig != null && Object.hasOwnProperty.call(message, "pushConfig")) - $root.google.pubsub.v1.PushConfig.encode(message.pushConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified ModifyPushConfigRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ModifyPushConfigRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ModifyPushConfigRequest - * @static - * @param {google.pubsub.v1.IModifyPushConfigRequest} message ModifyPushConfigRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModifyPushConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ModifyPushConfigRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ModifyPushConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ModifyPushConfigRequest} ModifyPushConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModifyPushConfigRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ModifyPushConfigRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.subscription = reader.string(); - break; - } - case 2: { - message.pushConfig = $root.google.pubsub.v1.PushConfig.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ModifyPushConfigRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ModifyPushConfigRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ModifyPushConfigRequest} ModifyPushConfigRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModifyPushConfigRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModifyPushConfigRequest message. - * @function verify - * @memberof google.pubsub.v1.ModifyPushConfigRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModifyPushConfigRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - if (!$util.isString(message.subscription)) - return "subscription: string expected"; - if (message.pushConfig != null && Object.hasOwnProperty.call(message, "pushConfig")) { - var error = $root.google.pubsub.v1.PushConfig.verify(message.pushConfig, long + 1); - if (error) - return "pushConfig." + error; - } - return null; - }; - - /** - * Creates a ModifyPushConfigRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ModifyPushConfigRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ModifyPushConfigRequest} ModifyPushConfigRequest - */ - ModifyPushConfigRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ModifyPushConfigRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ModifyPushConfigRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ModifyPushConfigRequest(); - if (object.subscription != null) - message.subscription = String(object.subscription); - if (object.pushConfig != null) { - if (!$util.isObject(object.pushConfig)) - throw TypeError(".google.pubsub.v1.ModifyPushConfigRequest.pushConfig: object expected"); - message.pushConfig = $root.google.pubsub.v1.PushConfig.fromObject(object.pushConfig, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a ModifyPushConfigRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ModifyPushConfigRequest - * @static - * @param {google.pubsub.v1.ModifyPushConfigRequest} message ModifyPushConfigRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModifyPushConfigRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.subscription = ""; - object.pushConfig = null; - } - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - object.subscription = message.subscription; - if (message.pushConfig != null && Object.hasOwnProperty.call(message, "pushConfig")) - object.pushConfig = $root.google.pubsub.v1.PushConfig.toObject(message.pushConfig, options, q + 1); - return object; - }; - - /** - * Converts this ModifyPushConfigRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ModifyPushConfigRequest - * @instance - * @returns {Object.} JSON object - */ - ModifyPushConfigRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ModifyPushConfigRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.ModifyPushConfigRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ModifyPushConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ModifyPushConfigRequest"; - }; - - return ModifyPushConfigRequest; - })(); - - v1.PullRequest = (function() { - - /** - * Properties of a PullRequest. - * @memberof google.pubsub.v1 - * @interface IPullRequest - * @property {string|null} [subscription] PullRequest subscription - * @property {boolean|null} [returnImmediately] PullRequest returnImmediately - * @property {number|null} [maxMessages] PullRequest maxMessages - */ - - /** - * Constructs a new PullRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a PullRequest. - * @implements IPullRequest - * @constructor - * @param {google.pubsub.v1.IPullRequest=} [properties] Properties to set - */ - function PullRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * PullRequest subscription. - * @member {string} subscription - * @memberof google.pubsub.v1.PullRequest - * @instance - */ - PullRequest.prototype.subscription = ""; - - /** - * PullRequest returnImmediately. - * @member {boolean} returnImmediately - * @memberof google.pubsub.v1.PullRequest - * @instance - */ - PullRequest.prototype.returnImmediately = false; - - /** - * PullRequest maxMessages. - * @member {number} maxMessages - * @memberof google.pubsub.v1.PullRequest - * @instance - */ - PullRequest.prototype.maxMessages = 0; - - /** - * Creates a new PullRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.PullRequest - * @static - * @param {google.pubsub.v1.IPullRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.PullRequest} PullRequest instance - */ - PullRequest.create = function create(properties) { - return new PullRequest(properties); - }; - - /** - * Encodes the specified PullRequest message. Does not implicitly {@link google.pubsub.v1.PullRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.PullRequest - * @static - * @param {google.pubsub.v1.IPullRequest} message PullRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PullRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subscription); - if (message.returnImmediately != null && Object.hasOwnProperty.call(message, "returnImmediately")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.returnImmediately); - if (message.maxMessages != null && Object.hasOwnProperty.call(message, "maxMessages")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.maxMessages); - return writer; - }; - - /** - * Encodes the specified PullRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.PullRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.PullRequest - * @static - * @param {google.pubsub.v1.IPullRequest} message PullRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PullRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a PullRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.PullRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.PullRequest} PullRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PullRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.PullRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.subscription = reader.string(); - break; - } - case 2: { - message.returnImmediately = reader.bool(); - break; - } - case 3: { - message.maxMessages = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a PullRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.PullRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.PullRequest} PullRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PullRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PullRequest message. - * @function verify - * @memberof google.pubsub.v1.PullRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PullRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - if (!$util.isString(message.subscription)) - return "subscription: string expected"; - if (message.returnImmediately != null && Object.hasOwnProperty.call(message, "returnImmediately")) - if (typeof message.returnImmediately !== "boolean") - return "returnImmediately: boolean expected"; - if (message.maxMessages != null && Object.hasOwnProperty.call(message, "maxMessages")) - if (!$util.isInteger(message.maxMessages)) - return "maxMessages: integer expected"; - return null; - }; - - /** - * Creates a PullRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.PullRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.PullRequest} PullRequest - */ - PullRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.PullRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.PullRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.PullRequest(); - if (object.subscription != null) - message.subscription = String(object.subscription); - if (object.returnImmediately != null) - message.returnImmediately = Boolean(object.returnImmediately); - if (object.maxMessages != null) - message.maxMessages = object.maxMessages | 0; - return message; - }; - - /** - * Creates a plain object from a PullRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.PullRequest - * @static - * @param {google.pubsub.v1.PullRequest} message PullRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PullRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.subscription = ""; - object.returnImmediately = false; - object.maxMessages = 0; - } - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - object.subscription = message.subscription; - if (message.returnImmediately != null && Object.hasOwnProperty.call(message, "returnImmediately")) - object.returnImmediately = message.returnImmediately; - if (message.maxMessages != null && Object.hasOwnProperty.call(message, "maxMessages")) - object.maxMessages = message.maxMessages; - return object; - }; - - /** - * Converts this PullRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.PullRequest - * @instance - * @returns {Object.} JSON object - */ - PullRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PullRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.PullRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PullRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.PullRequest"; - }; - - return PullRequest; - })(); - - v1.PullResponse = (function() { - - /** - * Properties of a PullResponse. - * @memberof google.pubsub.v1 - * @interface IPullResponse - * @property {Array.|null} [receivedMessages] PullResponse receivedMessages - */ - - /** - * Constructs a new PullResponse. - * @memberof google.pubsub.v1 - * @classdesc Represents a PullResponse. - * @implements IPullResponse - * @constructor - * @param {google.pubsub.v1.IPullResponse=} [properties] Properties to set - */ - function PullResponse(properties) { - this.receivedMessages = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * PullResponse receivedMessages. - * @member {Array.} receivedMessages - * @memberof google.pubsub.v1.PullResponse - * @instance - */ - PullResponse.prototype.receivedMessages = $util.emptyArray; - - /** - * Creates a new PullResponse instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.PullResponse - * @static - * @param {google.pubsub.v1.IPullResponse=} [properties] Properties to set - * @returns {google.pubsub.v1.PullResponse} PullResponse instance - */ - PullResponse.create = function create(properties) { - return new PullResponse(properties); - }; - - /** - * Encodes the specified PullResponse message. Does not implicitly {@link google.pubsub.v1.PullResponse.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.PullResponse - * @static - * @param {google.pubsub.v1.IPullResponse} message PullResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PullResponse.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.receivedMessages != null && message.receivedMessages.length) - for (var i = 0; i < message.receivedMessages.length; ++i) - $root.google.pubsub.v1.ReceivedMessage.encode(message.receivedMessages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified PullResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.PullResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.PullResponse - * @static - * @param {google.pubsub.v1.IPullResponse} message PullResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PullResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a PullResponse message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.PullResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.PullResponse} PullResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PullResponse.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.PullResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.receivedMessages && message.receivedMessages.length)) - message.receivedMessages = []; - message.receivedMessages.push($root.google.pubsub.v1.ReceivedMessage.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a PullResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.PullResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.PullResponse} PullResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PullResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PullResponse message. - * @function verify - * @memberof google.pubsub.v1.PullResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PullResponse.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.receivedMessages != null && Object.hasOwnProperty.call(message, "receivedMessages")) { - if (!Array.isArray(message.receivedMessages)) - return "receivedMessages: array expected"; - for (var i = 0; i < message.receivedMessages.length; ++i) { - var error = $root.google.pubsub.v1.ReceivedMessage.verify(message.receivedMessages[i], long + 1); - if (error) - return "receivedMessages." + error; - } - } - return null; - }; - - /** - * Creates a PullResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.PullResponse - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.PullResponse} PullResponse - */ - PullResponse.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.PullResponse) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.PullResponse: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.PullResponse(); - if (object.receivedMessages) { - if (!Array.isArray(object.receivedMessages)) - throw TypeError(".google.pubsub.v1.PullResponse.receivedMessages: array expected"); - message.receivedMessages = []; - for (var i = 0; i < object.receivedMessages.length; ++i) { - if (!$util.isObject(object.receivedMessages[i])) - throw TypeError(".google.pubsub.v1.PullResponse.receivedMessages: object expected"); - message.receivedMessages[i] = $root.google.pubsub.v1.ReceivedMessage.fromObject(object.receivedMessages[i], long + 1); - } - } - return message; - }; - - /** - * Creates a plain object from a PullResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.PullResponse - * @static - * @param {google.pubsub.v1.PullResponse} message PullResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PullResponse.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.receivedMessages = []; - if (message.receivedMessages && message.receivedMessages.length) { - object.receivedMessages = []; - for (var j = 0; j < message.receivedMessages.length; ++j) - object.receivedMessages[j] = $root.google.pubsub.v1.ReceivedMessage.toObject(message.receivedMessages[j], options, q + 1); - } - return object; - }; - - /** - * Converts this PullResponse to JSON. - * @function toJSON - * @memberof google.pubsub.v1.PullResponse - * @instance - * @returns {Object.} JSON object - */ - PullResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PullResponse - * @function getTypeUrl - * @memberof google.pubsub.v1.PullResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PullResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.PullResponse"; - }; - - return PullResponse; - })(); - - v1.ModifyAckDeadlineRequest = (function() { - - /** - * Properties of a ModifyAckDeadlineRequest. - * @memberof google.pubsub.v1 - * @interface IModifyAckDeadlineRequest - * @property {string|null} [subscription] ModifyAckDeadlineRequest subscription - * @property {Array.|null} [ackIds] ModifyAckDeadlineRequest ackIds - * @property {number|null} [ackDeadlineSeconds] ModifyAckDeadlineRequest ackDeadlineSeconds - */ - - /** - * Constructs a new ModifyAckDeadlineRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a ModifyAckDeadlineRequest. - * @implements IModifyAckDeadlineRequest - * @constructor - * @param {google.pubsub.v1.IModifyAckDeadlineRequest=} [properties] Properties to set - */ - function ModifyAckDeadlineRequest(properties) { - this.ackIds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ModifyAckDeadlineRequest subscription. - * @member {string} subscription - * @memberof google.pubsub.v1.ModifyAckDeadlineRequest - * @instance - */ - ModifyAckDeadlineRequest.prototype.subscription = ""; - - /** - * ModifyAckDeadlineRequest ackIds. - * @member {Array.} ackIds - * @memberof google.pubsub.v1.ModifyAckDeadlineRequest - * @instance - */ - ModifyAckDeadlineRequest.prototype.ackIds = $util.emptyArray; - - /** - * ModifyAckDeadlineRequest ackDeadlineSeconds. - * @member {number} ackDeadlineSeconds - * @memberof google.pubsub.v1.ModifyAckDeadlineRequest - * @instance - */ - ModifyAckDeadlineRequest.prototype.ackDeadlineSeconds = 0; - - /** - * Creates a new ModifyAckDeadlineRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ModifyAckDeadlineRequest - * @static - * @param {google.pubsub.v1.IModifyAckDeadlineRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.ModifyAckDeadlineRequest} ModifyAckDeadlineRequest instance - */ - ModifyAckDeadlineRequest.create = function create(properties) { - return new ModifyAckDeadlineRequest(properties); - }; - - /** - * Encodes the specified ModifyAckDeadlineRequest message. Does not implicitly {@link google.pubsub.v1.ModifyAckDeadlineRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ModifyAckDeadlineRequest - * @static - * @param {google.pubsub.v1.IModifyAckDeadlineRequest} message ModifyAckDeadlineRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModifyAckDeadlineRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subscription); - if (message.ackDeadlineSeconds != null && Object.hasOwnProperty.call(message, "ackDeadlineSeconds")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.ackDeadlineSeconds); - if (message.ackIds != null && message.ackIds.length) - for (var i = 0; i < message.ackIds.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ackIds[i]); - return writer; - }; - - /** - * Encodes the specified ModifyAckDeadlineRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ModifyAckDeadlineRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ModifyAckDeadlineRequest - * @static - * @param {google.pubsub.v1.IModifyAckDeadlineRequest} message ModifyAckDeadlineRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModifyAckDeadlineRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ModifyAckDeadlineRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ModifyAckDeadlineRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ModifyAckDeadlineRequest} ModifyAckDeadlineRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModifyAckDeadlineRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ModifyAckDeadlineRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.subscription = reader.string(); - break; - } - case 4: { - if (!(message.ackIds && message.ackIds.length)) - message.ackIds = []; - message.ackIds.push(reader.string()); - break; - } - case 3: { - message.ackDeadlineSeconds = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ModifyAckDeadlineRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ModifyAckDeadlineRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ModifyAckDeadlineRequest} ModifyAckDeadlineRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModifyAckDeadlineRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModifyAckDeadlineRequest message. - * @function verify - * @memberof google.pubsub.v1.ModifyAckDeadlineRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModifyAckDeadlineRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - if (!$util.isString(message.subscription)) - return "subscription: string expected"; - if (message.ackIds != null && Object.hasOwnProperty.call(message, "ackIds")) { - if (!Array.isArray(message.ackIds)) - return "ackIds: array expected"; - for (var i = 0; i < message.ackIds.length; ++i) - if (!$util.isString(message.ackIds[i])) - return "ackIds: string[] expected"; - } - if (message.ackDeadlineSeconds != null && Object.hasOwnProperty.call(message, "ackDeadlineSeconds")) - if (!$util.isInteger(message.ackDeadlineSeconds)) - return "ackDeadlineSeconds: integer expected"; - return null; - }; - - /** - * Creates a ModifyAckDeadlineRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ModifyAckDeadlineRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ModifyAckDeadlineRequest} ModifyAckDeadlineRequest - */ - ModifyAckDeadlineRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ModifyAckDeadlineRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ModifyAckDeadlineRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ModifyAckDeadlineRequest(); - if (object.subscription != null) - message.subscription = String(object.subscription); - if (object.ackIds) { - if (!Array.isArray(object.ackIds)) - throw TypeError(".google.pubsub.v1.ModifyAckDeadlineRequest.ackIds: array expected"); - message.ackIds = []; - for (var i = 0; i < object.ackIds.length; ++i) - message.ackIds[i] = String(object.ackIds[i]); - } - if (object.ackDeadlineSeconds != null) - message.ackDeadlineSeconds = object.ackDeadlineSeconds | 0; - return message; - }; - - /** - * Creates a plain object from a ModifyAckDeadlineRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ModifyAckDeadlineRequest - * @static - * @param {google.pubsub.v1.ModifyAckDeadlineRequest} message ModifyAckDeadlineRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModifyAckDeadlineRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.ackIds = []; - if (options.defaults) { - object.subscription = ""; - object.ackDeadlineSeconds = 0; - } - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - object.subscription = message.subscription; - if (message.ackDeadlineSeconds != null && Object.hasOwnProperty.call(message, "ackDeadlineSeconds")) - object.ackDeadlineSeconds = message.ackDeadlineSeconds; - if (message.ackIds && message.ackIds.length) { - object.ackIds = []; - for (var j = 0; j < message.ackIds.length; ++j) - object.ackIds[j] = message.ackIds[j]; - } - return object; - }; - - /** - * Converts this ModifyAckDeadlineRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ModifyAckDeadlineRequest - * @instance - * @returns {Object.} JSON object - */ - ModifyAckDeadlineRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ModifyAckDeadlineRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.ModifyAckDeadlineRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ModifyAckDeadlineRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ModifyAckDeadlineRequest"; - }; - - return ModifyAckDeadlineRequest; - })(); - - v1.AcknowledgeRequest = (function() { - - /** - * Properties of an AcknowledgeRequest. - * @memberof google.pubsub.v1 - * @interface IAcknowledgeRequest - * @property {string|null} [subscription] AcknowledgeRequest subscription - * @property {Array.|null} [ackIds] AcknowledgeRequest ackIds - */ - - /** - * Constructs a new AcknowledgeRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents an AcknowledgeRequest. - * @implements IAcknowledgeRequest - * @constructor - * @param {google.pubsub.v1.IAcknowledgeRequest=} [properties] Properties to set - */ - function AcknowledgeRequest(properties) { - this.ackIds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * AcknowledgeRequest subscription. - * @member {string} subscription - * @memberof google.pubsub.v1.AcknowledgeRequest - * @instance - */ - AcknowledgeRequest.prototype.subscription = ""; - - /** - * AcknowledgeRequest ackIds. - * @member {Array.} ackIds - * @memberof google.pubsub.v1.AcknowledgeRequest - * @instance - */ - AcknowledgeRequest.prototype.ackIds = $util.emptyArray; - - /** - * Creates a new AcknowledgeRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.AcknowledgeRequest - * @static - * @param {google.pubsub.v1.IAcknowledgeRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.AcknowledgeRequest} AcknowledgeRequest instance - */ - AcknowledgeRequest.create = function create(properties) { - return new AcknowledgeRequest(properties); - }; - - /** - * Encodes the specified AcknowledgeRequest message. Does not implicitly {@link google.pubsub.v1.AcknowledgeRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.AcknowledgeRequest - * @static - * @param {google.pubsub.v1.IAcknowledgeRequest} message AcknowledgeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AcknowledgeRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subscription); - if (message.ackIds != null && message.ackIds.length) - for (var i = 0; i < message.ackIds.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ackIds[i]); - return writer; - }; - - /** - * Encodes the specified AcknowledgeRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.AcknowledgeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.AcknowledgeRequest - * @static - * @param {google.pubsub.v1.IAcknowledgeRequest} message AcknowledgeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AcknowledgeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an AcknowledgeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.AcknowledgeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.AcknowledgeRequest} AcknowledgeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AcknowledgeRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.AcknowledgeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.subscription = reader.string(); - break; - } - case 2: { - if (!(message.ackIds && message.ackIds.length)) - message.ackIds = []; - message.ackIds.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an AcknowledgeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.AcknowledgeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.AcknowledgeRequest} AcknowledgeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AcknowledgeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AcknowledgeRequest message. - * @function verify - * @memberof google.pubsub.v1.AcknowledgeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AcknowledgeRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - if (!$util.isString(message.subscription)) - return "subscription: string expected"; - if (message.ackIds != null && Object.hasOwnProperty.call(message, "ackIds")) { - if (!Array.isArray(message.ackIds)) - return "ackIds: array expected"; - for (var i = 0; i < message.ackIds.length; ++i) - if (!$util.isString(message.ackIds[i])) - return "ackIds: string[] expected"; - } - return null; - }; - - /** - * Creates an AcknowledgeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.AcknowledgeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.AcknowledgeRequest} AcknowledgeRequest - */ - AcknowledgeRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.AcknowledgeRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.AcknowledgeRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.AcknowledgeRequest(); - if (object.subscription != null) - message.subscription = String(object.subscription); - if (object.ackIds) { - if (!Array.isArray(object.ackIds)) - throw TypeError(".google.pubsub.v1.AcknowledgeRequest.ackIds: array expected"); - message.ackIds = []; - for (var i = 0; i < object.ackIds.length; ++i) - message.ackIds[i] = String(object.ackIds[i]); - } - return message; - }; - - /** - * Creates a plain object from an AcknowledgeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.AcknowledgeRequest - * @static - * @param {google.pubsub.v1.AcknowledgeRequest} message AcknowledgeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AcknowledgeRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.ackIds = []; - if (options.defaults) - object.subscription = ""; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - object.subscription = message.subscription; - if (message.ackIds && message.ackIds.length) { - object.ackIds = []; - for (var j = 0; j < message.ackIds.length; ++j) - object.ackIds[j] = message.ackIds[j]; - } - return object; - }; - - /** - * Converts this AcknowledgeRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.AcknowledgeRequest - * @instance - * @returns {Object.} JSON object - */ - AcknowledgeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AcknowledgeRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.AcknowledgeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AcknowledgeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.AcknowledgeRequest"; - }; - - return AcknowledgeRequest; - })(); - - v1.StreamingPullRequest = (function() { - - /** - * Properties of a StreamingPullRequest. - * @memberof google.pubsub.v1 - * @interface IStreamingPullRequest - * @property {string|null} [subscription] StreamingPullRequest subscription - * @property {Array.|null} [ackIds] StreamingPullRequest ackIds - * @property {Array.|null} [modifyDeadlineSeconds] StreamingPullRequest modifyDeadlineSeconds - * @property {Array.|null} [modifyDeadlineAckIds] StreamingPullRequest modifyDeadlineAckIds - * @property {number|null} [streamAckDeadlineSeconds] StreamingPullRequest streamAckDeadlineSeconds - * @property {string|null} [clientId] StreamingPullRequest clientId - * @property {number|Long|null} [maxOutstandingMessages] StreamingPullRequest maxOutstandingMessages - * @property {number|Long|null} [maxOutstandingBytes] StreamingPullRequest maxOutstandingBytes - * @property {number|Long|null} [protocolVersion] StreamingPullRequest protocolVersion - */ - - /** - * Constructs a new StreamingPullRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a StreamingPullRequest. - * @implements IStreamingPullRequest - * @constructor - * @param {google.pubsub.v1.IStreamingPullRequest=} [properties] Properties to set - */ - function StreamingPullRequest(properties) { - this.ackIds = []; - this.modifyDeadlineSeconds = []; - this.modifyDeadlineAckIds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * StreamingPullRequest subscription. - * @member {string} subscription - * @memberof google.pubsub.v1.StreamingPullRequest - * @instance - */ - StreamingPullRequest.prototype.subscription = ""; - - /** - * StreamingPullRequest ackIds. - * @member {Array.} ackIds - * @memberof google.pubsub.v1.StreamingPullRequest - * @instance - */ - StreamingPullRequest.prototype.ackIds = $util.emptyArray; - - /** - * StreamingPullRequest modifyDeadlineSeconds. - * @member {Array.} modifyDeadlineSeconds - * @memberof google.pubsub.v1.StreamingPullRequest - * @instance - */ - StreamingPullRequest.prototype.modifyDeadlineSeconds = $util.emptyArray; - - /** - * StreamingPullRequest modifyDeadlineAckIds. - * @member {Array.} modifyDeadlineAckIds - * @memberof google.pubsub.v1.StreamingPullRequest - * @instance - */ - StreamingPullRequest.prototype.modifyDeadlineAckIds = $util.emptyArray; - - /** - * StreamingPullRequest streamAckDeadlineSeconds. - * @member {number} streamAckDeadlineSeconds - * @memberof google.pubsub.v1.StreamingPullRequest - * @instance - */ - StreamingPullRequest.prototype.streamAckDeadlineSeconds = 0; - - /** - * StreamingPullRequest clientId. - * @member {string} clientId - * @memberof google.pubsub.v1.StreamingPullRequest - * @instance - */ - StreamingPullRequest.prototype.clientId = ""; - - /** - * StreamingPullRequest maxOutstandingMessages. - * @member {number|Long} maxOutstandingMessages - * @memberof google.pubsub.v1.StreamingPullRequest - * @instance - */ - StreamingPullRequest.prototype.maxOutstandingMessages = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * StreamingPullRequest maxOutstandingBytes. - * @member {number|Long} maxOutstandingBytes - * @memberof google.pubsub.v1.StreamingPullRequest - * @instance - */ - StreamingPullRequest.prototype.maxOutstandingBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * StreamingPullRequest protocolVersion. - * @member {number|Long} protocolVersion - * @memberof google.pubsub.v1.StreamingPullRequest - * @instance - */ - StreamingPullRequest.prototype.protocolVersion = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Creates a new StreamingPullRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.StreamingPullRequest - * @static - * @param {google.pubsub.v1.IStreamingPullRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.StreamingPullRequest} StreamingPullRequest instance - */ - StreamingPullRequest.create = function create(properties) { - return new StreamingPullRequest(properties); - }; - - /** - * Encodes the specified StreamingPullRequest message. Does not implicitly {@link google.pubsub.v1.StreamingPullRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.StreamingPullRequest - * @static - * @param {google.pubsub.v1.IStreamingPullRequest} message StreamingPullRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamingPullRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subscription); - if (message.ackIds != null && message.ackIds.length) - for (var i = 0; i < message.ackIds.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.ackIds[i]); - if (message.modifyDeadlineSeconds != null && message.modifyDeadlineSeconds.length) { - writer.uint32(/* id 3, wireType 2 =*/26).fork(); - for (var i = 0; i < message.modifyDeadlineSeconds.length; ++i) - writer.int32(message.modifyDeadlineSeconds[i]); - writer.ldelim(); - } - if (message.modifyDeadlineAckIds != null && message.modifyDeadlineAckIds.length) - for (var i = 0; i < message.modifyDeadlineAckIds.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.modifyDeadlineAckIds[i]); - if (message.streamAckDeadlineSeconds != null && Object.hasOwnProperty.call(message, "streamAckDeadlineSeconds")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.streamAckDeadlineSeconds); - if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.clientId); - if (message.maxOutstandingMessages != null && Object.hasOwnProperty.call(message, "maxOutstandingMessages")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.maxOutstandingMessages); - if (message.maxOutstandingBytes != null && Object.hasOwnProperty.call(message, "maxOutstandingBytes")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.maxOutstandingBytes); - if (message.protocolVersion != null && Object.hasOwnProperty.call(message, "protocolVersion")) - writer.uint32(/* id 10, wireType 0 =*/80).int64(message.protocolVersion); - return writer; - }; - - /** - * Encodes the specified StreamingPullRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.StreamingPullRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.StreamingPullRequest - * @static - * @param {google.pubsub.v1.IStreamingPullRequest} message StreamingPullRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamingPullRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a StreamingPullRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.StreamingPullRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.StreamingPullRequest} StreamingPullRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamingPullRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.StreamingPullRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.subscription = reader.string(); - break; - } - case 2: { - if (!(message.ackIds && message.ackIds.length)) - message.ackIds = []; - message.ackIds.push(reader.string()); - break; - } - case 3: { - if (!(message.modifyDeadlineSeconds && message.modifyDeadlineSeconds.length)) - message.modifyDeadlineSeconds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.modifyDeadlineSeconds.push(reader.int32()); - } else - message.modifyDeadlineSeconds.push(reader.int32()); - break; - } - case 4: { - if (!(message.modifyDeadlineAckIds && message.modifyDeadlineAckIds.length)) - message.modifyDeadlineAckIds = []; - message.modifyDeadlineAckIds.push(reader.string()); - break; - } - case 5: { - message.streamAckDeadlineSeconds = reader.int32(); - break; - } - case 6: { - message.clientId = reader.string(); - break; - } - case 7: { - message.maxOutstandingMessages = reader.int64(); - break; - } - case 8: { - message.maxOutstandingBytes = reader.int64(); - break; - } - case 10: { - message.protocolVersion = reader.int64(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a StreamingPullRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.StreamingPullRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.StreamingPullRequest} StreamingPullRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamingPullRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StreamingPullRequest message. - * @function verify - * @memberof google.pubsub.v1.StreamingPullRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StreamingPullRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - if (!$util.isString(message.subscription)) - return "subscription: string expected"; - if (message.ackIds != null && Object.hasOwnProperty.call(message, "ackIds")) { - if (!Array.isArray(message.ackIds)) - return "ackIds: array expected"; - for (var i = 0; i < message.ackIds.length; ++i) - if (!$util.isString(message.ackIds[i])) - return "ackIds: string[] expected"; - } - if (message.modifyDeadlineSeconds != null && Object.hasOwnProperty.call(message, "modifyDeadlineSeconds")) { - if (!Array.isArray(message.modifyDeadlineSeconds)) - return "modifyDeadlineSeconds: array expected"; - for (var i = 0; i < message.modifyDeadlineSeconds.length; ++i) - if (!$util.isInteger(message.modifyDeadlineSeconds[i])) - return "modifyDeadlineSeconds: integer[] expected"; - } - if (message.modifyDeadlineAckIds != null && Object.hasOwnProperty.call(message, "modifyDeadlineAckIds")) { - if (!Array.isArray(message.modifyDeadlineAckIds)) - return "modifyDeadlineAckIds: array expected"; - for (var i = 0; i < message.modifyDeadlineAckIds.length; ++i) - if (!$util.isString(message.modifyDeadlineAckIds[i])) - return "modifyDeadlineAckIds: string[] expected"; - } - if (message.streamAckDeadlineSeconds != null && Object.hasOwnProperty.call(message, "streamAckDeadlineSeconds")) - if (!$util.isInteger(message.streamAckDeadlineSeconds)) - return "streamAckDeadlineSeconds: integer expected"; - if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) - if (!$util.isString(message.clientId)) - return "clientId: string expected"; - if (message.maxOutstandingMessages != null && Object.hasOwnProperty.call(message, "maxOutstandingMessages")) - if (!$util.isInteger(message.maxOutstandingMessages) && !(message.maxOutstandingMessages && $util.isInteger(message.maxOutstandingMessages.low) && $util.isInteger(message.maxOutstandingMessages.high))) - return "maxOutstandingMessages: integer|Long expected"; - if (message.maxOutstandingBytes != null && Object.hasOwnProperty.call(message, "maxOutstandingBytes")) - if (!$util.isInteger(message.maxOutstandingBytes) && !(message.maxOutstandingBytes && $util.isInteger(message.maxOutstandingBytes.low) && $util.isInteger(message.maxOutstandingBytes.high))) - return "maxOutstandingBytes: integer|Long expected"; - if (message.protocolVersion != null && Object.hasOwnProperty.call(message, "protocolVersion")) - if (!$util.isInteger(message.protocolVersion) && !(message.protocolVersion && $util.isInteger(message.protocolVersion.low) && $util.isInteger(message.protocolVersion.high))) - return "protocolVersion: integer|Long expected"; - return null; - }; - - /** - * Creates a StreamingPullRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.StreamingPullRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.StreamingPullRequest} StreamingPullRequest - */ - StreamingPullRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.StreamingPullRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.StreamingPullRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.StreamingPullRequest(); - if (object.subscription != null) - message.subscription = String(object.subscription); - if (object.ackIds) { - if (!Array.isArray(object.ackIds)) - throw TypeError(".google.pubsub.v1.StreamingPullRequest.ackIds: array expected"); - message.ackIds = []; - for (var i = 0; i < object.ackIds.length; ++i) - message.ackIds[i] = String(object.ackIds[i]); - } - if (object.modifyDeadlineSeconds) { - if (!Array.isArray(object.modifyDeadlineSeconds)) - throw TypeError(".google.pubsub.v1.StreamingPullRequest.modifyDeadlineSeconds: array expected"); - message.modifyDeadlineSeconds = []; - for (var i = 0; i < object.modifyDeadlineSeconds.length; ++i) - message.modifyDeadlineSeconds[i] = object.modifyDeadlineSeconds[i] | 0; - } - if (object.modifyDeadlineAckIds) { - if (!Array.isArray(object.modifyDeadlineAckIds)) - throw TypeError(".google.pubsub.v1.StreamingPullRequest.modifyDeadlineAckIds: array expected"); - message.modifyDeadlineAckIds = []; - for (var i = 0; i < object.modifyDeadlineAckIds.length; ++i) - message.modifyDeadlineAckIds[i] = String(object.modifyDeadlineAckIds[i]); - } - if (object.streamAckDeadlineSeconds != null) - message.streamAckDeadlineSeconds = object.streamAckDeadlineSeconds | 0; - if (object.clientId != null) - message.clientId = String(object.clientId); - if (object.maxOutstandingMessages != null) - if ($util.Long) - message.maxOutstandingMessages = $util.Long.fromValue(object.maxOutstandingMessages, false); - else if (typeof object.maxOutstandingMessages === "string") - message.maxOutstandingMessages = parseInt(object.maxOutstandingMessages, 10); - else if (typeof object.maxOutstandingMessages === "number") - message.maxOutstandingMessages = object.maxOutstandingMessages; - else if (typeof object.maxOutstandingMessages === "object") - message.maxOutstandingMessages = new $util.LongBits(object.maxOutstandingMessages.low >>> 0, object.maxOutstandingMessages.high >>> 0).toNumber(); - if (object.maxOutstandingBytes != null) - if ($util.Long) - message.maxOutstandingBytes = $util.Long.fromValue(object.maxOutstandingBytes, false); - else if (typeof object.maxOutstandingBytes === "string") - message.maxOutstandingBytes = parseInt(object.maxOutstandingBytes, 10); - else if (typeof object.maxOutstandingBytes === "number") - message.maxOutstandingBytes = object.maxOutstandingBytes; - else if (typeof object.maxOutstandingBytes === "object") - message.maxOutstandingBytes = new $util.LongBits(object.maxOutstandingBytes.low >>> 0, object.maxOutstandingBytes.high >>> 0).toNumber(); - if (object.protocolVersion != null) - if ($util.Long) - message.protocolVersion = $util.Long.fromValue(object.protocolVersion, false); - else if (typeof object.protocolVersion === "string") - message.protocolVersion = parseInt(object.protocolVersion, 10); - else if (typeof object.protocolVersion === "number") - message.protocolVersion = object.protocolVersion; - else if (typeof object.protocolVersion === "object") - message.protocolVersion = new $util.LongBits(object.protocolVersion.low >>> 0, object.protocolVersion.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a StreamingPullRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.StreamingPullRequest - * @static - * @param {google.pubsub.v1.StreamingPullRequest} message StreamingPullRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StreamingPullRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) { - object.ackIds = []; - object.modifyDeadlineSeconds = []; - object.modifyDeadlineAckIds = []; - } - if (options.defaults) { - object.subscription = ""; - object.streamAckDeadlineSeconds = 0; - object.clientId = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.maxOutstandingMessages = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; - } else - object.maxOutstandingMessages = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.maxOutstandingBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; - } else - object.maxOutstandingBytes = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.protocolVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; - } else - object.protocolVersion = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - } - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - object.subscription = message.subscription; - if (message.ackIds && message.ackIds.length) { - object.ackIds = []; - for (var j = 0; j < message.ackIds.length; ++j) - object.ackIds[j] = message.ackIds[j]; - } - if (message.modifyDeadlineSeconds && message.modifyDeadlineSeconds.length) { - object.modifyDeadlineSeconds = []; - for (var j = 0; j < message.modifyDeadlineSeconds.length; ++j) - object.modifyDeadlineSeconds[j] = message.modifyDeadlineSeconds[j]; - } - if (message.modifyDeadlineAckIds && message.modifyDeadlineAckIds.length) { - object.modifyDeadlineAckIds = []; - for (var j = 0; j < message.modifyDeadlineAckIds.length; ++j) - object.modifyDeadlineAckIds[j] = message.modifyDeadlineAckIds[j]; - } - if (message.streamAckDeadlineSeconds != null && Object.hasOwnProperty.call(message, "streamAckDeadlineSeconds")) - object.streamAckDeadlineSeconds = message.streamAckDeadlineSeconds; - if (message.clientId != null && Object.hasOwnProperty.call(message, "clientId")) - object.clientId = message.clientId; - if (message.maxOutstandingMessages != null && Object.hasOwnProperty.call(message, "maxOutstandingMessages")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.maxOutstandingMessages = typeof message.maxOutstandingMessages === "number" ? BigInt(message.maxOutstandingMessages) : $util.Long.fromBits(message.maxOutstandingMessages.low >>> 0, message.maxOutstandingMessages.high >>> 0, false).toBigInt(); - else if (typeof message.maxOutstandingMessages === "number") - object.maxOutstandingMessages = options.longs === String ? String(message.maxOutstandingMessages) : message.maxOutstandingMessages; - else - object.maxOutstandingMessages = options.longs === String ? $util.Long.prototype.toString.call(message.maxOutstandingMessages) : options.longs === Number ? new $util.LongBits(message.maxOutstandingMessages.low >>> 0, message.maxOutstandingMessages.high >>> 0).toNumber() : message.maxOutstandingMessages; - if (message.maxOutstandingBytes != null && Object.hasOwnProperty.call(message, "maxOutstandingBytes")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.maxOutstandingBytes = typeof message.maxOutstandingBytes === "number" ? BigInt(message.maxOutstandingBytes) : $util.Long.fromBits(message.maxOutstandingBytes.low >>> 0, message.maxOutstandingBytes.high >>> 0, false).toBigInt(); - else if (typeof message.maxOutstandingBytes === "number") - object.maxOutstandingBytes = options.longs === String ? String(message.maxOutstandingBytes) : message.maxOutstandingBytes; - else - object.maxOutstandingBytes = options.longs === String ? $util.Long.prototype.toString.call(message.maxOutstandingBytes) : options.longs === Number ? new $util.LongBits(message.maxOutstandingBytes.low >>> 0, message.maxOutstandingBytes.high >>> 0).toNumber() : message.maxOutstandingBytes; - if (message.protocolVersion != null && Object.hasOwnProperty.call(message, "protocolVersion")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.protocolVersion = typeof message.protocolVersion === "number" ? BigInt(message.protocolVersion) : $util.Long.fromBits(message.protocolVersion.low >>> 0, message.protocolVersion.high >>> 0, false).toBigInt(); - else if (typeof message.protocolVersion === "number") - object.protocolVersion = options.longs === String ? String(message.protocolVersion) : message.protocolVersion; - else - object.protocolVersion = options.longs === String ? $util.Long.prototype.toString.call(message.protocolVersion) : options.longs === Number ? new $util.LongBits(message.protocolVersion.low >>> 0, message.protocolVersion.high >>> 0).toNumber() : message.protocolVersion; - return object; - }; - - /** - * Converts this StreamingPullRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.StreamingPullRequest - * @instance - * @returns {Object.} JSON object - */ - StreamingPullRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StreamingPullRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.StreamingPullRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StreamingPullRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.StreamingPullRequest"; - }; - - return StreamingPullRequest; - })(); - - v1.StreamingPullResponse = (function() { - - /** - * Properties of a StreamingPullResponse. - * @memberof google.pubsub.v1 - * @interface IStreamingPullResponse - * @property {Array.|null} [receivedMessages] StreamingPullResponse receivedMessages - * @property {google.pubsub.v1.StreamingPullResponse.IAcknowledgeConfirmation|null} [acknowledgeConfirmation] StreamingPullResponse acknowledgeConfirmation - * @property {google.pubsub.v1.StreamingPullResponse.IModifyAckDeadlineConfirmation|null} [modifyAckDeadlineConfirmation] StreamingPullResponse modifyAckDeadlineConfirmation - * @property {google.pubsub.v1.StreamingPullResponse.ISubscriptionProperties|null} [subscriptionProperties] StreamingPullResponse subscriptionProperties - */ - - /** - * Constructs a new StreamingPullResponse. - * @memberof google.pubsub.v1 - * @classdesc Represents a StreamingPullResponse. - * @implements IStreamingPullResponse - * @constructor - * @param {google.pubsub.v1.IStreamingPullResponse=} [properties] Properties to set - */ - function StreamingPullResponse(properties) { - this.receivedMessages = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * StreamingPullResponse receivedMessages. - * @member {Array.} receivedMessages - * @memberof google.pubsub.v1.StreamingPullResponse - * @instance - */ - StreamingPullResponse.prototype.receivedMessages = $util.emptyArray; - - /** - * StreamingPullResponse acknowledgeConfirmation. - * @member {google.pubsub.v1.StreamingPullResponse.IAcknowledgeConfirmation|null|undefined} acknowledgeConfirmation - * @memberof google.pubsub.v1.StreamingPullResponse - * @instance - */ - StreamingPullResponse.prototype.acknowledgeConfirmation = null; - - /** - * StreamingPullResponse modifyAckDeadlineConfirmation. - * @member {google.pubsub.v1.StreamingPullResponse.IModifyAckDeadlineConfirmation|null|undefined} modifyAckDeadlineConfirmation - * @memberof google.pubsub.v1.StreamingPullResponse - * @instance - */ - StreamingPullResponse.prototype.modifyAckDeadlineConfirmation = null; - - /** - * StreamingPullResponse subscriptionProperties. - * @member {google.pubsub.v1.StreamingPullResponse.ISubscriptionProperties|null|undefined} subscriptionProperties - * @memberof google.pubsub.v1.StreamingPullResponse - * @instance - */ - StreamingPullResponse.prototype.subscriptionProperties = null; - - /** - * Creates a new StreamingPullResponse instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.StreamingPullResponse - * @static - * @param {google.pubsub.v1.IStreamingPullResponse=} [properties] Properties to set - * @returns {google.pubsub.v1.StreamingPullResponse} StreamingPullResponse instance - */ - StreamingPullResponse.create = function create(properties) { - return new StreamingPullResponse(properties); - }; - - /** - * Encodes the specified StreamingPullResponse message. Does not implicitly {@link google.pubsub.v1.StreamingPullResponse.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.StreamingPullResponse - * @static - * @param {google.pubsub.v1.IStreamingPullResponse} message StreamingPullResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamingPullResponse.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.receivedMessages != null && message.receivedMessages.length) - for (var i = 0; i < message.receivedMessages.length; ++i) - $root.google.pubsub.v1.ReceivedMessage.encode(message.receivedMessages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.modifyAckDeadlineConfirmation != null && Object.hasOwnProperty.call(message, "modifyAckDeadlineConfirmation")) - $root.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.encode(message.modifyAckDeadlineConfirmation, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); - if (message.subscriptionProperties != null && Object.hasOwnProperty.call(message, "subscriptionProperties")) - $root.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.encode(message.subscriptionProperties, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); - if (message.acknowledgeConfirmation != null && Object.hasOwnProperty.call(message, "acknowledgeConfirmation")) - $root.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.encode(message.acknowledgeConfirmation, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified StreamingPullResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.StreamingPullResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.StreamingPullResponse - * @static - * @param {google.pubsub.v1.IStreamingPullResponse} message StreamingPullResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StreamingPullResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a StreamingPullResponse message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.StreamingPullResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.StreamingPullResponse} StreamingPullResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamingPullResponse.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.StreamingPullResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.receivedMessages && message.receivedMessages.length)) - message.receivedMessages = []; - message.receivedMessages.push($root.google.pubsub.v1.ReceivedMessage.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 5: { - message.acknowledgeConfirmation = $root.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 3: { - message.modifyAckDeadlineConfirmation = $root.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 4: { - message.subscriptionProperties = $root.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a StreamingPullResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.StreamingPullResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.StreamingPullResponse} StreamingPullResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StreamingPullResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StreamingPullResponse message. - * @function verify - * @memberof google.pubsub.v1.StreamingPullResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StreamingPullResponse.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.receivedMessages != null && Object.hasOwnProperty.call(message, "receivedMessages")) { - if (!Array.isArray(message.receivedMessages)) - return "receivedMessages: array expected"; - for (var i = 0; i < message.receivedMessages.length; ++i) { - var error = $root.google.pubsub.v1.ReceivedMessage.verify(message.receivedMessages[i], long + 1); - if (error) - return "receivedMessages." + error; - } - } - if (message.acknowledgeConfirmation != null && Object.hasOwnProperty.call(message, "acknowledgeConfirmation")) { - var error = $root.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.verify(message.acknowledgeConfirmation, long + 1); - if (error) - return "acknowledgeConfirmation." + error; - } - if (message.modifyAckDeadlineConfirmation != null && Object.hasOwnProperty.call(message, "modifyAckDeadlineConfirmation")) { - var error = $root.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.verify(message.modifyAckDeadlineConfirmation, long + 1); - if (error) - return "modifyAckDeadlineConfirmation." + error; - } - if (message.subscriptionProperties != null && Object.hasOwnProperty.call(message, "subscriptionProperties")) { - var error = $root.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.verify(message.subscriptionProperties, long + 1); - if (error) - return "subscriptionProperties." + error; - } - return null; - }; - - /** - * Creates a StreamingPullResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.StreamingPullResponse - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.StreamingPullResponse} StreamingPullResponse - */ - StreamingPullResponse.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.StreamingPullResponse) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.StreamingPullResponse: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.StreamingPullResponse(); - if (object.receivedMessages) { - if (!Array.isArray(object.receivedMessages)) - throw TypeError(".google.pubsub.v1.StreamingPullResponse.receivedMessages: array expected"); - message.receivedMessages = []; - for (var i = 0; i < object.receivedMessages.length; ++i) { - if (!$util.isObject(object.receivedMessages[i])) - throw TypeError(".google.pubsub.v1.StreamingPullResponse.receivedMessages: object expected"); - message.receivedMessages[i] = $root.google.pubsub.v1.ReceivedMessage.fromObject(object.receivedMessages[i], long + 1); - } - } - if (object.acknowledgeConfirmation != null) { - if (!$util.isObject(object.acknowledgeConfirmation)) - throw TypeError(".google.pubsub.v1.StreamingPullResponse.acknowledgeConfirmation: object expected"); - message.acknowledgeConfirmation = $root.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.fromObject(object.acknowledgeConfirmation, long + 1); - } - if (object.modifyAckDeadlineConfirmation != null) { - if (!$util.isObject(object.modifyAckDeadlineConfirmation)) - throw TypeError(".google.pubsub.v1.StreamingPullResponse.modifyAckDeadlineConfirmation: object expected"); - message.modifyAckDeadlineConfirmation = $root.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.fromObject(object.modifyAckDeadlineConfirmation, long + 1); - } - if (object.subscriptionProperties != null) { - if (!$util.isObject(object.subscriptionProperties)) - throw TypeError(".google.pubsub.v1.StreamingPullResponse.subscriptionProperties: object expected"); - message.subscriptionProperties = $root.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.fromObject(object.subscriptionProperties, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a StreamingPullResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.StreamingPullResponse - * @static - * @param {google.pubsub.v1.StreamingPullResponse} message StreamingPullResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StreamingPullResponse.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.receivedMessages = []; - if (options.defaults) { - object.modifyAckDeadlineConfirmation = null; - object.subscriptionProperties = null; - object.acknowledgeConfirmation = null; - } - if (message.receivedMessages && message.receivedMessages.length) { - object.receivedMessages = []; - for (var j = 0; j < message.receivedMessages.length; ++j) - object.receivedMessages[j] = $root.google.pubsub.v1.ReceivedMessage.toObject(message.receivedMessages[j], options, q + 1); - } - if (message.modifyAckDeadlineConfirmation != null && Object.hasOwnProperty.call(message, "modifyAckDeadlineConfirmation")) - object.modifyAckDeadlineConfirmation = $root.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.toObject(message.modifyAckDeadlineConfirmation, options, q + 1); - if (message.subscriptionProperties != null && Object.hasOwnProperty.call(message, "subscriptionProperties")) - object.subscriptionProperties = $root.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.toObject(message.subscriptionProperties, options, q + 1); - if (message.acknowledgeConfirmation != null && Object.hasOwnProperty.call(message, "acknowledgeConfirmation")) - object.acknowledgeConfirmation = $root.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.toObject(message.acknowledgeConfirmation, options, q + 1); - return object; - }; - - /** - * Converts this StreamingPullResponse to JSON. - * @function toJSON - * @memberof google.pubsub.v1.StreamingPullResponse - * @instance - * @returns {Object.} JSON object - */ - StreamingPullResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StreamingPullResponse - * @function getTypeUrl - * @memberof google.pubsub.v1.StreamingPullResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StreamingPullResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.StreamingPullResponse"; - }; - - StreamingPullResponse.AcknowledgeConfirmation = (function() { - - /** - * Properties of an AcknowledgeConfirmation. - * @memberof google.pubsub.v1.StreamingPullResponse - * @interface IAcknowledgeConfirmation - * @property {Array.|null} [ackIds] AcknowledgeConfirmation ackIds - * @property {Array.|null} [invalidAckIds] AcknowledgeConfirmation invalidAckIds - * @property {Array.|null} [unorderedAckIds] AcknowledgeConfirmation unorderedAckIds - * @property {Array.|null} [temporaryFailedAckIds] AcknowledgeConfirmation temporaryFailedAckIds - */ - - /** - * Constructs a new AcknowledgeConfirmation. - * @memberof google.pubsub.v1.StreamingPullResponse - * @classdesc Represents an AcknowledgeConfirmation. - * @implements IAcknowledgeConfirmation - * @constructor - * @param {google.pubsub.v1.StreamingPullResponse.IAcknowledgeConfirmation=} [properties] Properties to set - */ - function AcknowledgeConfirmation(properties) { - this.ackIds = []; - this.invalidAckIds = []; - this.unorderedAckIds = []; - this.temporaryFailedAckIds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * AcknowledgeConfirmation ackIds. - * @member {Array.} ackIds - * @memberof google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation - * @instance - */ - AcknowledgeConfirmation.prototype.ackIds = $util.emptyArray; - - /** - * AcknowledgeConfirmation invalidAckIds. - * @member {Array.} invalidAckIds - * @memberof google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation - * @instance - */ - AcknowledgeConfirmation.prototype.invalidAckIds = $util.emptyArray; - - /** - * AcknowledgeConfirmation unorderedAckIds. - * @member {Array.} unorderedAckIds - * @memberof google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation - * @instance - */ - AcknowledgeConfirmation.prototype.unorderedAckIds = $util.emptyArray; - - /** - * AcknowledgeConfirmation temporaryFailedAckIds. - * @member {Array.} temporaryFailedAckIds - * @memberof google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation - * @instance - */ - AcknowledgeConfirmation.prototype.temporaryFailedAckIds = $util.emptyArray; - - /** - * Creates a new AcknowledgeConfirmation instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation - * @static - * @param {google.pubsub.v1.StreamingPullResponse.IAcknowledgeConfirmation=} [properties] Properties to set - * @returns {google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation} AcknowledgeConfirmation instance - */ - AcknowledgeConfirmation.create = function create(properties) { - return new AcknowledgeConfirmation(properties); - }; - - /** - * Encodes the specified AcknowledgeConfirmation message. Does not implicitly {@link google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation - * @static - * @param {google.pubsub.v1.StreamingPullResponse.IAcknowledgeConfirmation} message AcknowledgeConfirmation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AcknowledgeConfirmation.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.ackIds != null && message.ackIds.length) - for (var i = 0; i < message.ackIds.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ackIds[i]); - if (message.invalidAckIds != null && message.invalidAckIds.length) - for (var i = 0; i < message.invalidAckIds.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.invalidAckIds[i]); - if (message.unorderedAckIds != null && message.unorderedAckIds.length) - for (var i = 0; i < message.unorderedAckIds.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unorderedAckIds[i]); - if (message.temporaryFailedAckIds != null && message.temporaryFailedAckIds.length) - for (var i = 0; i < message.temporaryFailedAckIds.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.temporaryFailedAckIds[i]); - return writer; - }; - - /** - * Encodes the specified AcknowledgeConfirmation message, length delimited. Does not implicitly {@link google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation - * @static - * @param {google.pubsub.v1.StreamingPullResponse.IAcknowledgeConfirmation} message AcknowledgeConfirmation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AcknowledgeConfirmation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an AcknowledgeConfirmation message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation} AcknowledgeConfirmation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AcknowledgeConfirmation.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.ackIds && message.ackIds.length)) - message.ackIds = []; - message.ackIds.push(reader.string()); - break; - } - case 2: { - if (!(message.invalidAckIds && message.invalidAckIds.length)) - message.invalidAckIds = []; - message.invalidAckIds.push(reader.string()); - break; - } - case 3: { - if (!(message.unorderedAckIds && message.unorderedAckIds.length)) - message.unorderedAckIds = []; - message.unorderedAckIds.push(reader.string()); - break; - } - case 4: { - if (!(message.temporaryFailedAckIds && message.temporaryFailedAckIds.length)) - message.temporaryFailedAckIds = []; - message.temporaryFailedAckIds.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an AcknowledgeConfirmation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation} AcknowledgeConfirmation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AcknowledgeConfirmation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AcknowledgeConfirmation message. - * @function verify - * @memberof google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AcknowledgeConfirmation.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.ackIds != null && Object.hasOwnProperty.call(message, "ackIds")) { - if (!Array.isArray(message.ackIds)) - return "ackIds: array expected"; - for (var i = 0; i < message.ackIds.length; ++i) - if (!$util.isString(message.ackIds[i])) - return "ackIds: string[] expected"; - } - if (message.invalidAckIds != null && Object.hasOwnProperty.call(message, "invalidAckIds")) { - if (!Array.isArray(message.invalidAckIds)) - return "invalidAckIds: array expected"; - for (var i = 0; i < message.invalidAckIds.length; ++i) - if (!$util.isString(message.invalidAckIds[i])) - return "invalidAckIds: string[] expected"; - } - if (message.unorderedAckIds != null && Object.hasOwnProperty.call(message, "unorderedAckIds")) { - if (!Array.isArray(message.unorderedAckIds)) - return "unorderedAckIds: array expected"; - for (var i = 0; i < message.unorderedAckIds.length; ++i) - if (!$util.isString(message.unorderedAckIds[i])) - return "unorderedAckIds: string[] expected"; - } - if (message.temporaryFailedAckIds != null && Object.hasOwnProperty.call(message, "temporaryFailedAckIds")) { - if (!Array.isArray(message.temporaryFailedAckIds)) - return "temporaryFailedAckIds: array expected"; - for (var i = 0; i < message.temporaryFailedAckIds.length; ++i) - if (!$util.isString(message.temporaryFailedAckIds[i])) - return "temporaryFailedAckIds: string[] expected"; - } - return null; - }; - - /** - * Creates an AcknowledgeConfirmation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation} AcknowledgeConfirmation - */ - AcknowledgeConfirmation.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation(); - if (object.ackIds) { - if (!Array.isArray(object.ackIds)) - throw TypeError(".google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.ackIds: array expected"); - message.ackIds = []; - for (var i = 0; i < object.ackIds.length; ++i) - message.ackIds[i] = String(object.ackIds[i]); - } - if (object.invalidAckIds) { - if (!Array.isArray(object.invalidAckIds)) - throw TypeError(".google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.invalidAckIds: array expected"); - message.invalidAckIds = []; - for (var i = 0; i < object.invalidAckIds.length; ++i) - message.invalidAckIds[i] = String(object.invalidAckIds[i]); - } - if (object.unorderedAckIds) { - if (!Array.isArray(object.unorderedAckIds)) - throw TypeError(".google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.unorderedAckIds: array expected"); - message.unorderedAckIds = []; - for (var i = 0; i < object.unorderedAckIds.length; ++i) - message.unorderedAckIds[i] = String(object.unorderedAckIds[i]); - } - if (object.temporaryFailedAckIds) { - if (!Array.isArray(object.temporaryFailedAckIds)) - throw TypeError(".google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.temporaryFailedAckIds: array expected"); - message.temporaryFailedAckIds = []; - for (var i = 0; i < object.temporaryFailedAckIds.length; ++i) - message.temporaryFailedAckIds[i] = String(object.temporaryFailedAckIds[i]); - } - return message; - }; - - /** - * Creates a plain object from an AcknowledgeConfirmation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation - * @static - * @param {google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation} message AcknowledgeConfirmation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AcknowledgeConfirmation.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) { - object.ackIds = []; - object.invalidAckIds = []; - object.unorderedAckIds = []; - object.temporaryFailedAckIds = []; - } - if (message.ackIds && message.ackIds.length) { - object.ackIds = []; - for (var j = 0; j < message.ackIds.length; ++j) - object.ackIds[j] = message.ackIds[j]; - } - if (message.invalidAckIds && message.invalidAckIds.length) { - object.invalidAckIds = []; - for (var j = 0; j < message.invalidAckIds.length; ++j) - object.invalidAckIds[j] = message.invalidAckIds[j]; - } - if (message.unorderedAckIds && message.unorderedAckIds.length) { - object.unorderedAckIds = []; - for (var j = 0; j < message.unorderedAckIds.length; ++j) - object.unorderedAckIds[j] = message.unorderedAckIds[j]; - } - if (message.temporaryFailedAckIds && message.temporaryFailedAckIds.length) { - object.temporaryFailedAckIds = []; - for (var j = 0; j < message.temporaryFailedAckIds.length; ++j) - object.temporaryFailedAckIds[j] = message.temporaryFailedAckIds[j]; - } - return object; - }; - - /** - * Converts this AcknowledgeConfirmation to JSON. - * @function toJSON - * @memberof google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation - * @instance - * @returns {Object.} JSON object - */ - AcknowledgeConfirmation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AcknowledgeConfirmation - * @function getTypeUrl - * @memberof google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AcknowledgeConfirmation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation"; - }; - - return AcknowledgeConfirmation; - })(); - - StreamingPullResponse.ModifyAckDeadlineConfirmation = (function() { - - /** - * Properties of a ModifyAckDeadlineConfirmation. - * @memberof google.pubsub.v1.StreamingPullResponse - * @interface IModifyAckDeadlineConfirmation - * @property {Array.|null} [ackIds] ModifyAckDeadlineConfirmation ackIds - * @property {Array.|null} [invalidAckIds] ModifyAckDeadlineConfirmation invalidAckIds - * @property {Array.|null} [temporaryFailedAckIds] ModifyAckDeadlineConfirmation temporaryFailedAckIds - */ - - /** - * Constructs a new ModifyAckDeadlineConfirmation. - * @memberof google.pubsub.v1.StreamingPullResponse - * @classdesc Represents a ModifyAckDeadlineConfirmation. - * @implements IModifyAckDeadlineConfirmation - * @constructor - * @param {google.pubsub.v1.StreamingPullResponse.IModifyAckDeadlineConfirmation=} [properties] Properties to set - */ - function ModifyAckDeadlineConfirmation(properties) { - this.ackIds = []; - this.invalidAckIds = []; - this.temporaryFailedAckIds = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ModifyAckDeadlineConfirmation ackIds. - * @member {Array.} ackIds - * @memberof google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation - * @instance - */ - ModifyAckDeadlineConfirmation.prototype.ackIds = $util.emptyArray; - - /** - * ModifyAckDeadlineConfirmation invalidAckIds. - * @member {Array.} invalidAckIds - * @memberof google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation - * @instance - */ - ModifyAckDeadlineConfirmation.prototype.invalidAckIds = $util.emptyArray; - - /** - * ModifyAckDeadlineConfirmation temporaryFailedAckIds. - * @member {Array.} temporaryFailedAckIds - * @memberof google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation - * @instance - */ - ModifyAckDeadlineConfirmation.prototype.temporaryFailedAckIds = $util.emptyArray; - - /** - * Creates a new ModifyAckDeadlineConfirmation instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation - * @static - * @param {google.pubsub.v1.StreamingPullResponse.IModifyAckDeadlineConfirmation=} [properties] Properties to set - * @returns {google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation} ModifyAckDeadlineConfirmation instance - */ - ModifyAckDeadlineConfirmation.create = function create(properties) { - return new ModifyAckDeadlineConfirmation(properties); - }; - - /** - * Encodes the specified ModifyAckDeadlineConfirmation message. Does not implicitly {@link google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation - * @static - * @param {google.pubsub.v1.StreamingPullResponse.IModifyAckDeadlineConfirmation} message ModifyAckDeadlineConfirmation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModifyAckDeadlineConfirmation.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.ackIds != null && message.ackIds.length) - for (var i = 0; i < message.ackIds.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.ackIds[i]); - if (message.invalidAckIds != null && message.invalidAckIds.length) - for (var i = 0; i < message.invalidAckIds.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.invalidAckIds[i]); - if (message.temporaryFailedAckIds != null && message.temporaryFailedAckIds.length) - for (var i = 0; i < message.temporaryFailedAckIds.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.temporaryFailedAckIds[i]); - return writer; - }; - - /** - * Encodes the specified ModifyAckDeadlineConfirmation message, length delimited. Does not implicitly {@link google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation - * @static - * @param {google.pubsub.v1.StreamingPullResponse.IModifyAckDeadlineConfirmation} message ModifyAckDeadlineConfirmation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ModifyAckDeadlineConfirmation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ModifyAckDeadlineConfirmation message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation} ModifyAckDeadlineConfirmation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModifyAckDeadlineConfirmation.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.ackIds && message.ackIds.length)) - message.ackIds = []; - message.ackIds.push(reader.string()); - break; - } - case 2: { - if (!(message.invalidAckIds && message.invalidAckIds.length)) - message.invalidAckIds = []; - message.invalidAckIds.push(reader.string()); - break; - } - case 3: { - if (!(message.temporaryFailedAckIds && message.temporaryFailedAckIds.length)) - message.temporaryFailedAckIds = []; - message.temporaryFailedAckIds.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ModifyAckDeadlineConfirmation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation} ModifyAckDeadlineConfirmation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ModifyAckDeadlineConfirmation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ModifyAckDeadlineConfirmation message. - * @function verify - * @memberof google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ModifyAckDeadlineConfirmation.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.ackIds != null && Object.hasOwnProperty.call(message, "ackIds")) { - if (!Array.isArray(message.ackIds)) - return "ackIds: array expected"; - for (var i = 0; i < message.ackIds.length; ++i) - if (!$util.isString(message.ackIds[i])) - return "ackIds: string[] expected"; - } - if (message.invalidAckIds != null && Object.hasOwnProperty.call(message, "invalidAckIds")) { - if (!Array.isArray(message.invalidAckIds)) - return "invalidAckIds: array expected"; - for (var i = 0; i < message.invalidAckIds.length; ++i) - if (!$util.isString(message.invalidAckIds[i])) - return "invalidAckIds: string[] expected"; - } - if (message.temporaryFailedAckIds != null && Object.hasOwnProperty.call(message, "temporaryFailedAckIds")) { - if (!Array.isArray(message.temporaryFailedAckIds)) - return "temporaryFailedAckIds: array expected"; - for (var i = 0; i < message.temporaryFailedAckIds.length; ++i) - if (!$util.isString(message.temporaryFailedAckIds[i])) - return "temporaryFailedAckIds: string[] expected"; - } - return null; - }; - - /** - * Creates a ModifyAckDeadlineConfirmation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation} ModifyAckDeadlineConfirmation - */ - ModifyAckDeadlineConfirmation.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation(); - if (object.ackIds) { - if (!Array.isArray(object.ackIds)) - throw TypeError(".google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.ackIds: array expected"); - message.ackIds = []; - for (var i = 0; i < object.ackIds.length; ++i) - message.ackIds[i] = String(object.ackIds[i]); - } - if (object.invalidAckIds) { - if (!Array.isArray(object.invalidAckIds)) - throw TypeError(".google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.invalidAckIds: array expected"); - message.invalidAckIds = []; - for (var i = 0; i < object.invalidAckIds.length; ++i) - message.invalidAckIds[i] = String(object.invalidAckIds[i]); - } - if (object.temporaryFailedAckIds) { - if (!Array.isArray(object.temporaryFailedAckIds)) - throw TypeError(".google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.temporaryFailedAckIds: array expected"); - message.temporaryFailedAckIds = []; - for (var i = 0; i < object.temporaryFailedAckIds.length; ++i) - message.temporaryFailedAckIds[i] = String(object.temporaryFailedAckIds[i]); - } - return message; - }; - - /** - * Creates a plain object from a ModifyAckDeadlineConfirmation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation - * @static - * @param {google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation} message ModifyAckDeadlineConfirmation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ModifyAckDeadlineConfirmation.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) { - object.ackIds = []; - object.invalidAckIds = []; - object.temporaryFailedAckIds = []; - } - if (message.ackIds && message.ackIds.length) { - object.ackIds = []; - for (var j = 0; j < message.ackIds.length; ++j) - object.ackIds[j] = message.ackIds[j]; - } - if (message.invalidAckIds && message.invalidAckIds.length) { - object.invalidAckIds = []; - for (var j = 0; j < message.invalidAckIds.length; ++j) - object.invalidAckIds[j] = message.invalidAckIds[j]; - } - if (message.temporaryFailedAckIds && message.temporaryFailedAckIds.length) { - object.temporaryFailedAckIds = []; - for (var j = 0; j < message.temporaryFailedAckIds.length; ++j) - object.temporaryFailedAckIds[j] = message.temporaryFailedAckIds[j]; - } - return object; - }; - - /** - * Converts this ModifyAckDeadlineConfirmation to JSON. - * @function toJSON - * @memberof google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation - * @instance - * @returns {Object.} JSON object - */ - ModifyAckDeadlineConfirmation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ModifyAckDeadlineConfirmation - * @function getTypeUrl - * @memberof google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ModifyAckDeadlineConfirmation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation"; - }; - - return ModifyAckDeadlineConfirmation; - })(); - - StreamingPullResponse.SubscriptionProperties = (function() { - - /** - * Properties of a SubscriptionProperties. - * @memberof google.pubsub.v1.StreamingPullResponse - * @interface ISubscriptionProperties - * @property {boolean|null} [exactlyOnceDeliveryEnabled] SubscriptionProperties exactlyOnceDeliveryEnabled - * @property {boolean|null} [messageOrderingEnabled] SubscriptionProperties messageOrderingEnabled - */ - - /** - * Constructs a new SubscriptionProperties. - * @memberof google.pubsub.v1.StreamingPullResponse - * @classdesc Represents a SubscriptionProperties. - * @implements ISubscriptionProperties - * @constructor - * @param {google.pubsub.v1.StreamingPullResponse.ISubscriptionProperties=} [properties] Properties to set - */ - function SubscriptionProperties(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * SubscriptionProperties exactlyOnceDeliveryEnabled. - * @member {boolean} exactlyOnceDeliveryEnabled - * @memberof google.pubsub.v1.StreamingPullResponse.SubscriptionProperties - * @instance - */ - SubscriptionProperties.prototype.exactlyOnceDeliveryEnabled = false; - - /** - * SubscriptionProperties messageOrderingEnabled. - * @member {boolean} messageOrderingEnabled - * @memberof google.pubsub.v1.StreamingPullResponse.SubscriptionProperties - * @instance - */ - SubscriptionProperties.prototype.messageOrderingEnabled = false; - - /** - * Creates a new SubscriptionProperties instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.StreamingPullResponse.SubscriptionProperties - * @static - * @param {google.pubsub.v1.StreamingPullResponse.ISubscriptionProperties=} [properties] Properties to set - * @returns {google.pubsub.v1.StreamingPullResponse.SubscriptionProperties} SubscriptionProperties instance - */ - SubscriptionProperties.create = function create(properties) { - return new SubscriptionProperties(properties); - }; - - /** - * Encodes the specified SubscriptionProperties message. Does not implicitly {@link google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.StreamingPullResponse.SubscriptionProperties - * @static - * @param {google.pubsub.v1.StreamingPullResponse.ISubscriptionProperties} message SubscriptionProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SubscriptionProperties.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.exactlyOnceDeliveryEnabled != null && Object.hasOwnProperty.call(message, "exactlyOnceDeliveryEnabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.exactlyOnceDeliveryEnabled); - if (message.messageOrderingEnabled != null && Object.hasOwnProperty.call(message, "messageOrderingEnabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.messageOrderingEnabled); - return writer; - }; - - /** - * Encodes the specified SubscriptionProperties message, length delimited. Does not implicitly {@link google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.StreamingPullResponse.SubscriptionProperties - * @static - * @param {google.pubsub.v1.StreamingPullResponse.ISubscriptionProperties} message SubscriptionProperties message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SubscriptionProperties.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a SubscriptionProperties message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.StreamingPullResponse.SubscriptionProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.StreamingPullResponse.SubscriptionProperties} SubscriptionProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SubscriptionProperties.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.exactlyOnceDeliveryEnabled = reader.bool(); - break; - } - case 2: { - message.messageOrderingEnabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a SubscriptionProperties message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.StreamingPullResponse.SubscriptionProperties - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.StreamingPullResponse.SubscriptionProperties} SubscriptionProperties - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SubscriptionProperties.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SubscriptionProperties message. - * @function verify - * @memberof google.pubsub.v1.StreamingPullResponse.SubscriptionProperties - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SubscriptionProperties.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.exactlyOnceDeliveryEnabled != null && Object.hasOwnProperty.call(message, "exactlyOnceDeliveryEnabled")) - if (typeof message.exactlyOnceDeliveryEnabled !== "boolean") - return "exactlyOnceDeliveryEnabled: boolean expected"; - if (message.messageOrderingEnabled != null && Object.hasOwnProperty.call(message, "messageOrderingEnabled")) - if (typeof message.messageOrderingEnabled !== "boolean") - return "messageOrderingEnabled: boolean expected"; - return null; - }; - - /** - * Creates a SubscriptionProperties message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.StreamingPullResponse.SubscriptionProperties - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.StreamingPullResponse.SubscriptionProperties} SubscriptionProperties - */ - SubscriptionProperties.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.StreamingPullResponse.SubscriptionProperties: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties(); - if (object.exactlyOnceDeliveryEnabled != null) - message.exactlyOnceDeliveryEnabled = Boolean(object.exactlyOnceDeliveryEnabled); - if (object.messageOrderingEnabled != null) - message.messageOrderingEnabled = Boolean(object.messageOrderingEnabled); - return message; - }; - - /** - * Creates a plain object from a SubscriptionProperties message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.StreamingPullResponse.SubscriptionProperties - * @static - * @param {google.pubsub.v1.StreamingPullResponse.SubscriptionProperties} message SubscriptionProperties - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SubscriptionProperties.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.exactlyOnceDeliveryEnabled = false; - object.messageOrderingEnabled = false; - } - if (message.exactlyOnceDeliveryEnabled != null && Object.hasOwnProperty.call(message, "exactlyOnceDeliveryEnabled")) - object.exactlyOnceDeliveryEnabled = message.exactlyOnceDeliveryEnabled; - if (message.messageOrderingEnabled != null && Object.hasOwnProperty.call(message, "messageOrderingEnabled")) - object.messageOrderingEnabled = message.messageOrderingEnabled; - return object; - }; - - /** - * Converts this SubscriptionProperties to JSON. - * @function toJSON - * @memberof google.pubsub.v1.StreamingPullResponse.SubscriptionProperties - * @instance - * @returns {Object.} JSON object - */ - SubscriptionProperties.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SubscriptionProperties - * @function getTypeUrl - * @memberof google.pubsub.v1.StreamingPullResponse.SubscriptionProperties - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SubscriptionProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.StreamingPullResponse.SubscriptionProperties"; - }; - - return SubscriptionProperties; - })(); - - return StreamingPullResponse; - })(); - - v1.CreateSnapshotRequest = (function() { - - /** - * Properties of a CreateSnapshotRequest. - * @memberof google.pubsub.v1 - * @interface ICreateSnapshotRequest - * @property {string|null} [name] CreateSnapshotRequest name - * @property {string|null} [subscription] CreateSnapshotRequest subscription - * @property {Object.|null} [labels] CreateSnapshotRequest labels - * @property {Object.|null} [tags] CreateSnapshotRequest tags - */ - - /** - * Constructs a new CreateSnapshotRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a CreateSnapshotRequest. - * @implements ICreateSnapshotRequest - * @constructor - * @param {google.pubsub.v1.ICreateSnapshotRequest=} [properties] Properties to set - */ - function CreateSnapshotRequest(properties) { - this.labels = {}; - this.tags = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateSnapshotRequest name. - * @member {string} name - * @memberof google.pubsub.v1.CreateSnapshotRequest - * @instance - */ - CreateSnapshotRequest.prototype.name = ""; - - /** - * CreateSnapshotRequest subscription. - * @member {string} subscription - * @memberof google.pubsub.v1.CreateSnapshotRequest - * @instance - */ - CreateSnapshotRequest.prototype.subscription = ""; - - /** - * CreateSnapshotRequest labels. - * @member {Object.} labels - * @memberof google.pubsub.v1.CreateSnapshotRequest - * @instance - */ - CreateSnapshotRequest.prototype.labels = $util.emptyObject; - - /** - * CreateSnapshotRequest tags. - * @member {Object.} tags - * @memberof google.pubsub.v1.CreateSnapshotRequest - * @instance - */ - CreateSnapshotRequest.prototype.tags = $util.emptyObject; - - /** - * Creates a new CreateSnapshotRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.CreateSnapshotRequest - * @static - * @param {google.pubsub.v1.ICreateSnapshotRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.CreateSnapshotRequest} CreateSnapshotRequest instance - */ - CreateSnapshotRequest.create = function create(properties) { - return new CreateSnapshotRequest(properties); - }; - - /** - * Encodes the specified CreateSnapshotRequest message. Does not implicitly {@link google.pubsub.v1.CreateSnapshotRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.CreateSnapshotRequest - * @static - * @param {google.pubsub.v1.ICreateSnapshotRequest} message CreateSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSnapshotRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subscription); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) - for (var keys = Object.keys(message.tags), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.tags[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateSnapshotRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.CreateSnapshotRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.CreateSnapshotRequest - * @static - * @param {google.pubsub.v1.ICreateSnapshotRequest} message CreateSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a CreateSnapshotRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.CreateSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.CreateSnapshotRequest} CreateSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSnapshotRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.CreateSnapshotRequest(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.subscription = reader.string(); - break; - } - case 3: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7, long); - break; - } - } - if (key === "__proto__") - $util.makeProp(message.labels, key); - message.labels[key] = value; - break; - } - case 4: { - if (message.tags === $util.emptyObject) - message.tags = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7, long); - break; - } - } - if (key === "__proto__") - $util.makeProp(message.tags, key); - message.tags[key] = value; - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a CreateSnapshotRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.CreateSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.CreateSnapshotRequest} CreateSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateSnapshotRequest message. - * @function verify - * @memberof google.pubsub.v1.CreateSnapshotRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateSnapshotRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - if (!$util.isString(message.subscription)) - return "subscription: string expected"; - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.tags != null && Object.hasOwnProperty.call(message, "tags")) { - if (!$util.isObject(message.tags)) - return "tags: object expected"; - var key = Object.keys(message.tags); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.tags[key[i]])) - return "tags: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a CreateSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.CreateSnapshotRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.CreateSnapshotRequest} CreateSnapshotRequest - */ - CreateSnapshotRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.CreateSnapshotRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.CreateSnapshotRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.CreateSnapshotRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.subscription != null) - message.subscription = String(object.subscription); - if (object.labels) { - if (!$util.isObject(object.labels)) - throw TypeError(".google.pubsub.v1.CreateSnapshotRequest.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) { - if (keys[i] === "__proto__") - $util.makeProp(message.labels, keys[i]); - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - } - if (object.tags) { - if (!$util.isObject(object.tags)) - throw TypeError(".google.pubsub.v1.CreateSnapshotRequest.tags: object expected"); - message.tags = {}; - for (var keys = Object.keys(object.tags), i = 0; i < keys.length; ++i) { - if (keys[i] === "__proto__") - $util.makeProp(message.tags, keys[i]); - message.tags[keys[i]] = String(object.tags[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a CreateSnapshotRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.CreateSnapshotRequest - * @static - * @param {google.pubsub.v1.CreateSnapshotRequest} message CreateSnapshotRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateSnapshotRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.objects || options.defaults) { - object.labels = {}; - object.tags = {}; - } - if (options.defaults) { - object.name = ""; - object.subscription = ""; - } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - object.name = message.name; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - object.subscription = message.subscription; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) { - if (keys2[j] === "__proto__") - $util.makeProp(object.labels, keys2[j]); - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - } - if (message.tags && (keys2 = Object.keys(message.tags)).length) { - object.tags = {}; - for (var j = 0; j < keys2.length; ++j) { - if (keys2[j] === "__proto__") - $util.makeProp(object.tags, keys2[j]); - object.tags[keys2[j]] = message.tags[keys2[j]]; - } - } - return object; - }; - - /** - * Converts this CreateSnapshotRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.CreateSnapshotRequest - * @instance - * @returns {Object.} JSON object - */ - CreateSnapshotRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateSnapshotRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.CreateSnapshotRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.CreateSnapshotRequest"; - }; - - return CreateSnapshotRequest; - })(); - - v1.UpdateSnapshotRequest = (function() { - - /** - * Properties of an UpdateSnapshotRequest. - * @memberof google.pubsub.v1 - * @interface IUpdateSnapshotRequest - * @property {google.pubsub.v1.ISnapshot|null} [snapshot] UpdateSnapshotRequest snapshot - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSnapshotRequest updateMask - */ - - /** - * Constructs a new UpdateSnapshotRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents an UpdateSnapshotRequest. - * @implements IUpdateSnapshotRequest - * @constructor - * @param {google.pubsub.v1.IUpdateSnapshotRequest=} [properties] Properties to set - */ - function UpdateSnapshotRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateSnapshotRequest snapshot. - * @member {google.pubsub.v1.ISnapshot|null|undefined} snapshot - * @memberof google.pubsub.v1.UpdateSnapshotRequest - * @instance - */ - UpdateSnapshotRequest.prototype.snapshot = null; - - /** - * UpdateSnapshotRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.pubsub.v1.UpdateSnapshotRequest - * @instance - */ - UpdateSnapshotRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateSnapshotRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.UpdateSnapshotRequest - * @static - * @param {google.pubsub.v1.IUpdateSnapshotRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.UpdateSnapshotRequest} UpdateSnapshotRequest instance - */ - UpdateSnapshotRequest.create = function create(properties) { - return new UpdateSnapshotRequest(properties); - }; - - /** - * Encodes the specified UpdateSnapshotRequest message. Does not implicitly {@link google.pubsub.v1.UpdateSnapshotRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.UpdateSnapshotRequest - * @static - * @param {google.pubsub.v1.IUpdateSnapshotRequest} message UpdateSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSnapshotRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) - $root.google.pubsub.v1.Snapshot.encode(message.snapshot, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateSnapshotRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.UpdateSnapshotRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.UpdateSnapshotRequest - * @static - * @param {google.pubsub.v1.IUpdateSnapshotRequest} message UpdateSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an UpdateSnapshotRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.UpdateSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.UpdateSnapshotRequest} UpdateSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSnapshotRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.UpdateSnapshotRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.snapshot = $root.google.pubsub.v1.Snapshot.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateSnapshotRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.UpdateSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.UpdateSnapshotRequest} UpdateSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateSnapshotRequest message. - * @function verify - * @memberof google.pubsub.v1.UpdateSnapshotRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateSnapshotRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) { - var error = $root.google.pubsub.v1.Snapshot.verify(message.snapshot, long + 1); - if (error) - return "snapshot." + error; - } - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); - if (error) - return "updateMask." + error; - } - return null; - }; - - /** - * Creates an UpdateSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.UpdateSnapshotRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.UpdateSnapshotRequest} UpdateSnapshotRequest - */ - UpdateSnapshotRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.UpdateSnapshotRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.UpdateSnapshotRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.UpdateSnapshotRequest(); - if (object.snapshot != null) { - if (!$util.isObject(object.snapshot)) - throw TypeError(".google.pubsub.v1.UpdateSnapshotRequest.snapshot: object expected"); - message.snapshot = $root.google.pubsub.v1.Snapshot.fromObject(object.snapshot, long + 1); - } - if (object.updateMask != null) { - if (!$util.isObject(object.updateMask)) - throw TypeError(".google.pubsub.v1.UpdateSnapshotRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); - } - return message; - }; - - /** - * Creates a plain object from an UpdateSnapshotRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.UpdateSnapshotRequest - * @static - * @param {google.pubsub.v1.UpdateSnapshotRequest} message UpdateSnapshotRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateSnapshotRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.snapshot = null; - object.updateMask = null; - } - if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) - object.snapshot = $root.google.pubsub.v1.Snapshot.toObject(message.snapshot, options, q + 1); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options, q + 1); - return object; - }; - - /** - * Converts this UpdateSnapshotRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.UpdateSnapshotRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateSnapshotRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateSnapshotRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.UpdateSnapshotRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.UpdateSnapshotRequest"; - }; - - return UpdateSnapshotRequest; - })(); - - v1.Snapshot = (function() { - - /** - * Properties of a Snapshot. - * @memberof google.pubsub.v1 - * @interface ISnapshot - * @property {string|null} [name] Snapshot name - * @property {string|null} [topic] Snapshot topic - * @property {google.protobuf.ITimestamp|null} [expireTime] Snapshot expireTime - * @property {Object.|null} [labels] Snapshot labels - */ - - /** - * Constructs a new Snapshot. - * @memberof google.pubsub.v1 - * @classdesc Represents a Snapshot. - * @implements ISnapshot - * @constructor - * @param {google.pubsub.v1.ISnapshot=} [properties] Properties to set - */ - function Snapshot(properties) { - this.labels = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Snapshot name. - * @member {string} name - * @memberof google.pubsub.v1.Snapshot - * @instance - */ - Snapshot.prototype.name = ""; - - /** - * Snapshot topic. - * @member {string} topic - * @memberof google.pubsub.v1.Snapshot - * @instance - */ - Snapshot.prototype.topic = ""; - - /** - * Snapshot expireTime. - * @member {google.protobuf.ITimestamp|null|undefined} expireTime - * @memberof google.pubsub.v1.Snapshot - * @instance - */ - Snapshot.prototype.expireTime = null; - - /** - * Snapshot labels. - * @member {Object.} labels - * @memberof google.pubsub.v1.Snapshot - * @instance - */ - Snapshot.prototype.labels = $util.emptyObject; - - /** - * Creates a new Snapshot instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.Snapshot - * @static - * @param {google.pubsub.v1.ISnapshot=} [properties] Properties to set - * @returns {google.pubsub.v1.Snapshot} Snapshot instance - */ - Snapshot.create = function create(properties) { - return new Snapshot(properties); - }; - - /** - * Encodes the specified Snapshot message. Does not implicitly {@link google.pubsub.v1.Snapshot.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.Snapshot - * @static - * @param {google.pubsub.v1.ISnapshot} message Snapshot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Snapshot.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.topic); - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified Snapshot message, length delimited. Does not implicitly {@link google.pubsub.v1.Snapshot.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.Snapshot - * @static - * @param {google.pubsub.v1.ISnapshot} message Snapshot message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Snapshot.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a Snapshot message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.Snapshot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.Snapshot} Snapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Snapshot.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.Snapshot(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.topic = reader.string(); - break; - } - case 3: { - message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 4: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7, long); - break; - } - } - if (key === "__proto__") - $util.makeProp(message.labels, key); - message.labels[key] = value; - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a Snapshot message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.Snapshot - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.Snapshot} Snapshot - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Snapshot.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Snapshot message. - * @function verify - * @memberof google.pubsub.v1.Snapshot - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Snapshot.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - if (!$util.isString(message.topic)) - return "topic: string expected"; - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.expireTime, long + 1); - if (error) - return "expireTime." + error; - } - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a Snapshot message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.Snapshot - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.Snapshot} Snapshot - */ - Snapshot.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.Snapshot) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.Snapshot: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.Snapshot(); - if (object.name != null) - message.name = String(object.name); - if (object.topic != null) - message.topic = String(object.topic); - if (object.expireTime != null) { - if (!$util.isObject(object.expireTime)) - throw TypeError(".google.pubsub.v1.Snapshot.expireTime: object expected"); - message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime, long + 1); - } - if (object.labels) { - if (!$util.isObject(object.labels)) - throw TypeError(".google.pubsub.v1.Snapshot.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) { - if (keys[i] === "__proto__") - $util.makeProp(message.labels, keys[i]); - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a Snapshot message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.Snapshot - * @static - * @param {google.pubsub.v1.Snapshot} message Snapshot - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Snapshot.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.topic = ""; - object.expireTime = null; - } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - object.name = message.name; - if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) - object.topic = message.topic; - if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) - object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options, q + 1); - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) { - if (keys2[j] === "__proto__") - $util.makeProp(object.labels, keys2[j]); - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - } - return object; - }; - - /** - * Converts this Snapshot to JSON. - * @function toJSON - * @memberof google.pubsub.v1.Snapshot - * @instance - * @returns {Object.} JSON object - */ - Snapshot.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Snapshot - * @function getTypeUrl - * @memberof google.pubsub.v1.Snapshot - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Snapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.Snapshot"; - }; - - return Snapshot; - })(); - - v1.GetSnapshotRequest = (function() { - - /** - * Properties of a GetSnapshotRequest. - * @memberof google.pubsub.v1 - * @interface IGetSnapshotRequest - * @property {string|null} [snapshot] GetSnapshotRequest snapshot - */ - - /** - * Constructs a new GetSnapshotRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a GetSnapshotRequest. - * @implements IGetSnapshotRequest - * @constructor - * @param {google.pubsub.v1.IGetSnapshotRequest=} [properties] Properties to set - */ - function GetSnapshotRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetSnapshotRequest snapshot. - * @member {string} snapshot - * @memberof google.pubsub.v1.GetSnapshotRequest - * @instance - */ - GetSnapshotRequest.prototype.snapshot = ""; - - /** - * Creates a new GetSnapshotRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.GetSnapshotRequest - * @static - * @param {google.pubsub.v1.IGetSnapshotRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.GetSnapshotRequest} GetSnapshotRequest instance - */ - GetSnapshotRequest.create = function create(properties) { - return new GetSnapshotRequest(properties); - }; - - /** - * Encodes the specified GetSnapshotRequest message. Does not implicitly {@link google.pubsub.v1.GetSnapshotRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.GetSnapshotRequest - * @static - * @param {google.pubsub.v1.IGetSnapshotRequest} message GetSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSnapshotRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.snapshot); - return writer; - }; - - /** - * Encodes the specified GetSnapshotRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.GetSnapshotRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.GetSnapshotRequest - * @static - * @param {google.pubsub.v1.IGetSnapshotRequest} message GetSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a GetSnapshotRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.GetSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.GetSnapshotRequest} GetSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSnapshotRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.GetSnapshotRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.snapshot = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a GetSnapshotRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.GetSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.GetSnapshotRequest} GetSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSnapshotRequest message. - * @function verify - * @memberof google.pubsub.v1.GetSnapshotRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSnapshotRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) - if (!$util.isString(message.snapshot)) - return "snapshot: string expected"; - return null; - }; - - /** - * Creates a GetSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.GetSnapshotRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.GetSnapshotRequest} GetSnapshotRequest - */ - GetSnapshotRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.GetSnapshotRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.GetSnapshotRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.GetSnapshotRequest(); - if (object.snapshot != null) - message.snapshot = String(object.snapshot); - return message; - }; - - /** - * Creates a plain object from a GetSnapshotRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.GetSnapshotRequest - * @static - * @param {google.pubsub.v1.GetSnapshotRequest} message GetSnapshotRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSnapshotRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.snapshot = ""; - if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) - object.snapshot = message.snapshot; - return object; - }; - - /** - * Converts this GetSnapshotRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.GetSnapshotRequest - * @instance - * @returns {Object.} JSON object - */ - GetSnapshotRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetSnapshotRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.GetSnapshotRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.GetSnapshotRequest"; - }; - - return GetSnapshotRequest; - })(); - - v1.ListSnapshotsRequest = (function() { - - /** - * Properties of a ListSnapshotsRequest. - * @memberof google.pubsub.v1 - * @interface IListSnapshotsRequest - * @property {string|null} [project] ListSnapshotsRequest project - * @property {number|null} [pageSize] ListSnapshotsRequest pageSize - * @property {string|null} [pageToken] ListSnapshotsRequest pageToken - */ - - /** - * Constructs a new ListSnapshotsRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a ListSnapshotsRequest. - * @implements IListSnapshotsRequest - * @constructor - * @param {google.pubsub.v1.IListSnapshotsRequest=} [properties] Properties to set - */ - function ListSnapshotsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSnapshotsRequest project. - * @member {string} project - * @memberof google.pubsub.v1.ListSnapshotsRequest - * @instance - */ - ListSnapshotsRequest.prototype.project = ""; - - /** - * ListSnapshotsRequest pageSize. - * @member {number} pageSize - * @memberof google.pubsub.v1.ListSnapshotsRequest - * @instance - */ - ListSnapshotsRequest.prototype.pageSize = 0; - - /** - * ListSnapshotsRequest pageToken. - * @member {string} pageToken - * @memberof google.pubsub.v1.ListSnapshotsRequest - * @instance - */ - ListSnapshotsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListSnapshotsRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ListSnapshotsRequest - * @static - * @param {google.pubsub.v1.IListSnapshotsRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.ListSnapshotsRequest} ListSnapshotsRequest instance - */ - ListSnapshotsRequest.create = function create(properties) { - return new ListSnapshotsRequest(properties); - }; - - /** - * Encodes the specified ListSnapshotsRequest message. Does not implicitly {@link google.pubsub.v1.ListSnapshotsRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ListSnapshotsRequest - * @static - * @param {google.pubsub.v1.IListSnapshotsRequest} message ListSnapshotsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSnapshotsRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListSnapshotsRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSnapshotsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ListSnapshotsRequest - * @static - * @param {google.pubsub.v1.IListSnapshotsRequest} message ListSnapshotsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSnapshotsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ListSnapshotsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ListSnapshotsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ListSnapshotsRequest} ListSnapshotsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSnapshotsRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ListSnapshotsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.project = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ListSnapshotsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ListSnapshotsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ListSnapshotsRequest} ListSnapshotsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSnapshotsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSnapshotsRequest message. - * @function verify - * @memberof google.pubsub.v1.ListSnapshotsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSnapshotsRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListSnapshotsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ListSnapshotsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ListSnapshotsRequest} ListSnapshotsRequest - */ - ListSnapshotsRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ListSnapshotsRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ListSnapshotsRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ListSnapshotsRequest(); - if (object.project != null) - message.project = String(object.project); - 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 ListSnapshotsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ListSnapshotsRequest - * @static - * @param {google.pubsub.v1.ListSnapshotsRequest} message ListSnapshotsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListSnapshotsRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.project = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - object.project = message.project; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListSnapshotsRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ListSnapshotsRequest - * @instance - * @returns {Object.} JSON object - */ - ListSnapshotsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListSnapshotsRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.ListSnapshotsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListSnapshotsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ListSnapshotsRequest"; - }; - - return ListSnapshotsRequest; - })(); - - v1.ListSnapshotsResponse = (function() { - - /** - * Properties of a ListSnapshotsResponse. - * @memberof google.pubsub.v1 - * @interface IListSnapshotsResponse - * @property {Array.|null} [snapshots] ListSnapshotsResponse snapshots - * @property {string|null} [nextPageToken] ListSnapshotsResponse nextPageToken - */ - - /** - * Constructs a new ListSnapshotsResponse. - * @memberof google.pubsub.v1 - * @classdesc Represents a ListSnapshotsResponse. - * @implements IListSnapshotsResponse - * @constructor - * @param {google.pubsub.v1.IListSnapshotsResponse=} [properties] Properties to set - */ - function ListSnapshotsResponse(properties) { - this.snapshots = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSnapshotsResponse snapshots. - * @member {Array.} snapshots - * @memberof google.pubsub.v1.ListSnapshotsResponse - * @instance - */ - ListSnapshotsResponse.prototype.snapshots = $util.emptyArray; - - /** - * ListSnapshotsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.pubsub.v1.ListSnapshotsResponse - * @instance - */ - ListSnapshotsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListSnapshotsResponse instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ListSnapshotsResponse - * @static - * @param {google.pubsub.v1.IListSnapshotsResponse=} [properties] Properties to set - * @returns {google.pubsub.v1.ListSnapshotsResponse} ListSnapshotsResponse instance - */ - ListSnapshotsResponse.create = function create(properties) { - return new ListSnapshotsResponse(properties); - }; - - /** - * Encodes the specified ListSnapshotsResponse message. Does not implicitly {@link google.pubsub.v1.ListSnapshotsResponse.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ListSnapshotsResponse - * @static - * @param {google.pubsub.v1.IListSnapshotsResponse} message ListSnapshotsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSnapshotsResponse.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.snapshots != null && message.snapshots.length) - for (var i = 0; i < message.snapshots.length; ++i) - $root.google.pubsub.v1.Snapshot.encode(message.snapshots[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListSnapshotsResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSnapshotsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ListSnapshotsResponse - * @static - * @param {google.pubsub.v1.IListSnapshotsResponse} message ListSnapshotsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSnapshotsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ListSnapshotsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ListSnapshotsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ListSnapshotsResponse} ListSnapshotsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSnapshotsResponse.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ListSnapshotsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.snapshots && message.snapshots.length)) - message.snapshots = []; - message.snapshots.push($root.google.pubsub.v1.Snapshot.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ListSnapshotsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ListSnapshotsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ListSnapshotsResponse} ListSnapshotsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSnapshotsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSnapshotsResponse message. - * @function verify - * @memberof google.pubsub.v1.ListSnapshotsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSnapshotsResponse.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.snapshots != null && Object.hasOwnProperty.call(message, "snapshots")) { - if (!Array.isArray(message.snapshots)) - return "snapshots: array expected"; - for (var i = 0; i < message.snapshots.length; ++i) { - var error = $root.google.pubsub.v1.Snapshot.verify(message.snapshots[i], long + 1); - if (error) - return "snapshots." + error; - } - } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListSnapshotsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ListSnapshotsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ListSnapshotsResponse} ListSnapshotsResponse - */ - ListSnapshotsResponse.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ListSnapshotsResponse) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ListSnapshotsResponse: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ListSnapshotsResponse(); - if (object.snapshots) { - if (!Array.isArray(object.snapshots)) - throw TypeError(".google.pubsub.v1.ListSnapshotsResponse.snapshots: array expected"); - message.snapshots = []; - for (var i = 0; i < object.snapshots.length; ++i) { - if (!$util.isObject(object.snapshots[i])) - throw TypeError(".google.pubsub.v1.ListSnapshotsResponse.snapshots: object expected"); - message.snapshots[i] = $root.google.pubsub.v1.Snapshot.fromObject(object.snapshots[i], long + 1); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListSnapshotsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ListSnapshotsResponse - * @static - * @param {google.pubsub.v1.ListSnapshotsResponse} message ListSnapshotsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListSnapshotsResponse.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.snapshots = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.snapshots && message.snapshots.length) { - object.snapshots = []; - for (var j = 0; j < message.snapshots.length; ++j) - object.snapshots[j] = $root.google.pubsub.v1.Snapshot.toObject(message.snapshots[j], options, q + 1); - } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListSnapshotsResponse to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ListSnapshotsResponse - * @instance - * @returns {Object.} JSON object - */ - ListSnapshotsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListSnapshotsResponse - * @function getTypeUrl - * @memberof google.pubsub.v1.ListSnapshotsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListSnapshotsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ListSnapshotsResponse"; - }; - - return ListSnapshotsResponse; - })(); - - v1.DeleteSnapshotRequest = (function() { - - /** - * Properties of a DeleteSnapshotRequest. - * @memberof google.pubsub.v1 - * @interface IDeleteSnapshotRequest - * @property {string|null} [snapshot] DeleteSnapshotRequest snapshot - */ - - /** - * Constructs a new DeleteSnapshotRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a DeleteSnapshotRequest. - * @implements IDeleteSnapshotRequest - * @constructor - * @param {google.pubsub.v1.IDeleteSnapshotRequest=} [properties] Properties to set - */ - function DeleteSnapshotRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteSnapshotRequest snapshot. - * @member {string} snapshot - * @memberof google.pubsub.v1.DeleteSnapshotRequest - * @instance - */ - DeleteSnapshotRequest.prototype.snapshot = ""; - - /** - * Creates a new DeleteSnapshotRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.DeleteSnapshotRequest - * @static - * @param {google.pubsub.v1.IDeleteSnapshotRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.DeleteSnapshotRequest} DeleteSnapshotRequest instance - */ - DeleteSnapshotRequest.create = function create(properties) { - return new DeleteSnapshotRequest(properties); - }; - - /** - * Encodes the specified DeleteSnapshotRequest message. Does not implicitly {@link google.pubsub.v1.DeleteSnapshotRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.DeleteSnapshotRequest - * @static - * @param {google.pubsub.v1.IDeleteSnapshotRequest} message DeleteSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSnapshotRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.snapshot); - return writer; - }; - - /** - * Encodes the specified DeleteSnapshotRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.DeleteSnapshotRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.DeleteSnapshotRequest - * @static - * @param {google.pubsub.v1.IDeleteSnapshotRequest} message DeleteSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a DeleteSnapshotRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.DeleteSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.DeleteSnapshotRequest} DeleteSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSnapshotRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.DeleteSnapshotRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.snapshot = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteSnapshotRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.DeleteSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.DeleteSnapshotRequest} DeleteSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteSnapshotRequest message. - * @function verify - * @memberof google.pubsub.v1.DeleteSnapshotRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteSnapshotRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) - if (!$util.isString(message.snapshot)) - return "snapshot: string expected"; - return null; - }; - - /** - * Creates a DeleteSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.DeleteSnapshotRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.DeleteSnapshotRequest} DeleteSnapshotRequest - */ - DeleteSnapshotRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.DeleteSnapshotRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.DeleteSnapshotRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.DeleteSnapshotRequest(); - if (object.snapshot != null) - message.snapshot = String(object.snapshot); - return message; - }; - - /** - * Creates a plain object from a DeleteSnapshotRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.DeleteSnapshotRequest - * @static - * @param {google.pubsub.v1.DeleteSnapshotRequest} message DeleteSnapshotRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteSnapshotRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.snapshot = ""; - if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) - object.snapshot = message.snapshot; - return object; - }; - - /** - * Converts this DeleteSnapshotRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.DeleteSnapshotRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteSnapshotRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteSnapshotRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.DeleteSnapshotRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.DeleteSnapshotRequest"; - }; - - return DeleteSnapshotRequest; - })(); - - v1.SeekRequest = (function() { - - /** - * Properties of a SeekRequest. - * @memberof google.pubsub.v1 - * @interface ISeekRequest - * @property {string|null} [subscription] SeekRequest subscription - * @property {google.protobuf.ITimestamp|null} [time] SeekRequest time - * @property {string|null} [snapshot] SeekRequest snapshot - */ - - /** - * Constructs a new SeekRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a SeekRequest. - * @implements ISeekRequest - * @constructor - * @param {google.pubsub.v1.ISeekRequest=} [properties] Properties to set - */ - function SeekRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * SeekRequest subscription. - * @member {string} subscription - * @memberof google.pubsub.v1.SeekRequest - * @instance - */ - SeekRequest.prototype.subscription = ""; - - /** - * SeekRequest time. - * @member {google.protobuf.ITimestamp|null|undefined} time - * @memberof google.pubsub.v1.SeekRequest - * @instance - */ - SeekRequest.prototype.time = null; - - /** - * SeekRequest snapshot. - * @member {string|null|undefined} snapshot - * @memberof google.pubsub.v1.SeekRequest - * @instance - */ - SeekRequest.prototype.snapshot = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * SeekRequest target. - * @member {"time"|"snapshot"|undefined} target - * @memberof google.pubsub.v1.SeekRequest - * @instance - */ - Object.defineProperty(SeekRequest.prototype, "target", { - get: $util.oneOfGetter($oneOfFields = ["time", "snapshot"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SeekRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.SeekRequest - * @static - * @param {google.pubsub.v1.ISeekRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.SeekRequest} SeekRequest instance - */ - SeekRequest.create = function create(properties) { - return new SeekRequest(properties); - }; - - /** - * Encodes the specified SeekRequest message. Does not implicitly {@link google.pubsub.v1.SeekRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.SeekRequest - * @static - * @param {google.pubsub.v1.ISeekRequest} message SeekRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SeekRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subscription); - if (message.time != null && Object.hasOwnProperty.call(message, "time")) - $root.google.protobuf.Timestamp.encode(message.time, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.snapshot); - return writer; - }; - - /** - * Encodes the specified SeekRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.SeekRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.SeekRequest - * @static - * @param {google.pubsub.v1.ISeekRequest} message SeekRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SeekRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a SeekRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.SeekRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.SeekRequest} SeekRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SeekRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.SeekRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.subscription = reader.string(); - break; - } - case 2: { - message.time = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 3: { - message.snapshot = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a SeekRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.SeekRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.SeekRequest} SeekRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SeekRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SeekRequest message. - * @function verify - * @memberof google.pubsub.v1.SeekRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SeekRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - if (!$util.isString(message.subscription)) - return "subscription: string expected"; - if (message.time != null && Object.hasOwnProperty.call(message, "time")) { - properties.target = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.time, long + 1); - if (error) - return "time." + error; - } - } - if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) { - if (properties.target === 1) - return "target: multiple values"; - properties.target = 1; - if (!$util.isString(message.snapshot)) - return "snapshot: string expected"; - } - return null; - }; - - /** - * Creates a SeekRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.SeekRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.SeekRequest} SeekRequest - */ - SeekRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.SeekRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.SeekRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.SeekRequest(); - if (object.subscription != null) - message.subscription = String(object.subscription); - if (object.time != null) { - if (!$util.isObject(object.time)) - throw TypeError(".google.pubsub.v1.SeekRequest.time: object expected"); - message.time = $root.google.protobuf.Timestamp.fromObject(object.time, long + 1); - } - if (object.snapshot != null) - message.snapshot = String(object.snapshot); - return message; - }; - - /** - * Creates a plain object from a SeekRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.SeekRequest - * @static - * @param {google.pubsub.v1.SeekRequest} message SeekRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SeekRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.subscription = ""; - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - object.subscription = message.subscription; - if (message.time != null && Object.hasOwnProperty.call(message, "time")) { - object.time = $root.google.protobuf.Timestamp.toObject(message.time, options, q + 1); - if (options.oneofs) - object.target = "time"; - } - if (message.snapshot != null && Object.hasOwnProperty.call(message, "snapshot")) { - object.snapshot = message.snapshot; - if (options.oneofs) - object.target = "snapshot"; - } - return object; - }; - - /** - * Converts this SeekRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.SeekRequest - * @instance - * @returns {Object.} JSON object - */ - SeekRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SeekRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.SeekRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SeekRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.SeekRequest"; - }; - - return SeekRequest; - })(); - - v1.SeekResponse = (function() { - - /** - * Properties of a SeekResponse. - * @memberof google.pubsub.v1 - * @interface ISeekResponse - */ - - /** - * Constructs a new SeekResponse. - * @memberof google.pubsub.v1 - * @classdesc Represents a SeekResponse. - * @implements ISeekResponse - * @constructor - * @param {google.pubsub.v1.ISeekResponse=} [properties] Properties to set - */ - function SeekResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new SeekResponse instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.SeekResponse - * @static - * @param {google.pubsub.v1.ISeekResponse=} [properties] Properties to set - * @returns {google.pubsub.v1.SeekResponse} SeekResponse instance - */ - SeekResponse.create = function create(properties) { - return new SeekResponse(properties); - }; - - /** - * Encodes the specified SeekResponse message. Does not implicitly {@link google.pubsub.v1.SeekResponse.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.SeekResponse - * @static - * @param {google.pubsub.v1.ISeekResponse} message SeekResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SeekResponse.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - return writer; - }; - - /** - * Encodes the specified SeekResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.SeekResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.SeekResponse - * @static - * @param {google.pubsub.v1.ISeekResponse} message SeekResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SeekResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a SeekResponse message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.SeekResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.SeekResponse} SeekResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SeekResponse.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.SeekResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a SeekResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.SeekResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.SeekResponse} SeekResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SeekResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SeekResponse message. - * @function verify - * @memberof google.pubsub.v1.SeekResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SeekResponse.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - return null; - }; - - /** - * Creates a SeekResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.SeekResponse - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.SeekResponse} SeekResponse - */ - SeekResponse.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.SeekResponse) - return object; - return new $root.google.pubsub.v1.SeekResponse(); - }; - - /** - * Creates a plain object from a SeekResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.SeekResponse - * @static - * @param {google.pubsub.v1.SeekResponse} message SeekResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SeekResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SeekResponse to JSON. - * @function toJSON - * @memberof google.pubsub.v1.SeekResponse - * @instance - * @returns {Object.} JSON object - */ - SeekResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SeekResponse - * @function getTypeUrl - * @memberof google.pubsub.v1.SeekResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SeekResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.SeekResponse"; - }; - - return SeekResponse; - })(); - - v1.SchemaService = (function() { - - /** - * Constructs a new SchemaService service. - * @memberof google.pubsub.v1 - * @classdesc Represents a SchemaService - * @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 SchemaService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (SchemaService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SchemaService; - - /** - * Creates new SchemaService service using the specified rpc implementation. - * @function create - * @memberof google.pubsub.v1.SchemaService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {SchemaService} RPC service. Useful where requests and/or responses are streamed. - */ - SchemaService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|createSchema}. - * @memberof google.pubsub.v1.SchemaService - * @typedef CreateSchemaCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.Schema} [response] Schema - */ - - /** - * Calls CreateSchema. - * @function createSchema - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.ICreateSchemaRequest} request CreateSchemaRequest message or plain object - * @param {google.pubsub.v1.SchemaService.CreateSchemaCallback} callback Node-style callback called with the error, if any, and Schema - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SchemaService.prototype.createSchema = function createSchema(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, createSchema, $root.google.pubsub.v1.CreateSchemaRequest, $root.google.pubsub.v1.Schema, request, callback); - }, "name", { value: "CreateSchema" }); - - /** - * Calls CreateSchema. - * @function createSchema - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.ICreateSchemaRequest} request CreateSchemaRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|getSchema}. - * @memberof google.pubsub.v1.SchemaService - * @typedef GetSchemaCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.Schema} [response] Schema - */ - - /** - * Calls GetSchema. - * @function getSchema - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.IGetSchemaRequest} request GetSchemaRequest message or plain object - * @param {google.pubsub.v1.SchemaService.GetSchemaCallback} callback Node-style callback called with the error, if any, and Schema - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SchemaService.prototype.getSchema = function getSchema(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, getSchema, $root.google.pubsub.v1.GetSchemaRequest, $root.google.pubsub.v1.Schema, request, callback); - }, "name", { value: "GetSchema" }); - - /** - * Calls GetSchema. - * @function getSchema - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.IGetSchemaRequest} request GetSchemaRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|listSchemas}. - * @memberof google.pubsub.v1.SchemaService - * @typedef ListSchemasCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.ListSchemasResponse} [response] ListSchemasResponse - */ - - /** - * Calls ListSchemas. - * @function listSchemas - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.IListSchemasRequest} request ListSchemasRequest message or plain object - * @param {google.pubsub.v1.SchemaService.ListSchemasCallback} callback Node-style callback called with the error, if any, and ListSchemasResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SchemaService.prototype.listSchemas = function listSchemas(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, listSchemas, $root.google.pubsub.v1.ListSchemasRequest, $root.google.pubsub.v1.ListSchemasResponse, request, callback); - }, "name", { value: "ListSchemas" }); - - /** - * Calls ListSchemas. - * @function listSchemas - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.IListSchemasRequest} request ListSchemasRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|listSchemaRevisions}. - * @memberof google.pubsub.v1.SchemaService - * @typedef ListSchemaRevisionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.ListSchemaRevisionsResponse} [response] ListSchemaRevisionsResponse - */ - - /** - * Calls ListSchemaRevisions. - * @function listSchemaRevisions - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.IListSchemaRevisionsRequest} request ListSchemaRevisionsRequest message or plain object - * @param {google.pubsub.v1.SchemaService.ListSchemaRevisionsCallback} callback Node-style callback called with the error, if any, and ListSchemaRevisionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SchemaService.prototype.listSchemaRevisions = function listSchemaRevisions(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, listSchemaRevisions, $root.google.pubsub.v1.ListSchemaRevisionsRequest, $root.google.pubsub.v1.ListSchemaRevisionsResponse, request, callback); - }, "name", { value: "ListSchemaRevisions" }); - - /** - * Calls ListSchemaRevisions. - * @function listSchemaRevisions - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.IListSchemaRevisionsRequest} request ListSchemaRevisionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|commitSchema}. - * @memberof google.pubsub.v1.SchemaService - * @typedef CommitSchemaCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.Schema} [response] Schema - */ - - /** - * Calls CommitSchema. - * @function commitSchema - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.ICommitSchemaRequest} request CommitSchemaRequest message or plain object - * @param {google.pubsub.v1.SchemaService.CommitSchemaCallback} callback Node-style callback called with the error, if any, and Schema - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SchemaService.prototype.commitSchema = function commitSchema(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, commitSchema, $root.google.pubsub.v1.CommitSchemaRequest, $root.google.pubsub.v1.Schema, request, callback); - }, "name", { value: "CommitSchema" }); - - /** - * Calls CommitSchema. - * @function commitSchema - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.ICommitSchemaRequest} request CommitSchemaRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|rollbackSchema}. - * @memberof google.pubsub.v1.SchemaService - * @typedef RollbackSchemaCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.Schema} [response] Schema - */ - - /** - * Calls RollbackSchema. - * @function rollbackSchema - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.IRollbackSchemaRequest} request RollbackSchemaRequest message or plain object - * @param {google.pubsub.v1.SchemaService.RollbackSchemaCallback} callback Node-style callback called with the error, if any, and Schema - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SchemaService.prototype.rollbackSchema = function rollbackSchema(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, rollbackSchema, $root.google.pubsub.v1.RollbackSchemaRequest, $root.google.pubsub.v1.Schema, request, callback); - }, "name", { value: "RollbackSchema" }); - - /** - * Calls RollbackSchema. - * @function rollbackSchema - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.IRollbackSchemaRequest} request RollbackSchemaRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|deleteSchemaRevision}. - * @memberof google.pubsub.v1.SchemaService - * @typedef DeleteSchemaRevisionCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.Schema} [response] Schema - */ - - /** - * Calls DeleteSchemaRevision. - * @function deleteSchemaRevision - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.IDeleteSchemaRevisionRequest} request DeleteSchemaRevisionRequest message or plain object - * @param {google.pubsub.v1.SchemaService.DeleteSchemaRevisionCallback} callback Node-style callback called with the error, if any, and Schema - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SchemaService.prototype.deleteSchemaRevision = function deleteSchemaRevision(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteSchemaRevision, $root.google.pubsub.v1.DeleteSchemaRevisionRequest, $root.google.pubsub.v1.Schema, request, callback); - }, "name", { value: "DeleteSchemaRevision" }); - - /** - * Calls DeleteSchemaRevision. - * @function deleteSchemaRevision - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.IDeleteSchemaRevisionRequest} request DeleteSchemaRevisionRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|deleteSchema}. - * @memberof google.pubsub.v1.SchemaService - * @typedef DeleteSchemaCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteSchema. - * @function deleteSchema - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.IDeleteSchemaRequest} request DeleteSchemaRequest message or plain object - * @param {google.pubsub.v1.SchemaService.DeleteSchemaCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SchemaService.prototype.deleteSchema = function deleteSchema(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, deleteSchema, $root.google.pubsub.v1.DeleteSchemaRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteSchema" }); - - /** - * Calls DeleteSchema. - * @function deleteSchema - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.IDeleteSchemaRequest} request DeleteSchemaRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|validateSchema}. - * @memberof google.pubsub.v1.SchemaService - * @typedef ValidateSchemaCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.ValidateSchemaResponse} [response] ValidateSchemaResponse - */ - - /** - * Calls ValidateSchema. - * @function validateSchema - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.IValidateSchemaRequest} request ValidateSchemaRequest message or plain object - * @param {google.pubsub.v1.SchemaService.ValidateSchemaCallback} callback Node-style callback called with the error, if any, and ValidateSchemaResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SchemaService.prototype.validateSchema = function validateSchema(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, validateSchema, $root.google.pubsub.v1.ValidateSchemaRequest, $root.google.pubsub.v1.ValidateSchemaResponse, request, callback); - }, "name", { value: "ValidateSchema" }); - - /** - * Calls ValidateSchema. - * @function validateSchema - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.IValidateSchemaRequest} request ValidateSchemaRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.pubsub.v1.SchemaService|validateMessage}. - * @memberof google.pubsub.v1.SchemaService - * @typedef ValidateMessageCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.pubsub.v1.ValidateMessageResponse} [response] ValidateMessageResponse - */ - - /** - * Calls ValidateMessage. - * @function validateMessage - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.IValidateMessageRequest} request ValidateMessageRequest message or plain object - * @param {google.pubsub.v1.SchemaService.ValidateMessageCallback} callback Node-style callback called with the error, if any, and ValidateMessageResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SchemaService.prototype.validateMessage = function validateMessage(request, callback) { - return $protobuf.rpc.Service.prototype.rpcCall.call(this, validateMessage, $root.google.pubsub.v1.ValidateMessageRequest, $root.google.pubsub.v1.ValidateMessageResponse, request, callback); - }, "name", { value: "ValidateMessage" }); - - /** - * Calls ValidateMessage. - * @function validateMessage - * @memberof google.pubsub.v1.SchemaService - * @instance - * @param {google.pubsub.v1.IValidateMessageRequest} request ValidateMessageRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return SchemaService; - })(); - - v1.Schema = (function() { - - /** - * Properties of a Schema. - * @memberof google.pubsub.v1 - * @interface ISchema - * @property {string|null} [name] Schema name - * @property {google.pubsub.v1.Schema.Type|null} [type] Schema type - * @property {string|null} [definition] Schema definition - * @property {string|null} [revisionId] Schema revisionId - * @property {google.protobuf.ITimestamp|null} [revisionCreateTime] Schema revisionCreateTime - */ - - /** - * Constructs a new Schema. - * @memberof google.pubsub.v1 - * @classdesc Represents a Schema. - * @implements ISchema - * @constructor - * @param {google.pubsub.v1.ISchema=} [properties] Properties to set - */ - function Schema(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Schema name. - * @member {string} name - * @memberof google.pubsub.v1.Schema - * @instance - */ - Schema.prototype.name = ""; - - /** - * Schema type. - * @member {google.pubsub.v1.Schema.Type} type - * @memberof google.pubsub.v1.Schema - * @instance - */ - Schema.prototype.type = 0; - - /** - * Schema definition. - * @member {string} definition - * @memberof google.pubsub.v1.Schema - * @instance - */ - Schema.prototype.definition = ""; - - /** - * Schema revisionId. - * @member {string} revisionId - * @memberof google.pubsub.v1.Schema - * @instance - */ - Schema.prototype.revisionId = ""; - - /** - * Schema revisionCreateTime. - * @member {google.protobuf.ITimestamp|null|undefined} revisionCreateTime - * @memberof google.pubsub.v1.Schema - * @instance - */ - Schema.prototype.revisionCreateTime = null; - - /** - * Creates a new Schema instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.Schema - * @static - * @param {google.pubsub.v1.ISchema=} [properties] Properties to set - * @returns {google.pubsub.v1.Schema} Schema instance - */ - Schema.create = function create(properties) { - return new Schema(properties); - }; - - /** - * Encodes the specified Schema message. Does not implicitly {@link google.pubsub.v1.Schema.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.Schema - * @static - * @param {google.pubsub.v1.ISchema} message Schema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Schema.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); - if (message.definition != null && Object.hasOwnProperty.call(message, "definition")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.definition); - if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.revisionId); - if (message.revisionCreateTime != null && Object.hasOwnProperty.call(message, "revisionCreateTime")) - $root.google.protobuf.Timestamp.encode(message.revisionCreateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified Schema message, length delimited. Does not implicitly {@link google.pubsub.v1.Schema.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.Schema - * @static - * @param {google.pubsub.v1.ISchema} message Schema message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Schema.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a Schema message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.Schema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.Schema} Schema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Schema.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.Schema(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - case 3: { - message.definition = reader.string(); - break; - } - case 4: { - message.revisionId = reader.string(); - break; - } - case 6: { - message.revisionCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a Schema message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.Schema - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.Schema} Schema - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Schema.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Schema message. - * @function verify - * @memberof google.pubsub.v1.Schema - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Schema.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.definition != null && Object.hasOwnProperty.call(message, "definition")) - if (!$util.isString(message.definition)) - return "definition: string expected"; - if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - if (!$util.isString(message.revisionId)) - return "revisionId: string expected"; - if (message.revisionCreateTime != null && Object.hasOwnProperty.call(message, "revisionCreateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.revisionCreateTime, long + 1); - if (error) - return "revisionCreateTime." + error; - } - return null; - }; - - /** - * Creates a Schema message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.Schema - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.Schema} Schema - */ - Schema.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.Schema) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.Schema: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.Schema(); - if (object.name != null) - message.name = String(object.name); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "PROTOCOL_BUFFER": - case 1: - message.type = 1; - break; - case "AVRO": - case 2: - message.type = 2; - break; - } - if (object.definition != null) - message.definition = String(object.definition); - if (object.revisionId != null) - message.revisionId = String(object.revisionId); - if (object.revisionCreateTime != null) { - if (!$util.isObject(object.revisionCreateTime)) - throw TypeError(".google.pubsub.v1.Schema.revisionCreateTime: object expected"); - message.revisionCreateTime = $root.google.protobuf.Timestamp.fromObject(object.revisionCreateTime, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a Schema message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.Schema - * @static - * @param {google.pubsub.v1.Schema} message Schema - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Schema.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.definition = ""; - object.revisionId = ""; - object.revisionCreateTime = null; - } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - object.name = message.name; - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - object.type = options.enums === String ? $root.google.pubsub.v1.Schema.Type[message.type] === undefined ? message.type : $root.google.pubsub.v1.Schema.Type[message.type] : message.type; - if (message.definition != null && Object.hasOwnProperty.call(message, "definition")) - object.definition = message.definition; - if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - object.revisionId = message.revisionId; - if (message.revisionCreateTime != null && Object.hasOwnProperty.call(message, "revisionCreateTime")) - object.revisionCreateTime = $root.google.protobuf.Timestamp.toObject(message.revisionCreateTime, options, q + 1); - return object; - }; - - /** - * Converts this Schema to JSON. - * @function toJSON - * @memberof google.pubsub.v1.Schema - * @instance - * @returns {Object.} JSON object - */ - Schema.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Schema - * @function getTypeUrl - * @memberof google.pubsub.v1.Schema - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Schema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.Schema"; - }; - - /** - * Type enum. - * @name google.pubsub.v1.Schema.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} PROTOCOL_BUFFER=1 PROTOCOL_BUFFER value - * @property {number} AVRO=2 AVRO value - */ - Schema.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PROTOCOL_BUFFER"] = 1; - values[valuesById[2] = "AVRO"] = 2; - return values; - })(); - - return Schema; - })(); - - /** - * SchemaView enum. - * @name google.pubsub.v1.SchemaView - * @enum {number} - * @property {number} SCHEMA_VIEW_UNSPECIFIED=0 SCHEMA_VIEW_UNSPECIFIED value - * @property {number} BASIC=1 BASIC value - * @property {number} FULL=2 FULL value - */ - v1.SchemaView = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SCHEMA_VIEW_UNSPECIFIED"] = 0; - values[valuesById[1] = "BASIC"] = 1; - values[valuesById[2] = "FULL"] = 2; - return values; - })(); - - v1.CreateSchemaRequest = (function() { - - /** - * Properties of a CreateSchemaRequest. - * @memberof google.pubsub.v1 - * @interface ICreateSchemaRequest - * @property {string|null} [parent] CreateSchemaRequest parent - * @property {google.pubsub.v1.ISchema|null} [schema] CreateSchemaRequest schema - * @property {string|null} [schemaId] CreateSchemaRequest schemaId - */ - - /** - * Constructs a new CreateSchemaRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a CreateSchemaRequest. - * @implements ICreateSchemaRequest - * @constructor - * @param {google.pubsub.v1.ICreateSchemaRequest=} [properties] Properties to set - */ - function CreateSchemaRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateSchemaRequest parent. - * @member {string} parent - * @memberof google.pubsub.v1.CreateSchemaRequest - * @instance - */ - CreateSchemaRequest.prototype.parent = ""; - - /** - * CreateSchemaRequest schema. - * @member {google.pubsub.v1.ISchema|null|undefined} schema - * @memberof google.pubsub.v1.CreateSchemaRequest - * @instance - */ - CreateSchemaRequest.prototype.schema = null; - - /** - * CreateSchemaRequest schemaId. - * @member {string} schemaId - * @memberof google.pubsub.v1.CreateSchemaRequest - * @instance - */ - CreateSchemaRequest.prototype.schemaId = ""; - - /** - * Creates a new CreateSchemaRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.CreateSchemaRequest - * @static - * @param {google.pubsub.v1.ICreateSchemaRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.CreateSchemaRequest} CreateSchemaRequest instance - */ - CreateSchemaRequest.create = function create(properties) { - return new CreateSchemaRequest(properties); - }; - - /** - * Encodes the specified CreateSchemaRequest message. Does not implicitly {@link google.pubsub.v1.CreateSchemaRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.CreateSchemaRequest - * @static - * @param {google.pubsub.v1.ICreateSchemaRequest} message CreateSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSchemaRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - $root.google.pubsub.v1.Schema.encode(message.schema, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - if (message.schemaId != null && Object.hasOwnProperty.call(message, "schemaId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.schemaId); - return writer; - }; - - /** - * Encodes the specified CreateSchemaRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.CreateSchemaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.CreateSchemaRequest - * @static - * @param {google.pubsub.v1.ICreateSchemaRequest} message CreateSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a CreateSchemaRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.CreateSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.CreateSchemaRequest} CreateSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSchemaRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.CreateSchemaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.schema = $root.google.pubsub.v1.Schema.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 3: { - message.schemaId = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a CreateSchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.CreateSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.CreateSchemaRequest} CreateSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateSchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateSchemaRequest message. - * @function verify - * @memberof google.pubsub.v1.CreateSchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateSchemaRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) { - var error = $root.google.pubsub.v1.Schema.verify(message.schema, long + 1); - if (error) - return "schema." + error; - } - if (message.schemaId != null && Object.hasOwnProperty.call(message, "schemaId")) - if (!$util.isString(message.schemaId)) - return "schemaId: string expected"; - return null; - }; - - /** - * Creates a CreateSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.CreateSchemaRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.CreateSchemaRequest} CreateSchemaRequest - */ - CreateSchemaRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.CreateSchemaRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.CreateSchemaRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.CreateSchemaRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.schema != null) { - if (!$util.isObject(object.schema)) - throw TypeError(".google.pubsub.v1.CreateSchemaRequest.schema: object expected"); - message.schema = $root.google.pubsub.v1.Schema.fromObject(object.schema, long + 1); - } - if (object.schemaId != null) - message.schemaId = String(object.schemaId); - return message; - }; - - /** - * Creates a plain object from a CreateSchemaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.CreateSchemaRequest - * @static - * @param {google.pubsub.v1.CreateSchemaRequest} message CreateSchemaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateSchemaRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.parent = ""; - object.schema = null; - object.schemaId = ""; - } - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - object.parent = message.parent; - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - object.schema = $root.google.pubsub.v1.Schema.toObject(message.schema, options, q + 1); - if (message.schemaId != null && Object.hasOwnProperty.call(message, "schemaId")) - object.schemaId = message.schemaId; - return object; - }; - - /** - * Converts this CreateSchemaRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.CreateSchemaRequest - * @instance - * @returns {Object.} JSON object - */ - CreateSchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateSchemaRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.CreateSchemaRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.CreateSchemaRequest"; - }; - - return CreateSchemaRequest; - })(); - - v1.GetSchemaRequest = (function() { - - /** - * Properties of a GetSchemaRequest. - * @memberof google.pubsub.v1 - * @interface IGetSchemaRequest - * @property {string|null} [name] GetSchemaRequest name - * @property {google.pubsub.v1.SchemaView|null} [view] GetSchemaRequest view - */ - - /** - * Constructs a new GetSchemaRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a GetSchemaRequest. - * @implements IGetSchemaRequest - * @constructor - * @param {google.pubsub.v1.IGetSchemaRequest=} [properties] Properties to set - */ - function GetSchemaRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetSchemaRequest name. - * @member {string} name - * @memberof google.pubsub.v1.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.name = ""; - - /** - * GetSchemaRequest view. - * @member {google.pubsub.v1.SchemaView} view - * @memberof google.pubsub.v1.GetSchemaRequest - * @instance - */ - GetSchemaRequest.prototype.view = 0; - - /** - * Creates a new GetSchemaRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.GetSchemaRequest - * @static - * @param {google.pubsub.v1.IGetSchemaRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.GetSchemaRequest} GetSchemaRequest instance - */ - GetSchemaRequest.create = function create(properties) { - return new GetSchemaRequest(properties); - }; - - /** - * Encodes the specified GetSchemaRequest message. Does not implicitly {@link google.pubsub.v1.GetSchemaRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.GetSchemaRequest - * @static - * @param {google.pubsub.v1.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSchemaRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - return writer; - }; - - /** - * Encodes the specified GetSchemaRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.GetSchemaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.GetSchemaRequest - * @static - * @param {google.pubsub.v1.IGetSchemaRequest} message GetSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.GetSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.GetSchemaRequest} GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemaRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.GetSchemaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a GetSchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.GetSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.GetSchemaRequest} GetSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetSchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetSchemaRequest message. - * @function verify - * @memberof google.pubsub.v1.GetSchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetSchemaRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a GetSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.GetSchemaRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.GetSchemaRequest} GetSchemaRequest - */ - GetSchemaRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.GetSchemaRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.GetSchemaRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.GetSchemaRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "SCHEMA_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BASIC": - case 1: - message.view = 1; - break; - case "FULL": - case 2: - message.view = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a GetSchemaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.GetSchemaRequest - * @static - * @param {google.pubsub.v1.GetSchemaRequest} message GetSchemaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetSchemaRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "SCHEMA_VIEW_UNSPECIFIED" : 0; - } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - object.name = message.name; - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - object.view = options.enums === String ? $root.google.pubsub.v1.SchemaView[message.view] === undefined ? message.view : $root.google.pubsub.v1.SchemaView[message.view] : message.view; - return object; - }; - - /** - * Converts this GetSchemaRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.GetSchemaRequest - * @instance - * @returns {Object.} JSON object - */ - GetSchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetSchemaRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.GetSchemaRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.GetSchemaRequest"; - }; - - return GetSchemaRequest; - })(); - - v1.ListSchemasRequest = (function() { - - /** - * Properties of a ListSchemasRequest. - * @memberof google.pubsub.v1 - * @interface IListSchemasRequest - * @property {string|null} [parent] ListSchemasRequest parent - * @property {google.pubsub.v1.SchemaView|null} [view] ListSchemasRequest view - * @property {number|null} [pageSize] ListSchemasRequest pageSize - * @property {string|null} [pageToken] ListSchemasRequest pageToken - */ - - /** - * Constructs a new ListSchemasRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a ListSchemasRequest. - * @implements IListSchemasRequest - * @constructor - * @param {google.pubsub.v1.IListSchemasRequest=} [properties] Properties to set - */ - function ListSchemasRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSchemasRequest parent. - * @member {string} parent - * @memberof google.pubsub.v1.ListSchemasRequest - * @instance - */ - ListSchemasRequest.prototype.parent = ""; - - /** - * ListSchemasRequest view. - * @member {google.pubsub.v1.SchemaView} view - * @memberof google.pubsub.v1.ListSchemasRequest - * @instance - */ - ListSchemasRequest.prototype.view = 0; - - /** - * ListSchemasRequest pageSize. - * @member {number} pageSize - * @memberof google.pubsub.v1.ListSchemasRequest - * @instance - */ - ListSchemasRequest.prototype.pageSize = 0; - - /** - * ListSchemasRequest pageToken. - * @member {string} pageToken - * @memberof google.pubsub.v1.ListSchemasRequest - * @instance - */ - ListSchemasRequest.prototype.pageToken = ""; - - /** - * Creates a new ListSchemasRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ListSchemasRequest - * @static - * @param {google.pubsub.v1.IListSchemasRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.ListSchemasRequest} ListSchemasRequest instance - */ - ListSchemasRequest.create = function create(properties) { - return new ListSchemasRequest(properties); - }; - - /** - * Encodes the specified ListSchemasRequest message. Does not implicitly {@link google.pubsub.v1.ListSchemasRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ListSchemasRequest - * @static - * @param {google.pubsub.v1.IListSchemasRequest} message ListSchemasRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSchemasRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListSchemasRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSchemasRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ListSchemasRequest - * @static - * @param {google.pubsub.v1.IListSchemasRequest} message ListSchemasRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSchemasRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ListSchemasRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ListSchemasRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ListSchemasRequest} ListSchemasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSchemasRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ListSchemasRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ListSchemasRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ListSchemasRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ListSchemasRequest} ListSchemasRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSchemasRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSchemasRequest message. - * @function verify - * @memberof google.pubsub.v1.ListSchemasRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSchemasRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListSchemasRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ListSchemasRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ListSchemasRequest} ListSchemasRequest - */ - ListSchemasRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ListSchemasRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ListSchemasRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ListSchemasRequest(); - if (object.parent != null) - message.parent = String(object.parent); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "SCHEMA_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BASIC": - case 1: - message.view = 1; - break; - case "FULL": - case 2: - message.view = 2; - break; - } - 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 ListSchemasRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ListSchemasRequest - * @static - * @param {google.pubsub.v1.ListSchemasRequest} message ListSchemasRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListSchemasRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.parent = ""; - object.view = options.enums === String ? "SCHEMA_VIEW_UNSPECIFIED" : 0; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - object.parent = message.parent; - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - object.view = options.enums === String ? $root.google.pubsub.v1.SchemaView[message.view] === undefined ? message.view : $root.google.pubsub.v1.SchemaView[message.view] : message.view; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListSchemasRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ListSchemasRequest - * @instance - * @returns {Object.} JSON object - */ - ListSchemasRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListSchemasRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.ListSchemasRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListSchemasRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ListSchemasRequest"; - }; - - return ListSchemasRequest; - })(); - - v1.ListSchemasResponse = (function() { - - /** - * Properties of a ListSchemasResponse. - * @memberof google.pubsub.v1 - * @interface IListSchemasResponse - * @property {Array.|null} [schemas] ListSchemasResponse schemas - * @property {string|null} [nextPageToken] ListSchemasResponse nextPageToken - */ - - /** - * Constructs a new ListSchemasResponse. - * @memberof google.pubsub.v1 - * @classdesc Represents a ListSchemasResponse. - * @implements IListSchemasResponse - * @constructor - * @param {google.pubsub.v1.IListSchemasResponse=} [properties] Properties to set - */ - function ListSchemasResponse(properties) { - this.schemas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSchemasResponse schemas. - * @member {Array.} schemas - * @memberof google.pubsub.v1.ListSchemasResponse - * @instance - */ - ListSchemasResponse.prototype.schemas = $util.emptyArray; - - /** - * ListSchemasResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.pubsub.v1.ListSchemasResponse - * @instance - */ - ListSchemasResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListSchemasResponse instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ListSchemasResponse - * @static - * @param {google.pubsub.v1.IListSchemasResponse=} [properties] Properties to set - * @returns {google.pubsub.v1.ListSchemasResponse} ListSchemasResponse instance - */ - ListSchemasResponse.create = function create(properties) { - return new ListSchemasResponse(properties); - }; - - /** - * Encodes the specified ListSchemasResponse message. Does not implicitly {@link google.pubsub.v1.ListSchemasResponse.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ListSchemasResponse - * @static - * @param {google.pubsub.v1.IListSchemasResponse} message ListSchemasResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSchemasResponse.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.schemas != null && message.schemas.length) - for (var i = 0; i < message.schemas.length; ++i) - $root.google.pubsub.v1.Schema.encode(message.schemas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListSchemasResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSchemasResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ListSchemasResponse - * @static - * @param {google.pubsub.v1.IListSchemasResponse} message ListSchemasResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSchemasResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ListSchemasResponse message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ListSchemasResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ListSchemasResponse} ListSchemasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSchemasResponse.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ListSchemasResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.schemas && message.schemas.length)) - message.schemas = []; - message.schemas.push($root.google.pubsub.v1.Schema.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ListSchemasResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ListSchemasResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ListSchemasResponse} ListSchemasResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSchemasResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSchemasResponse message. - * @function verify - * @memberof google.pubsub.v1.ListSchemasResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSchemasResponse.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.schemas != null && Object.hasOwnProperty.call(message, "schemas")) { - if (!Array.isArray(message.schemas)) - return "schemas: array expected"; - for (var i = 0; i < message.schemas.length; ++i) { - var error = $root.google.pubsub.v1.Schema.verify(message.schemas[i], long + 1); - if (error) - return "schemas." + error; - } - } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListSchemasResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ListSchemasResponse - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ListSchemasResponse} ListSchemasResponse - */ - ListSchemasResponse.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ListSchemasResponse) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ListSchemasResponse: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ListSchemasResponse(); - if (object.schemas) { - if (!Array.isArray(object.schemas)) - throw TypeError(".google.pubsub.v1.ListSchemasResponse.schemas: array expected"); - message.schemas = []; - for (var i = 0; i < object.schemas.length; ++i) { - if (!$util.isObject(object.schemas[i])) - throw TypeError(".google.pubsub.v1.ListSchemasResponse.schemas: object expected"); - message.schemas[i] = $root.google.pubsub.v1.Schema.fromObject(object.schemas[i], long + 1); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListSchemasResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ListSchemasResponse - * @static - * @param {google.pubsub.v1.ListSchemasResponse} message ListSchemasResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListSchemasResponse.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.schemas = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.schemas && message.schemas.length) { - object.schemas = []; - for (var j = 0; j < message.schemas.length; ++j) - object.schemas[j] = $root.google.pubsub.v1.Schema.toObject(message.schemas[j], options, q + 1); - } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListSchemasResponse to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ListSchemasResponse - * @instance - * @returns {Object.} JSON object - */ - ListSchemasResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListSchemasResponse - * @function getTypeUrl - * @memberof google.pubsub.v1.ListSchemasResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListSchemasResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ListSchemasResponse"; - }; - - return ListSchemasResponse; - })(); - - v1.ListSchemaRevisionsRequest = (function() { - - /** - * Properties of a ListSchemaRevisionsRequest. - * @memberof google.pubsub.v1 - * @interface IListSchemaRevisionsRequest - * @property {string|null} [name] ListSchemaRevisionsRequest name - * @property {google.pubsub.v1.SchemaView|null} [view] ListSchemaRevisionsRequest view - * @property {number|null} [pageSize] ListSchemaRevisionsRequest pageSize - * @property {string|null} [pageToken] ListSchemaRevisionsRequest pageToken - */ - - /** - * Constructs a new ListSchemaRevisionsRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a ListSchemaRevisionsRequest. - * @implements IListSchemaRevisionsRequest - * @constructor - * @param {google.pubsub.v1.IListSchemaRevisionsRequest=} [properties] Properties to set - */ - function ListSchemaRevisionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSchemaRevisionsRequest name. - * @member {string} name - * @memberof google.pubsub.v1.ListSchemaRevisionsRequest - * @instance - */ - ListSchemaRevisionsRequest.prototype.name = ""; - - /** - * ListSchemaRevisionsRequest view. - * @member {google.pubsub.v1.SchemaView} view - * @memberof google.pubsub.v1.ListSchemaRevisionsRequest - * @instance - */ - ListSchemaRevisionsRequest.prototype.view = 0; - - /** - * ListSchemaRevisionsRequest pageSize. - * @member {number} pageSize - * @memberof google.pubsub.v1.ListSchemaRevisionsRequest - * @instance - */ - ListSchemaRevisionsRequest.prototype.pageSize = 0; - - /** - * ListSchemaRevisionsRequest pageToken. - * @member {string} pageToken - * @memberof google.pubsub.v1.ListSchemaRevisionsRequest - * @instance - */ - ListSchemaRevisionsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListSchemaRevisionsRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ListSchemaRevisionsRequest - * @static - * @param {google.pubsub.v1.IListSchemaRevisionsRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.ListSchemaRevisionsRequest} ListSchemaRevisionsRequest instance - */ - ListSchemaRevisionsRequest.create = function create(properties) { - return new ListSchemaRevisionsRequest(properties); - }; - - /** - * Encodes the specified ListSchemaRevisionsRequest message. Does not implicitly {@link google.pubsub.v1.ListSchemaRevisionsRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ListSchemaRevisionsRequest - * @static - * @param {google.pubsub.v1.IListSchemaRevisionsRequest} message ListSchemaRevisionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSchemaRevisionsRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.view); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListSchemaRevisionsRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSchemaRevisionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ListSchemaRevisionsRequest - * @static - * @param {google.pubsub.v1.IListSchemaRevisionsRequest} message ListSchemaRevisionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSchemaRevisionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ListSchemaRevisionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ListSchemaRevisionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ListSchemaRevisionsRequest} ListSchemaRevisionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSchemaRevisionsRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ListSchemaRevisionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.view = reader.int32(); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ListSchemaRevisionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ListSchemaRevisionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ListSchemaRevisionsRequest} ListSchemaRevisionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSchemaRevisionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSchemaRevisionsRequest message. - * @function verify - * @memberof google.pubsub.v1.ListSchemaRevisionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSchemaRevisionsRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - switch (message.view) { - default: - return "view: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListSchemaRevisionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ListSchemaRevisionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ListSchemaRevisionsRequest} ListSchemaRevisionsRequest - */ - ListSchemaRevisionsRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ListSchemaRevisionsRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ListSchemaRevisionsRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ListSchemaRevisionsRequest(); - if (object.name != null) - message.name = String(object.name); - switch (object.view) { - default: - if (typeof object.view === "number") { - message.view = object.view; - break; - } - break; - case "SCHEMA_VIEW_UNSPECIFIED": - case 0: - message.view = 0; - break; - case "BASIC": - case 1: - message.view = 1; - break; - case "FULL": - case 2: - message.view = 2; - break; - } - 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 ListSchemaRevisionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ListSchemaRevisionsRequest - * @static - * @param {google.pubsub.v1.ListSchemaRevisionsRequest} message ListSchemaRevisionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListSchemaRevisionsRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.name = ""; - object.view = options.enums === String ? "SCHEMA_VIEW_UNSPECIFIED" : 0; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - object.name = message.name; - if (message.view != null && Object.hasOwnProperty.call(message, "view")) - object.view = options.enums === String ? $root.google.pubsub.v1.SchemaView[message.view] === undefined ? message.view : $root.google.pubsub.v1.SchemaView[message.view] : message.view; - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListSchemaRevisionsRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ListSchemaRevisionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListSchemaRevisionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListSchemaRevisionsRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.ListSchemaRevisionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListSchemaRevisionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ListSchemaRevisionsRequest"; - }; - - return ListSchemaRevisionsRequest; - })(); - - v1.ListSchemaRevisionsResponse = (function() { - - /** - * Properties of a ListSchemaRevisionsResponse. - * @memberof google.pubsub.v1 - * @interface IListSchemaRevisionsResponse - * @property {Array.|null} [schemas] ListSchemaRevisionsResponse schemas - * @property {string|null} [nextPageToken] ListSchemaRevisionsResponse nextPageToken - */ - - /** - * Constructs a new ListSchemaRevisionsResponse. - * @memberof google.pubsub.v1 - * @classdesc Represents a ListSchemaRevisionsResponse. - * @implements IListSchemaRevisionsResponse - * @constructor - * @param {google.pubsub.v1.IListSchemaRevisionsResponse=} [properties] Properties to set - */ - function ListSchemaRevisionsResponse(properties) { - this.schemas = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListSchemaRevisionsResponse schemas. - * @member {Array.} schemas - * @memberof google.pubsub.v1.ListSchemaRevisionsResponse - * @instance - */ - ListSchemaRevisionsResponse.prototype.schemas = $util.emptyArray; - - /** - * ListSchemaRevisionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.pubsub.v1.ListSchemaRevisionsResponse - * @instance - */ - ListSchemaRevisionsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListSchemaRevisionsResponse instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ListSchemaRevisionsResponse - * @static - * @param {google.pubsub.v1.IListSchemaRevisionsResponse=} [properties] Properties to set - * @returns {google.pubsub.v1.ListSchemaRevisionsResponse} ListSchemaRevisionsResponse instance - */ - ListSchemaRevisionsResponse.create = function create(properties) { - return new ListSchemaRevisionsResponse(properties); - }; - - /** - * Encodes the specified ListSchemaRevisionsResponse message. Does not implicitly {@link google.pubsub.v1.ListSchemaRevisionsResponse.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ListSchemaRevisionsResponse - * @static - * @param {google.pubsub.v1.IListSchemaRevisionsResponse} message ListSchemaRevisionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSchemaRevisionsResponse.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.schemas != null && message.schemas.length) - for (var i = 0; i < message.schemas.length; ++i) - $root.google.pubsub.v1.Schema.encode(message.schemas[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListSchemaRevisionsResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ListSchemaRevisionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ListSchemaRevisionsResponse - * @static - * @param {google.pubsub.v1.IListSchemaRevisionsResponse} message ListSchemaRevisionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListSchemaRevisionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ListSchemaRevisionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ListSchemaRevisionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ListSchemaRevisionsResponse} ListSchemaRevisionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSchemaRevisionsResponse.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ListSchemaRevisionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.schemas && message.schemas.length)) - message.schemas = []; - message.schemas.push($root.google.pubsub.v1.Schema.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ListSchemaRevisionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ListSchemaRevisionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ListSchemaRevisionsResponse} ListSchemaRevisionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListSchemaRevisionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListSchemaRevisionsResponse message. - * @function verify - * @memberof google.pubsub.v1.ListSchemaRevisionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListSchemaRevisionsResponse.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.schemas != null && Object.hasOwnProperty.call(message, "schemas")) { - if (!Array.isArray(message.schemas)) - return "schemas: array expected"; - for (var i = 0; i < message.schemas.length; ++i) { - var error = $root.google.pubsub.v1.Schema.verify(message.schemas[i], long + 1); - if (error) - return "schemas." + error; - } - } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListSchemaRevisionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ListSchemaRevisionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ListSchemaRevisionsResponse} ListSchemaRevisionsResponse - */ - ListSchemaRevisionsResponse.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ListSchemaRevisionsResponse) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ListSchemaRevisionsResponse: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ListSchemaRevisionsResponse(); - if (object.schemas) { - if (!Array.isArray(object.schemas)) - throw TypeError(".google.pubsub.v1.ListSchemaRevisionsResponse.schemas: array expected"); - message.schemas = []; - for (var i = 0; i < object.schemas.length; ++i) { - if (!$util.isObject(object.schemas[i])) - throw TypeError(".google.pubsub.v1.ListSchemaRevisionsResponse.schemas: object expected"); - message.schemas[i] = $root.google.pubsub.v1.Schema.fromObject(object.schemas[i], long + 1); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListSchemaRevisionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ListSchemaRevisionsResponse - * @static - * @param {google.pubsub.v1.ListSchemaRevisionsResponse} message ListSchemaRevisionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListSchemaRevisionsResponse.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.schemas = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.schemas && message.schemas.length) { - object.schemas = []; - for (var j = 0; j < message.schemas.length; ++j) - object.schemas[j] = $root.google.pubsub.v1.Schema.toObject(message.schemas[j], options, q + 1); - } - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListSchemaRevisionsResponse to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ListSchemaRevisionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListSchemaRevisionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListSchemaRevisionsResponse - * @function getTypeUrl - * @memberof google.pubsub.v1.ListSchemaRevisionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListSchemaRevisionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ListSchemaRevisionsResponse"; - }; - - return ListSchemaRevisionsResponse; - })(); - - v1.CommitSchemaRequest = (function() { - - /** - * Properties of a CommitSchemaRequest. - * @memberof google.pubsub.v1 - * @interface ICommitSchemaRequest - * @property {string|null} [name] CommitSchemaRequest name - * @property {google.pubsub.v1.ISchema|null} [schema] CommitSchemaRequest schema - */ - - /** - * Constructs a new CommitSchemaRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a CommitSchemaRequest. - * @implements ICommitSchemaRequest - * @constructor - * @param {google.pubsub.v1.ICommitSchemaRequest=} [properties] Properties to set - */ - function CommitSchemaRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommitSchemaRequest name. - * @member {string} name - * @memberof google.pubsub.v1.CommitSchemaRequest - * @instance - */ - CommitSchemaRequest.prototype.name = ""; - - /** - * CommitSchemaRequest schema. - * @member {google.pubsub.v1.ISchema|null|undefined} schema - * @memberof google.pubsub.v1.CommitSchemaRequest - * @instance - */ - CommitSchemaRequest.prototype.schema = null; - - /** - * Creates a new CommitSchemaRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.CommitSchemaRequest - * @static - * @param {google.pubsub.v1.ICommitSchemaRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.CommitSchemaRequest} CommitSchemaRequest instance - */ - CommitSchemaRequest.create = function create(properties) { - return new CommitSchemaRequest(properties); - }; - - /** - * Encodes the specified CommitSchemaRequest message. Does not implicitly {@link google.pubsub.v1.CommitSchemaRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.CommitSchemaRequest - * @static - * @param {google.pubsub.v1.ICommitSchemaRequest} message CommitSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitSchemaRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - $root.google.pubsub.v1.Schema.encode(message.schema, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified CommitSchemaRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.CommitSchemaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.CommitSchemaRequest - * @static - * @param {google.pubsub.v1.ICommitSchemaRequest} message CommitSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommitSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a CommitSchemaRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.CommitSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.CommitSchemaRequest} CommitSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitSchemaRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.CommitSchemaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.schema = $root.google.pubsub.v1.Schema.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a CommitSchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.CommitSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.CommitSchemaRequest} CommitSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommitSchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommitSchemaRequest message. - * @function verify - * @memberof google.pubsub.v1.CommitSchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommitSchemaRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) { - var error = $root.google.pubsub.v1.Schema.verify(message.schema, long + 1); - if (error) - return "schema." + error; - } - return null; - }; - - /** - * Creates a CommitSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.CommitSchemaRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.CommitSchemaRequest} CommitSchemaRequest - */ - CommitSchemaRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.CommitSchemaRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.CommitSchemaRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.CommitSchemaRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.schema != null) { - if (!$util.isObject(object.schema)) - throw TypeError(".google.pubsub.v1.CommitSchemaRequest.schema: object expected"); - message.schema = $root.google.pubsub.v1.Schema.fromObject(object.schema, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a CommitSchemaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.CommitSchemaRequest - * @static - * @param {google.pubsub.v1.CommitSchemaRequest} message CommitSchemaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommitSchemaRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.name = ""; - object.schema = null; - } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - object.name = message.name; - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - object.schema = $root.google.pubsub.v1.Schema.toObject(message.schema, options, q + 1); - return object; - }; - - /** - * Converts this CommitSchemaRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.CommitSchemaRequest - * @instance - * @returns {Object.} JSON object - */ - CommitSchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommitSchemaRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.CommitSchemaRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommitSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.CommitSchemaRequest"; - }; - - return CommitSchemaRequest; - })(); - - v1.RollbackSchemaRequest = (function() { - - /** - * Properties of a RollbackSchemaRequest. - * @memberof google.pubsub.v1 - * @interface IRollbackSchemaRequest - * @property {string|null} [name] RollbackSchemaRequest name - * @property {string|null} [revisionId] RollbackSchemaRequest revisionId - */ - - /** - * Constructs a new RollbackSchemaRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a RollbackSchemaRequest. - * @implements IRollbackSchemaRequest - * @constructor - * @param {google.pubsub.v1.IRollbackSchemaRequest=} [properties] Properties to set - */ - function RollbackSchemaRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * RollbackSchemaRequest name. - * @member {string} name - * @memberof google.pubsub.v1.RollbackSchemaRequest - * @instance - */ - RollbackSchemaRequest.prototype.name = ""; - - /** - * RollbackSchemaRequest revisionId. - * @member {string} revisionId - * @memberof google.pubsub.v1.RollbackSchemaRequest - * @instance - */ - RollbackSchemaRequest.prototype.revisionId = ""; - - /** - * Creates a new RollbackSchemaRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.RollbackSchemaRequest - * @static - * @param {google.pubsub.v1.IRollbackSchemaRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.RollbackSchemaRequest} RollbackSchemaRequest instance - */ - RollbackSchemaRequest.create = function create(properties) { - return new RollbackSchemaRequest(properties); - }; - - /** - * Encodes the specified RollbackSchemaRequest message. Does not implicitly {@link google.pubsub.v1.RollbackSchemaRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.RollbackSchemaRequest - * @static - * @param {google.pubsub.v1.IRollbackSchemaRequest} message RollbackSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RollbackSchemaRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId); - return writer; - }; - - /** - * Encodes the specified RollbackSchemaRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.RollbackSchemaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.RollbackSchemaRequest - * @static - * @param {google.pubsub.v1.IRollbackSchemaRequest} message RollbackSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RollbackSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a RollbackSchemaRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.RollbackSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.RollbackSchemaRequest} RollbackSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RollbackSchemaRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.RollbackSchemaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.revisionId = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a RollbackSchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.RollbackSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.RollbackSchemaRequest} RollbackSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RollbackSchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RollbackSchemaRequest message. - * @function verify - * @memberof google.pubsub.v1.RollbackSchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RollbackSchemaRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - if (!$util.isString(message.revisionId)) - return "revisionId: string expected"; - return null; - }; - - /** - * Creates a RollbackSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.RollbackSchemaRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.RollbackSchemaRequest} RollbackSchemaRequest - */ - RollbackSchemaRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.RollbackSchemaRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.RollbackSchemaRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.RollbackSchemaRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.revisionId != null) - message.revisionId = String(object.revisionId); - return message; - }; - - /** - * Creates a plain object from a RollbackSchemaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.RollbackSchemaRequest - * @static - * @param {google.pubsub.v1.RollbackSchemaRequest} message RollbackSchemaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RollbackSchemaRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.name = ""; - object.revisionId = ""; - } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - object.name = message.name; - if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - object.revisionId = message.revisionId; - return object; - }; - - /** - * Converts this RollbackSchemaRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.RollbackSchemaRequest - * @instance - * @returns {Object.} JSON object - */ - RollbackSchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RollbackSchemaRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.RollbackSchemaRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RollbackSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.RollbackSchemaRequest"; - }; - - return RollbackSchemaRequest; - })(); - - v1.DeleteSchemaRevisionRequest = (function() { - - /** - * Properties of a DeleteSchemaRevisionRequest. - * @memberof google.pubsub.v1 - * @interface IDeleteSchemaRevisionRequest - * @property {string|null} [name] DeleteSchemaRevisionRequest name - * @property {string|null} [revisionId] DeleteSchemaRevisionRequest revisionId - */ - - /** - * Constructs a new DeleteSchemaRevisionRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a DeleteSchemaRevisionRequest. - * @implements IDeleteSchemaRevisionRequest - * @constructor - * @param {google.pubsub.v1.IDeleteSchemaRevisionRequest=} [properties] Properties to set - */ - function DeleteSchemaRevisionRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteSchemaRevisionRequest name. - * @member {string} name - * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest - * @instance - */ - DeleteSchemaRevisionRequest.prototype.name = ""; - - /** - * DeleteSchemaRevisionRequest revisionId. - * @member {string} revisionId - * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest - * @instance - */ - DeleteSchemaRevisionRequest.prototype.revisionId = ""; - - /** - * Creates a new DeleteSchemaRevisionRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest - * @static - * @param {google.pubsub.v1.IDeleteSchemaRevisionRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.DeleteSchemaRevisionRequest} DeleteSchemaRevisionRequest instance - */ - DeleteSchemaRevisionRequest.create = function create(properties) { - return new DeleteSchemaRevisionRequest(properties); - }; - - /** - * Encodes the specified DeleteSchemaRevisionRequest message. Does not implicitly {@link google.pubsub.v1.DeleteSchemaRevisionRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest - * @static - * @param {google.pubsub.v1.IDeleteSchemaRevisionRequest} message DeleteSchemaRevisionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSchemaRevisionRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.revisionId); - return writer; - }; - - /** - * Encodes the specified DeleteSchemaRevisionRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.DeleteSchemaRevisionRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest - * @static - * @param {google.pubsub.v1.IDeleteSchemaRevisionRequest} message DeleteSchemaRevisionRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSchemaRevisionRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a DeleteSchemaRevisionRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.DeleteSchemaRevisionRequest} DeleteSchemaRevisionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSchemaRevisionRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.DeleteSchemaRevisionRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.revisionId = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteSchemaRevisionRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.DeleteSchemaRevisionRequest} DeleteSchemaRevisionRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSchemaRevisionRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteSchemaRevisionRequest message. - * @function verify - * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteSchemaRevisionRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - if (!$util.isString(message.revisionId)) - return "revisionId: string expected"; - return null; - }; - - /** - * Creates a DeleteSchemaRevisionRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.DeleteSchemaRevisionRequest} DeleteSchemaRevisionRequest - */ - DeleteSchemaRevisionRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.DeleteSchemaRevisionRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.DeleteSchemaRevisionRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.DeleteSchemaRevisionRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.revisionId != null) - message.revisionId = String(object.revisionId); - return message; - }; - - /** - * Creates a plain object from a DeleteSchemaRevisionRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest - * @static - * @param {google.pubsub.v1.DeleteSchemaRevisionRequest} message DeleteSchemaRevisionRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteSchemaRevisionRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.name = ""; - object.revisionId = ""; - } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - object.name = message.name; - if (message.revisionId != null && Object.hasOwnProperty.call(message, "revisionId")) - object.revisionId = message.revisionId; - return object; - }; - - /** - * Converts this DeleteSchemaRevisionRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteSchemaRevisionRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteSchemaRevisionRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.DeleteSchemaRevisionRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteSchemaRevisionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.DeleteSchemaRevisionRequest"; - }; - - return DeleteSchemaRevisionRequest; - })(); - - v1.DeleteSchemaRequest = (function() { - - /** - * Properties of a DeleteSchemaRequest. - * @memberof google.pubsub.v1 - * @interface IDeleteSchemaRequest - * @property {string|null} [name] DeleteSchemaRequest name - */ - - /** - * Constructs a new DeleteSchemaRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a DeleteSchemaRequest. - * @implements IDeleteSchemaRequest - * @constructor - * @param {google.pubsub.v1.IDeleteSchemaRequest=} [properties] Properties to set - */ - function DeleteSchemaRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteSchemaRequest name. - * @member {string} name - * @memberof google.pubsub.v1.DeleteSchemaRequest - * @instance - */ - DeleteSchemaRequest.prototype.name = ""; - - /** - * Creates a new DeleteSchemaRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.DeleteSchemaRequest - * @static - * @param {google.pubsub.v1.IDeleteSchemaRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.DeleteSchemaRequest} DeleteSchemaRequest instance - */ - DeleteSchemaRequest.create = function create(properties) { - return new DeleteSchemaRequest(properties); - }; - - /** - * Encodes the specified DeleteSchemaRequest message. Does not implicitly {@link google.pubsub.v1.DeleteSchemaRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.DeleteSchemaRequest - * @static - * @param {google.pubsub.v1.IDeleteSchemaRequest} message DeleteSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSchemaRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteSchemaRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.DeleteSchemaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.DeleteSchemaRequest - * @static - * @param {google.pubsub.v1.IDeleteSchemaRequest} message DeleteSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a DeleteSchemaRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.DeleteSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.DeleteSchemaRequest} DeleteSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSchemaRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.DeleteSchemaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteSchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.DeleteSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.DeleteSchemaRequest} DeleteSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteSchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteSchemaRequest message. - * @function verify - * @memberof google.pubsub.v1.DeleteSchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteSchemaRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.DeleteSchemaRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.DeleteSchemaRequest} DeleteSchemaRequest - */ - DeleteSchemaRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.DeleteSchemaRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.DeleteSchemaRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.DeleteSchemaRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteSchemaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.DeleteSchemaRequest - * @static - * @param {google.pubsub.v1.DeleteSchemaRequest} message DeleteSchemaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteSchemaRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteSchemaRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.DeleteSchemaRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteSchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteSchemaRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.DeleteSchemaRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.DeleteSchemaRequest"; - }; - - return DeleteSchemaRequest; - })(); - - v1.ValidateSchemaRequest = (function() { - - /** - * Properties of a ValidateSchemaRequest. - * @memberof google.pubsub.v1 - * @interface IValidateSchemaRequest - * @property {string|null} [parent] ValidateSchemaRequest parent - * @property {google.pubsub.v1.ISchema|null} [schema] ValidateSchemaRequest schema - */ - - /** - * Constructs a new ValidateSchemaRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a ValidateSchemaRequest. - * @implements IValidateSchemaRequest - * @constructor - * @param {google.pubsub.v1.IValidateSchemaRequest=} [properties] Properties to set - */ - function ValidateSchemaRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ValidateSchemaRequest parent. - * @member {string} parent - * @memberof google.pubsub.v1.ValidateSchemaRequest - * @instance - */ - ValidateSchemaRequest.prototype.parent = ""; - - /** - * ValidateSchemaRequest schema. - * @member {google.pubsub.v1.ISchema|null|undefined} schema - * @memberof google.pubsub.v1.ValidateSchemaRequest - * @instance - */ - ValidateSchemaRequest.prototype.schema = null; - - /** - * Creates a new ValidateSchemaRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ValidateSchemaRequest - * @static - * @param {google.pubsub.v1.IValidateSchemaRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.ValidateSchemaRequest} ValidateSchemaRequest instance - */ - ValidateSchemaRequest.create = function create(properties) { - return new ValidateSchemaRequest(properties); - }; - - /** - * Encodes the specified ValidateSchemaRequest message. Does not implicitly {@link google.pubsub.v1.ValidateSchemaRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ValidateSchemaRequest - * @static - * @param {google.pubsub.v1.IValidateSchemaRequest} message ValidateSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidateSchemaRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - $root.google.pubsub.v1.Schema.encode(message.schema, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified ValidateSchemaRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ValidateSchemaRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ValidateSchemaRequest - * @static - * @param {google.pubsub.v1.IValidateSchemaRequest} message ValidateSchemaRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidateSchemaRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ValidateSchemaRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ValidateSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ValidateSchemaRequest} ValidateSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidateSchemaRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ValidateSchemaRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.schema = $root.google.pubsub.v1.Schema.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ValidateSchemaRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ValidateSchemaRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ValidateSchemaRequest} ValidateSchemaRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidateSchemaRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidateSchemaRequest message. - * @function verify - * @memberof google.pubsub.v1.ValidateSchemaRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidateSchemaRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) { - var error = $root.google.pubsub.v1.Schema.verify(message.schema, long + 1); - if (error) - return "schema." + error; - } - return null; - }; - - /** - * Creates a ValidateSchemaRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ValidateSchemaRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ValidateSchemaRequest} ValidateSchemaRequest - */ - ValidateSchemaRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ValidateSchemaRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ValidateSchemaRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ValidateSchemaRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.schema != null) { - if (!$util.isObject(object.schema)) - throw TypeError(".google.pubsub.v1.ValidateSchemaRequest.schema: object expected"); - message.schema = $root.google.pubsub.v1.Schema.fromObject(object.schema, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a ValidateSchemaRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ValidateSchemaRequest - * @static - * @param {google.pubsub.v1.ValidateSchemaRequest} message ValidateSchemaRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidateSchemaRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.parent = ""; - object.schema = null; - } - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - object.parent = message.parent; - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - object.schema = $root.google.pubsub.v1.Schema.toObject(message.schema, options, q + 1); - return object; - }; - - /** - * Converts this ValidateSchemaRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ValidateSchemaRequest - * @instance - * @returns {Object.} JSON object - */ - ValidateSchemaRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ValidateSchemaRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.ValidateSchemaRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ValidateSchemaRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ValidateSchemaRequest"; - }; - - return ValidateSchemaRequest; - })(); - - v1.ValidateSchemaResponse = (function() { - - /** - * Properties of a ValidateSchemaResponse. - * @memberof google.pubsub.v1 - * @interface IValidateSchemaResponse - */ - - /** - * Constructs a new ValidateSchemaResponse. - * @memberof google.pubsub.v1 - * @classdesc Represents a ValidateSchemaResponse. - * @implements IValidateSchemaResponse - * @constructor - * @param {google.pubsub.v1.IValidateSchemaResponse=} [properties] Properties to set - */ - function ValidateSchemaResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new ValidateSchemaResponse instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ValidateSchemaResponse - * @static - * @param {google.pubsub.v1.IValidateSchemaResponse=} [properties] Properties to set - * @returns {google.pubsub.v1.ValidateSchemaResponse} ValidateSchemaResponse instance - */ - ValidateSchemaResponse.create = function create(properties) { - return new ValidateSchemaResponse(properties); - }; - - /** - * Encodes the specified ValidateSchemaResponse message. Does not implicitly {@link google.pubsub.v1.ValidateSchemaResponse.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ValidateSchemaResponse - * @static - * @param {google.pubsub.v1.IValidateSchemaResponse} message ValidateSchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidateSchemaResponse.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - return writer; - }; - - /** - * Encodes the specified ValidateSchemaResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ValidateSchemaResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ValidateSchemaResponse - * @static - * @param {google.pubsub.v1.IValidateSchemaResponse} message ValidateSchemaResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidateSchemaResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ValidateSchemaResponse message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ValidateSchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ValidateSchemaResponse} ValidateSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidateSchemaResponse.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ValidateSchemaResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ValidateSchemaResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ValidateSchemaResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ValidateSchemaResponse} ValidateSchemaResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidateSchemaResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidateSchemaResponse message. - * @function verify - * @memberof google.pubsub.v1.ValidateSchemaResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidateSchemaResponse.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - return null; - }; - - /** - * Creates a ValidateSchemaResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ValidateSchemaResponse - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ValidateSchemaResponse} ValidateSchemaResponse - */ - ValidateSchemaResponse.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ValidateSchemaResponse) - return object; - return new $root.google.pubsub.v1.ValidateSchemaResponse(); - }; - - /** - * Creates a plain object from a ValidateSchemaResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ValidateSchemaResponse - * @static - * @param {google.pubsub.v1.ValidateSchemaResponse} message ValidateSchemaResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidateSchemaResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ValidateSchemaResponse to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ValidateSchemaResponse - * @instance - * @returns {Object.} JSON object - */ - ValidateSchemaResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ValidateSchemaResponse - * @function getTypeUrl - * @memberof google.pubsub.v1.ValidateSchemaResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ValidateSchemaResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ValidateSchemaResponse"; - }; - - return ValidateSchemaResponse; - })(); - - v1.ValidateMessageRequest = (function() { - - /** - * Properties of a ValidateMessageRequest. - * @memberof google.pubsub.v1 - * @interface IValidateMessageRequest - * @property {string|null} [parent] ValidateMessageRequest parent - * @property {string|null} [name] ValidateMessageRequest name - * @property {google.pubsub.v1.ISchema|null} [schema] ValidateMessageRequest schema - * @property {Uint8Array|null} [message] ValidateMessageRequest message - * @property {google.pubsub.v1.Encoding|null} [encoding] ValidateMessageRequest encoding - */ - - /** - * Constructs a new ValidateMessageRequest. - * @memberof google.pubsub.v1 - * @classdesc Represents a ValidateMessageRequest. - * @implements IValidateMessageRequest - * @constructor - * @param {google.pubsub.v1.IValidateMessageRequest=} [properties] Properties to set - */ - function ValidateMessageRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ValidateMessageRequest parent. - * @member {string} parent - * @memberof google.pubsub.v1.ValidateMessageRequest - * @instance - */ - ValidateMessageRequest.prototype.parent = ""; - - /** - * ValidateMessageRequest name. - * @member {string|null|undefined} name - * @memberof google.pubsub.v1.ValidateMessageRequest - * @instance - */ - ValidateMessageRequest.prototype.name = null; - - /** - * ValidateMessageRequest schema. - * @member {google.pubsub.v1.ISchema|null|undefined} schema - * @memberof google.pubsub.v1.ValidateMessageRequest - * @instance - */ - ValidateMessageRequest.prototype.schema = null; - - /** - * ValidateMessageRequest message. - * @member {Uint8Array} message - * @memberof google.pubsub.v1.ValidateMessageRequest - * @instance - */ - ValidateMessageRequest.prototype.message = $util.newBuffer([]); - - /** - * ValidateMessageRequest encoding. - * @member {google.pubsub.v1.Encoding} encoding - * @memberof google.pubsub.v1.ValidateMessageRequest - * @instance - */ - ValidateMessageRequest.prototype.encoding = 0; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * ValidateMessageRequest schemaSpec. - * @member {"name"|"schema"|undefined} schemaSpec - * @memberof google.pubsub.v1.ValidateMessageRequest - * @instance - */ - Object.defineProperty(ValidateMessageRequest.prototype, "schemaSpec", { - get: $util.oneOfGetter($oneOfFields = ["name", "schema"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new ValidateMessageRequest instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ValidateMessageRequest - * @static - * @param {google.pubsub.v1.IValidateMessageRequest=} [properties] Properties to set - * @returns {google.pubsub.v1.ValidateMessageRequest} ValidateMessageRequest instance - */ - ValidateMessageRequest.create = function create(properties) { - return new ValidateMessageRequest(properties); - }; - - /** - * Encodes the specified ValidateMessageRequest message. Does not implicitly {@link google.pubsub.v1.ValidateMessageRequest.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ValidateMessageRequest - * @static - * @param {google.pubsub.v1.IValidateMessageRequest} message ValidateMessageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidateMessageRequest.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - $root.google.pubsub.v1.Schema.encode(message.schema, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.message); - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.encoding); - return writer; - }; - - /** - * Encodes the specified ValidateMessageRequest message, length delimited. Does not implicitly {@link google.pubsub.v1.ValidateMessageRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ValidateMessageRequest - * @static - * @param {google.pubsub.v1.IValidateMessageRequest} message ValidateMessageRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidateMessageRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ValidateMessageRequest message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ValidateMessageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ValidateMessageRequest} ValidateMessageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidateMessageRequest.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ValidateMessageRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.name = reader.string(); - break; - } - case 3: { - message.schema = $root.google.pubsub.v1.Schema.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 4: { - message.message = reader.bytes(); - break; - } - case 5: { - message.encoding = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ValidateMessageRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ValidateMessageRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ValidateMessageRequest} ValidateMessageRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidateMessageRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidateMessageRequest message. - * @function verify - * @memberof google.pubsub.v1.ValidateMessageRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidateMessageRequest.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) { - properties.schemaSpec = 1; - if (!$util.isString(message.name)) - return "name: string expected"; - } - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) { - if (properties.schemaSpec === 1) - return "schemaSpec: multiple values"; - properties.schemaSpec = 1; - { - var error = $root.google.pubsub.v1.Schema.verify(message.schema, long + 1); - if (error) - return "schema." + error; - } - } - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - if (!(message.message && typeof message.message.length === "number" || $util.isString(message.message))) - return "message: buffer expected"; - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - switch (message.encoding) { - default: - return "encoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a ValidateMessageRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ValidateMessageRequest - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ValidateMessageRequest} ValidateMessageRequest - */ - ValidateMessageRequest.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ValidateMessageRequest) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.pubsub.v1.ValidateMessageRequest: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.pubsub.v1.ValidateMessageRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.name != null) - message.name = String(object.name); - if (object.schema != null) { - if (!$util.isObject(object.schema)) - throw TypeError(".google.pubsub.v1.ValidateMessageRequest.schema: object expected"); - message.schema = $root.google.pubsub.v1.Schema.fromObject(object.schema, long + 1); - } - if (object.message != null) - if (typeof object.message === "string") - $util.base64.decode(object.message, message.message = $util.newBuffer($util.base64.length(object.message)), 0); - else if (object.message.length >= 0) - message.message = object.message; - switch (object.encoding) { - default: - if (typeof object.encoding === "number") { - message.encoding = object.encoding; - break; - } - break; - case "ENCODING_UNSPECIFIED": - case 0: - message.encoding = 0; - break; - case "JSON": - case 1: - message.encoding = 1; - break; - case "BINARY": - case 2: - message.encoding = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a ValidateMessageRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ValidateMessageRequest - * @static - * @param {google.pubsub.v1.ValidateMessageRequest} message ValidateMessageRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidateMessageRequest.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.parent = ""; - if (options.bytes === String) - object.message = ""; - else { - object.message = []; - if (options.bytes !== Array) - object.message = $util.newBuffer(object.message); - } - object.encoding = options.enums === String ? "ENCODING_UNSPECIFIED" : 0; - } - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - object.parent = message.parent; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) { - object.name = message.name; - if (options.oneofs) - object.schemaSpec = "name"; - } - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) { - object.schema = $root.google.pubsub.v1.Schema.toObject(message.schema, options, q + 1); - if (options.oneofs) - object.schemaSpec = "schema"; - } - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - object.message = options.bytes === String ? $util.base64.encode(message.message, 0, message.message.length) : options.bytes === Array ? Array.prototype.slice.call(message.message) : message.message; - if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) - object.encoding = options.enums === String ? $root.google.pubsub.v1.Encoding[message.encoding] === undefined ? message.encoding : $root.google.pubsub.v1.Encoding[message.encoding] : message.encoding; - return object; - }; - - /** - * Converts this ValidateMessageRequest to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ValidateMessageRequest - * @instance - * @returns {Object.} JSON object - */ - ValidateMessageRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ValidateMessageRequest - * @function getTypeUrl - * @memberof google.pubsub.v1.ValidateMessageRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ValidateMessageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ValidateMessageRequest"; - }; - - return ValidateMessageRequest; - })(); - - v1.ValidateMessageResponse = (function() { - - /** - * Properties of a ValidateMessageResponse. - * @memberof google.pubsub.v1 - * @interface IValidateMessageResponse - */ - - /** - * Constructs a new ValidateMessageResponse. - * @memberof google.pubsub.v1 - * @classdesc Represents a ValidateMessageResponse. - * @implements IValidateMessageResponse - * @constructor - * @param {google.pubsub.v1.IValidateMessageResponse=} [properties] Properties to set - */ - function ValidateMessageResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new ValidateMessageResponse instance using the specified properties. - * @function create - * @memberof google.pubsub.v1.ValidateMessageResponse - * @static - * @param {google.pubsub.v1.IValidateMessageResponse=} [properties] Properties to set - * @returns {google.pubsub.v1.ValidateMessageResponse} ValidateMessageResponse instance - */ - ValidateMessageResponse.create = function create(properties) { - return new ValidateMessageResponse(properties); - }; - - /** - * Encodes the specified ValidateMessageResponse message. Does not implicitly {@link google.pubsub.v1.ValidateMessageResponse.verify|verify} messages. - * @function encode - * @memberof google.pubsub.v1.ValidateMessageResponse - * @static - * @param {google.pubsub.v1.IValidateMessageResponse} message ValidateMessageResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidateMessageResponse.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - return writer; - }; - - /** - * Encodes the specified ValidateMessageResponse message, length delimited. Does not implicitly {@link google.pubsub.v1.ValidateMessageResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.pubsub.v1.ValidateMessageResponse - * @static - * @param {google.pubsub.v1.IValidateMessageResponse} message ValidateMessageResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ValidateMessageResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ValidateMessageResponse message from the specified reader or buffer. - * @function decode - * @memberof google.pubsub.v1.ValidateMessageResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.pubsub.v1.ValidateMessageResponse} ValidateMessageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidateMessageResponse.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.pubsub.v1.ValidateMessageResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ValidateMessageResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.pubsub.v1.ValidateMessageResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.pubsub.v1.ValidateMessageResponse} ValidateMessageResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ValidateMessageResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ValidateMessageResponse message. - * @function verify - * @memberof google.pubsub.v1.ValidateMessageResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ValidateMessageResponse.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - return null; - }; - - /** - * Creates a ValidateMessageResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.pubsub.v1.ValidateMessageResponse - * @static - * @param {Object.} object Plain object - * @returns {google.pubsub.v1.ValidateMessageResponse} ValidateMessageResponse - */ - ValidateMessageResponse.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.pubsub.v1.ValidateMessageResponse) - return object; - return new $root.google.pubsub.v1.ValidateMessageResponse(); - }; - - /** - * Creates a plain object from a ValidateMessageResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.pubsub.v1.ValidateMessageResponse - * @static - * @param {google.pubsub.v1.ValidateMessageResponse} message ValidateMessageResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ValidateMessageResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this ValidateMessageResponse to JSON. - * @function toJSON - * @memberof google.pubsub.v1.ValidateMessageResponse - * @instance - * @returns {Object.} JSON object - */ - ValidateMessageResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ValidateMessageResponse - * @function getTypeUrl - * @memberof google.pubsub.v1.ValidateMessageResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ValidateMessageResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.pubsub.v1.ValidateMessageResponse"; - }; - - return ValidateMessageResponse; - })(); - - /** - * Encoding enum. - * @name google.pubsub.v1.Encoding - * @enum {number} - * @property {number} ENCODING_UNSPECIFIED=0 ENCODING_UNSPECIFIED value - * @property {number} JSON=1 JSON value - * @property {number} BINARY=2 BINARY value - */ - v1.Encoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENCODING_UNSPECIFIED"] = 0; - values[valuesById[1] = "JSON"] = 1; - values[valuesById[2] = "BINARY"] = 2; - return values; - })(); - - return v1; - })(); - - return pubsub; - })(); - - 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 - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.rules != null && Object.hasOwnProperty.call(message, "rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i], long + 1); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.api.Http) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.Http: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 (!$util.isObject(object.rules[i])) - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i], long + 1); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - 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, q + 1); - } - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * 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; - })(); - - api.HttpRule = (function() { - - /** - * 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 HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 - */ - 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 body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork(), q + 1).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && Object.hasOwnProperty.call(message, "get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && Object.hasOwnProperty.call(message, "put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && Object.hasOwnProperty.call(message, "post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom, long + 1); - if (error) - return "custom." + error; - } - } - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && Object.hasOwnProperty.call(message, "additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i], long + 1); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.HttpRule) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.HttpRule: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 (!$util.isObject(object.custom)) - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom, long + 1); - } - 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 (!$util.isObject(object.additionalBindings[i])) - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i], long + 1); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - object.selector = message.selector; - if (message.get != null && Object.hasOwnProperty.call(message, "get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && Object.hasOwnProperty.call(message, "put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && Object.hasOwnProperty.call(message, "post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - object.body = message.body; - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options, q + 1); - 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, q + 1); - } - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - object.responseBody = message.responseBody; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * 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; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.kind = reader.string(); - break; - } - case 2: { - message.path = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.CustomHttpPattern: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - object.kind = message.kind; - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * 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"; - }; - - return CustomHttpPattern; - })(); - - api.CommonLanguageSettings = (function() { - - /** - * Properties of a CommonLanguageSettings. - * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations - * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration - */ - - /** - * Constructs a new CommonLanguageSettings. - * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings - * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - */ - function CommonLanguageSettings(properties) { - this.destinations = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; - - /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; - - /** - * CommonLanguageSettings selectiveGapicGeneration. - * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.selectiveGapicGeneration = null; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @function create - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance - */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); - }; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } - if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) - $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.referenceDocsUri = reader.string(); - break; - } - case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); - break; - } - case 3: { - message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonLanguageSettings message. - * @function verify - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonLanguageSettings.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - if (!$util.isString(message.referenceDocsUri)) - return "referenceDocsUri: string expected"; - if (message.destinations != null && Object.hasOwnProperty.call(message, "destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } - } - if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) { - var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration, long + 1); - if (error) - return "selectiveGapicGeneration." + error; - } - return null; - }; - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - */ - CommonLanguageSettings.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.CommonLanguageSettings) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.CommonLanguageSettings: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.api.CommonLanguageSettings(); - if (object.referenceDocsUri != null) - message.referenceDocsUri = String(object.referenceDocsUri); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } - } - if (object.selectiveGapicGeneration != null) { - if (!$util.isObject(object.selectiveGapicGeneration)) - throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); - message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonLanguageSettings.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.destinations = []; - if (options.defaults) { - object.referenceDocsUri = ""; - object.selectiveGapicGeneration = null; - } - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; - } - if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) - object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options, q + 1); - return object; - }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @function toJSON - * @memberof google.api.CommonLanguageSettings - * @instance - * @returns {Object.} JSON object - */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonLanguageSettings - * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; - }; - - return CommonLanguageSettings; - })(); - - api.ClientLibrarySettings = (function() { - - /** - * Properties of a ClientLibrarySettings. - * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings - */ - - /** - * Constructs a new ClientLibrarySettings. - * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings - * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - */ - function ClientLibrarySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.version = ""; - - /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.launchStage = 0; - - /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.restNumericEnums = false; - - /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.javaSettings = null; - - /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.cppSettings = null; - - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; - - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; - - /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.nodeSettings = null; - - /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.dotnetSettings = null; - - /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.rubySettings = null; - - /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.goSettings = null; - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @function create - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance - */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); - }; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork(), q + 1).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork(), q + 1).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork(), q + 1).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork(), q + 1).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork(), q + 1).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork(), q + 1).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork(), q + 1).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.launchStage = reader.int32(); - break; - } - case 3: { - message.restNumericEnums = reader.bool(); - break; - } - case 21: { - message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientLibrarySettings message. - * @function verify - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientLibrarySettings.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - if (typeof message.restNumericEnums !== "boolean") - return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) { - var error = $root.google.api.JavaSettings.verify(message.javaSettings, long + 1); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings, long + 1); - if (error) - return "cppSettings." + error; - } - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings, long + 1); - if (error) - return "phpSettings." + error; - } - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings, long + 1); - if (error) - return "pythonSettings." + error; - } - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings, long + 1); - if (error) - return "nodeSettings." + error; - } - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings, long + 1); - if (error) - return "dotnetSettings." + error; - } - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings, long + 1); - if (error) - return "rubySettings." + error; - } - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings, long + 1); - if (error) - return "goSettings." + error; - } - return null; - }; - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - */ - ClientLibrarySettings.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.ClientLibrarySettings) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.ClientLibrarySettings: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.api.ClientLibrarySettings(); - if (object.version != null) - message.version = String(object.version); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.restNumericEnums != null) - message.restNumericEnums = Boolean(object.restNumericEnums); - if (object.javaSettings != null) { - if (!$util.isObject(object.javaSettings)) - throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); - message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings, long + 1); - } - if (object.cppSettings != null) { - if (!$util.isObject(object.cppSettings)) - throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); - message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings, long + 1); - } - if (object.phpSettings != null) { - if (!$util.isObject(object.phpSettings)) - throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); - message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings, long + 1); - } - if (object.pythonSettings != null) { - if (!$util.isObject(object.pythonSettings)) - throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); - message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings, long + 1); - } - if (object.nodeSettings != null) { - if (!$util.isObject(object.nodeSettings)) - throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); - message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings, long + 1); - } - if (object.dotnetSettings != null) { - if (!$util.isObject(object.dotnetSettings)) - throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); - message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings, long + 1); - } - if (object.rubySettings != null) { - if (!$util.isObject(object.rubySettings)) - throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); - message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings, long + 1); - } - if (object.goSettings != null) { - if (!$util.isObject(object.goSettings)) - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientLibrarySettings.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.version = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.restNumericEnums = false; - object.javaSettings = null; - object.cppSettings = null; - object.phpSettings = null; - object.pythonSettings = null; - object.nodeSettings = null; - object.dotnetSettings = null; - object.rubySettings = null; - object.goSettings = null; - } - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - object.version = message.version; - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options, q + 1); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options, q + 1); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options, q + 1); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options, q + 1); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options, q + 1); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options, q + 1); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options, q + 1); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options, q + 1); - return object; - }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @function toJSON - * @memberof google.api.ClientLibrarySettings - * @instance - * @returns {Object.} JSON object - */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientLibrarySettings - * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; - }; - - return ClientLibrarySettings; - })(); - - api.Publishing = (function() { - - /** - * Properties of a Publishing. - * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri - * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri - */ - - /** - * Constructs a new Publishing. - * @memberof google.api - * @classdesc Represents a Publishing. - * @implements IPublishing - * @constructor - * @param {google.api.IPublishing=} [properties] Properties to set - */ - function Publishing(properties) { - this.methodSettings = []; - this.codeownerGithubTeams = []; - this.librarySettings = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Publishing methodSettings. - * @member {Array.} methodSettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.methodSettings = $util.emptyArray; - - /** - * Publishing newIssueUri. - * @member {string} newIssueUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.newIssueUri = ""; - - /** - * Publishing documentationUri. - * @member {string} documentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.documentationUri = ""; - - /** - * Publishing apiShortName. - * @member {string} apiShortName - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.apiShortName = ""; - - /** - * Publishing githubLabel. - * @member {string} githubLabel - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.githubLabel = ""; - - /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; - - /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.docTagPrefix = ""; - - /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.organization = 0; - - /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.librarySettings = $util.emptyArray; - - /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.protoReferenceDocumentationUri = ""; - - /** - * Publishing restReferenceDocumentationUri. - * @member {string} restReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.restReferenceDocumentationUri = ""; - - /** - * Creates a new Publishing instance using the specified properties. - * @function create - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance - */ - Publishing.create = function create(properties) { - return new Publishing(properties); - }; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encode - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork(), q + 1).ldelim(); - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) - writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); - return writer; - }; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @function decode - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 101: { - message.newIssueUri = reader.string(); - break; - } - case 102: { - message.documentationUri = reader.string(); - break; - } - case 103: { - message.apiShortName = reader.string(); - break; - } - case 104: { - message.githubLabel = reader.string(); - break; - } - case 105: { - if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) - message.codeownerGithubTeams = []; - message.codeownerGithubTeams.push(reader.string()); - break; - } - case 106: { - message.docTagPrefix = reader.string(); - break; - } - case 107: { - message.organization = reader.int32(); - break; - } - case 109: { - if (!(message.librarySettings && message.librarySettings.length)) - message.librarySettings = []; - message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); - break; - } - case 111: { - message.restReferenceDocumentationUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publishing message. - * @function verify - * @memberof google.api.Publishing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publishing.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.methodSettings != null && Object.hasOwnProperty.call(message, "methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i], long + 1); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && Object.hasOwnProperty.call(message, "codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - switch (message.organization) { - default: - return "organization: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.librarySettings != null && Object.hasOwnProperty.call(message, "librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i], long + 1); - if (error) - return "librarySettings." + error; - } - } - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) - if (!$util.isString(message.restReferenceDocumentationUri)) - return "restReferenceDocumentationUri: string expected"; - return null; - }; - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Publishing - * @static - * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing - */ - Publishing.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.Publishing) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.Publishing: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.api.Publishing(); - if (object.methodSettings) { - if (!Array.isArray(object.methodSettings)) - throw TypeError(".google.api.Publishing.methodSettings: array expected"); - message.methodSettings = []; - for (var i = 0; i < object.methodSettings.length; ++i) { - if (!$util.isObject(object.methodSettings[i])) - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i], long + 1); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { - default: - if (typeof object.organization === "number") { - message.organization = object.organization; - break; - } - break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": - case 0: - message.organization = 0; - break; - case "CLOUD": - case 1: - message.organization = 1; - break; - case "ADS": - case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - case "SHOPPING": - case 5: - message.organization = 5; - break; - case "GEO": - case 6: - message.organization = 6; - break; - case "GENERATIVE_AI": - case 7: - message.organization = 7; - break; - } - if (object.librarySettings) { - if (!Array.isArray(object.librarySettings)) - throw TypeError(".google.api.Publishing.librarySettings: array expected"); - message.librarySettings = []; - for (var i = 0; i < object.librarySettings.length; ++i) { - if (!$util.isObject(object.librarySettings[i])) - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i], long + 1); - } - } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); - if (object.restReferenceDocumentationUri != null) - message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); - return message; - }; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Publishing - * @static - * @param {google.api.Publishing} message Publishing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Publishing.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; - } - if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - object.protoReferenceDocumentationUri = ""; - object.restReferenceDocumentationUri = ""; - } - if (message.methodSettings && message.methodSettings.length) { - object.methodSettings = []; - for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options, q + 1); - } - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; - } - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options, q + 1); - } - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) - object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; - return object; - }; - - /** - * Converts this Publishing to JSON. - * @function toJSON - * @memberof google.api.Publishing - * @instance - * @returns {Object.} JSON object - */ - Publishing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Publishing - * @function getTypeUrl - * @memberof google.api.Publishing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Publishing"; - }; - - return Publishing; - })(); - - api.JavaSettings = (function() { - - /** - * Properties of a JavaSettings. - * @memberof google.api - * @interface IJavaSettings - * @property {string|null} [libraryPackage] JavaSettings libraryPackage - * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames - * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common - */ - - /** - * Constructs a new JavaSettings. - * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings - * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set - */ - function JavaSettings(properties) { - this.serviceClassNames = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.libraryPackage = ""; - - /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; - - /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.common = null; - - /** - * Creates a new JavaSettings instance using the specified properties. - * @function create - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance - */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); - }; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encode - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.libraryPackage = reader.string(); - break; - } - case 2: { - if (message.serviceClassNames === $util.emptyObject) - message.serviceClassNames = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7, long); - break; - } - } - if (key === "__proto__") - $util.makeProp(message.serviceClassNames, key); - message.serviceClassNames[key] = value; - break; - } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JavaSettings message. - * @function verify - * @memberof google.api.JavaSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JavaSettings.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - if (!$util.isString(message.libraryPackage)) - return "libraryPackage: string expected"; - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) { - if (!$util.isObject(message.serviceClassNames)) - return "serviceClassNames: object expected"; - var key = Object.keys(message.serviceClassNames); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && Object.hasOwnProperty.call(message, "common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.JavaSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings - */ - JavaSettings.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.JavaSettings) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.JavaSettings: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.api.JavaSettings(); - if (object.libraryPackage != null) - message.libraryPackage = String(object.libraryPackage); - if (object.serviceClassNames) { - if (!$util.isObject(object.serviceClassNames)) - throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); - message.serviceClassNames = {}; - for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) { - if (keys[i] === "__proto__") - $util.makeProp(message.serviceClassNames, keys[i]); - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - } - if (object.common != null) { - if (!$util.isObject(object.common)) - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.JavaSettings - * @static - * @param {google.api.JavaSettings} message JavaSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JavaSettings.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; - object.common = null; - } - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) { - if (keys2[j] === "__proto__") - $util.makeProp(object.serviceClassNames, keys2[j]); - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; - } - } - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); - return object; - }; - - /** - * Converts this JavaSettings to JSON. - * @function toJSON - * @memberof google.api.JavaSettings - * @instance - * @returns {Object.} JSON object - */ - JavaSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JavaSettings - * @function getTypeUrl - * @memberof google.api.JavaSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.JavaSettings"; - }; - - return JavaSettings; - })(); - - api.CppSettings = (function() { - - /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common - */ - - /** - * Constructs a new CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings - * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set - */ - function CppSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings - * @instance - */ - CppSettings.prototype.common = null; - - /** - * Creates a new CppSettings instance using the specified properties. - * @function create - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance - */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); - }; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CppSettings message. - * @function verify - * @memberof google.api.CppSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CppSettings.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CppSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings - */ - CppSettings.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.CppSettings) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.CppSettings: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.api.CppSettings(); - if (object.common != null) { - if (!$util.isObject(object.common)) - throw TypeError(".google.api.CppSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CppSettings - * @static - * @param {google.api.CppSettings} message CppSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CppSettings.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); - return object; - }; - - /** - * Converts this CppSettings to JSON. - * @function toJSON - * @memberof google.api.CppSettings - * @instance - * @returns {Object.} JSON object - */ - CppSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CppSettings - * @function getTypeUrl - * @memberof google.api.CppSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CppSettings"; - }; - - return CppSettings; - })(); - - api.PhpSettings = (function() { - - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ - - /** - * Constructs a new PhpSettings. - * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings - * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set - */ - function PhpSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; - - /** - * Creates a new PhpSettings instance using the specified properties. - * @function create - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance - */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); - }; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhpSettings message. - * @function verify - * @memberof google.api.PhpSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhpSettings.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PhpSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings - */ - PhpSettings.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.PhpSettings) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.PhpSettings: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.api.PhpSettings(); - if (object.common != null) { - if (!$util.isObject(object.common)) - throw TypeError(".google.api.PhpSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PhpSettings - * @static - * @param {google.api.PhpSettings} message PhpSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhpSettings.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); - return object; - }; - - /** - * Converts this PhpSettings to JSON. - * @function toJSON - * @memberof google.api.PhpSettings - * @instance - * @returns {Object.} JSON object - */ - PhpSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhpSettings - * @function getTypeUrl - * @memberof google.api.PhpSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PhpSettings"; - }; - - return PhpSettings; - })(); - - api.PythonSettings = (function() { - - /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common - * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures - */ - - /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings - * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set - */ - function PythonSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.common = null; - - /** - * PythonSettings experimentalFeatures. - * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.experimentalFeatures = null; - - /** - * Creates a new PythonSettings instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance - */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); - }; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) - $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 2: { - message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonSettings message. - * @function verify - * @memberof google.api.PythonSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonSettings.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); - if (error) - return "common." + error; - } - if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) { - var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures, long + 1); - if (error) - return "experimentalFeatures." + error; - } - return null; - }; - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings - */ - PythonSettings.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.PythonSettings) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.PythonSettings: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.api.PythonSettings(); - if (object.common != null) { - if (!$util.isObject(object.common)) - throw TypeError(".google.api.PythonSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); - } - if (object.experimentalFeatures != null) { - if (!$util.isObject(object.experimentalFeatures)) - throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); - message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings - * @static - * @param {google.api.PythonSettings} message PythonSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonSettings.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.common = null; - object.experimentalFeatures = null; - } - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); - if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) - object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options, q + 1); - return object; - }; - - /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings - * @instance - * @returns {Object.} JSON object - */ - PythonSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonSettings - * @function getTypeUrl - * @memberof google.api.PythonSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings"; - }; - - PythonSettings.ExperimentalFeatures = (function() { - - /** - * Properties of an ExperimentalFeatures. - * @memberof google.api.PythonSettings - * @interface IExperimentalFeatures - * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled - * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled - * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled - */ - - /** - * Constructs a new ExperimentalFeatures. - * @memberof google.api.PythonSettings - * @classdesc Represents an ExperimentalFeatures. - * @implements IExperimentalFeatures - * @constructor - * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set - */ - function ExperimentalFeatures(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExperimentalFeatures restAsyncIoEnabled. - * @member {boolean} restAsyncIoEnabled - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @instance - */ - ExperimentalFeatures.prototype.restAsyncIoEnabled = false; - - /** - * ExperimentalFeatures protobufPythonicTypesEnabled. - * @member {boolean} protobufPythonicTypesEnabled - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @instance - */ - ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; - - /** - * ExperimentalFeatures unversionedPackageDisabled. - * @member {boolean} unversionedPackageDisabled - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @instance - */ - ExperimentalFeatures.prototype.unversionedPackageDisabled = false; - - /** - * Creates a new ExperimentalFeatures instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set - * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance - */ - ExperimentalFeatures.create = function create(properties) { - return new ExperimentalFeatures(properties); - }; - - /** - * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExperimentalFeatures.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); - if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); - if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); - return writer; - }; - - /** - * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an ExperimentalFeatures message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExperimentalFeatures.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.restAsyncIoEnabled = reader.bool(); - break; - } - case 2: { - message.protobufPythonicTypesEnabled = reader.bool(); - break; - } - case 3: { - message.unversionedPackageDisabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExperimentalFeatures message. - * @function verify - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExperimentalFeatures.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) - if (typeof message.restAsyncIoEnabled !== "boolean") - return "restAsyncIoEnabled: boolean expected"; - if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) - if (typeof message.protobufPythonicTypesEnabled !== "boolean") - return "protobufPythonicTypesEnabled: boolean expected"; - if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) - if (typeof message.unversionedPackageDisabled !== "boolean") - return "unversionedPackageDisabled: boolean expected"; - return null; - }; - - /** - * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures - */ - ExperimentalFeatures.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.PythonSettings.ExperimentalFeatures: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); - if (object.restAsyncIoEnabled != null) - message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); - if (object.protobufPythonicTypesEnabled != null) - message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); - if (object.unversionedPackageDisabled != null) - message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); - return message; - }; - - /** - * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExperimentalFeatures.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.restAsyncIoEnabled = false; - object.protobufPythonicTypesEnabled = false; - object.unversionedPackageDisabled = false; - } - if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) - object.restAsyncIoEnabled = message.restAsyncIoEnabled; - if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) - object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; - if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) - object.unversionedPackageDisabled = message.unversionedPackageDisabled; - return object; - }; - - /** - * Converts this ExperimentalFeatures to JSON. - * @function toJSON - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @instance - * @returns {Object.} JSON object - */ - ExperimentalFeatures.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExperimentalFeatures - * @function getTypeUrl - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; - }; - - return ExperimentalFeatures; - })(); - - return PythonSettings; - })(); - - api.NodeSettings = (function() { - - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ - - /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set - */ - function NodeSettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; - - /** - * Creates a new NodeSettings instance using the specified properties. - * @function create - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance - */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); - }; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encode - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeSettings message. - * @function verify - * @memberof google.api.NodeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeSettings.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.NodeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings - */ - NodeSettings.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.NodeSettings) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.NodeSettings: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.api.NodeSettings(); - if (object.common != null) { - if (!$util.isObject(object.common)) - throw TypeError(".google.api.NodeSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.NodeSettings - * @static - * @param {google.api.NodeSettings} message NodeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeSettings.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); - return object; - }; - - /** - * Converts this NodeSettings to JSON. - * @function toJSON - * @memberof google.api.NodeSettings - * @instance - * @returns {Object.} JSON object - */ - NodeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeSettings - * @function getTypeUrl - * @memberof google.api.NodeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; - - return NodeSettings; - })(); - - api.DotnetSettings = (function() { - - /** - * Properties of a DotnetSettings. - * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @property {Object.|null} [renamedServices] DotnetSettings renamedServices - * @property {Object.|null} [renamedResources] DotnetSettings renamedResources - * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources - * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases - * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures - */ - - /** - * Constructs a new DotnetSettings. - * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings - * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set - */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * DotnetSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.common = null; - - /** - * DotnetSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; - - /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; - - /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; - - /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; - - /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @function create - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings=} [properties] Properties to set - * @returns {google.api.DotnetSettings} DotnetSettings instance - */ - DotnetSettings.create = function create(properties) { - return new DotnetSettings(properties); - }; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encode - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) - for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); - if (message.ignoredResources != null && message.ignoredResources.length) - for (var i = 0; i < message.ignoredResources.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); - if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); - if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); - return writer; - }; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7, long); - break; - } - } - if (key === "__proto__") - $util.makeProp(message.renamedServices, key); - message.renamedServices[key] = value; - break; - } - case 3: { - if (message.renamedResources === $util.emptyObject) - message.renamedResources = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7, long); - break; - } - } - if (key === "__proto__") - $util.makeProp(message.renamedResources, key); - message.renamedResources[key] = value; - break; - } - case 4: { - if (!(message.ignoredResources && message.ignoredResources.length)) - message.ignoredResources = []; - message.ignoredResources.push(reader.string()); - break; - } - case 5: { - if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) - message.forcedNamespaceAliases = []; - message.forcedNamespaceAliases.push(reader.string()); - break; - } - case 6: { - if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) - message.handwrittenSignatures = []; - message.handwrittenSignatures.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DotnetSettings message. - * @function verify - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DotnetSettings.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); - if (error) - return "common." + error; - } - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) { - if (!$util.isObject(message.renamedServices)) - return "renamedServices: object expected"; - var key = Object.keys(message.renamedServices); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) { - if (!$util.isObject(message.renamedResources)) - return "renamedResources: object expected"; - var key = Object.keys(message.renamedResources); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedResources[key[i]])) - return "renamedResources: string{k:string} expected"; - } - if (message.ignoredResources != null && Object.hasOwnProperty.call(message, "ignoredResources")) { - if (!Array.isArray(message.ignoredResources)) - return "ignoredResources: array expected"; - for (var i = 0; i < message.ignoredResources.length; ++i) - if (!$util.isString(message.ignoredResources[i])) - return "ignoredResources: string[] expected"; - } - if (message.forcedNamespaceAliases != null && Object.hasOwnProperty.call(message, "forcedNamespaceAliases")) { - if (!Array.isArray(message.forcedNamespaceAliases)) - return "forcedNamespaceAliases: array expected"; - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - if (!$util.isString(message.forcedNamespaceAliases[i])) - return "forcedNamespaceAliases: string[] expected"; - } - if (message.handwrittenSignatures != null && Object.hasOwnProperty.call(message, "handwrittenSignatures")) { - if (!Array.isArray(message.handwrittenSignatures)) - return "handwrittenSignatures: array expected"; - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - if (!$util.isString(message.handwrittenSignatures[i])) - return "handwrittenSignatures: string[] expected"; - } - return null; - }; - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.DotnetSettings} DotnetSettings - */ - DotnetSettings.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.DotnetSettings) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.DotnetSettings: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.api.DotnetSettings(); - if (object.common != null) { - if (!$util.isObject(object.common)) - throw TypeError(".google.api.DotnetSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); - } - if (object.renamedServices) { - if (!$util.isObject(object.renamedServices)) - throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) { - if (keys[i] === "__proto__") - $util.makeProp(message.renamedServices, keys[i]); - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - } - if (object.renamedResources) { - if (!$util.isObject(object.renamedResources)) - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) { - if (keys[i] === "__proto__") - $util.makeProp(message.renamedResources, keys[i]); - message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); - } - } - if (object.ignoredResources) { - if (!Array.isArray(object.ignoredResources)) - throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); - message.ignoredResources = []; - for (var i = 0; i < object.ignoredResources.length; ++i) - message.ignoredResources[i] = String(object.ignoredResources[i]); - } - if (object.forcedNamespaceAliases) { - if (!Array.isArray(object.forcedNamespaceAliases)) - throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); - message.forcedNamespaceAliases = []; - for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) - message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); - } - if (object.handwrittenSignatures) { - if (!Array.isArray(object.handwrittenSignatures)) - throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); - message.handwrittenSignatures = []; - for (var i = 0; i < object.handwrittenSignatures.length; ++i) - message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); - } - return message; - }; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.DotnetSettings} message DotnetSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DotnetSettings.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) { - object.ignoredResources = []; - object.forcedNamespaceAliases = []; - object.handwrittenSignatures = []; - } - if (options.objects || options.defaults) { - object.renamedServices = {}; - object.renamedResources = {}; - } - if (options.defaults) - object.common = null; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) { - if (keys2[j] === "__proto__") - $util.makeProp(object.renamedServices, keys2[j]); - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - } - if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { - object.renamedResources = {}; - for (var j = 0; j < keys2.length; ++j) { - if (keys2[j] === "__proto__") - $util.makeProp(object.renamedResources, keys2[j]); - object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; - } - } - if (message.ignoredResources && message.ignoredResources.length) { - object.ignoredResources = []; - for (var j = 0; j < message.ignoredResources.length; ++j) - object.ignoredResources[j] = message.ignoredResources[j]; - } - if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { - object.forcedNamespaceAliases = []; - for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) - object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; - } - if (message.handwrittenSignatures && message.handwrittenSignatures.length) { - object.handwrittenSignatures = []; - for (var j = 0; j < message.handwrittenSignatures.length; ++j) - object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; - } - return object; - }; - - /** - * Converts this DotnetSettings to JSON. - * @function toJSON - * @memberof google.api.DotnetSettings - * @instance - * @returns {Object.} JSON object - */ - DotnetSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DotnetSettings - * @function getTypeUrl - * @memberof google.api.DotnetSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.DotnetSettings"; - }; - - return DotnetSettings; - })(); - - api.RubySettings = (function() { - - /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common - */ - - /** - * Constructs a new RubySettings. - * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings - * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set - */ - function RubySettings(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; - - /** - * Creates a new RubySettings instance using the specified properties. - * @function create - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance - */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); - }; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encode - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RubySettings message. - * @function verify - * @memberof google.api.RubySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RubySettings.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.RubySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings - */ - RubySettings.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.RubySettings) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.RubySettings: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.api.RubySettings(); - if (object.common != null) { - if (!$util.isObject(object.common)) - throw TypeError(".google.api.RubySettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.RubySettings - * @static - * @param {google.api.RubySettings} message RubySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RubySettings.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); - return object; - }; - - /** - * Converts this RubySettings to JSON. - * @function toJSON - * @memberof google.api.RubySettings - * @instance - * @returns {Object.} JSON object - */ - RubySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RubySettings - * @function getTypeUrl - * @memberof google.api.RubySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.RubySettings"; - }; - - return RubySettings; - })(); - - api.GoSettings = (function() { - - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - * @property {Object.|null} [renamedServices] GoSettings renamedServices - */ - - /** - * Constructs a new GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings - * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set - */ - function GoSettings(properties) { - this.renamedServices = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; - - /** - * GoSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.renamedServices = $util.emptyObject; - - /** - * Creates a new GoSettings instance using the specified properties. - * @function create - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance - */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); - }; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encode - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7, long); - break; - } - } - if (key === "__proto__") - $util.makeProp(message.renamedServices, key); - message.renamedServices[key] = value; - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoSettings message. - * @function verify - * @memberof google.api.GoSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoSettings.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); - if (error) - return "common." + error; - } - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) { - if (!$util.isObject(message.renamedServices)) - return "renamedServices: object expected"; - var key = Object.keys(message.renamedServices); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.GoSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings - */ - GoSettings.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.GoSettings) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.GoSettings: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.api.GoSettings(); - if (object.common != null) { - if (!$util.isObject(object.common)) - throw TypeError(".google.api.GoSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); - } - if (object.renamedServices) { - if (!$util.isObject(object.renamedServices)) - throw TypeError(".google.api.GoSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) { - if (keys[i] === "__proto__") - $util.makeProp(message.renamedServices, keys[i]); - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - } - return message; - }; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.GoSettings - * @static - * @param {google.api.GoSettings} message GoSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoSettings.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.objects || options.defaults) - object.renamedServices = {}; - if (options.defaults) - object.common = null; - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options, q + 1); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) { - if (keys2[j] === "__proto__") - $util.makeProp(object.renamedServices, keys2[j]); - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - } - return object; - }; - - /** - * Converts this GoSettings to JSON. - * @function toJSON - * @memberof google.api.GoSettings - * @instance - * @returns {Object.} JSON object - */ - GoSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoSettings - * @function getTypeUrl - * @memberof google.api.GoSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.GoSettings"; - }; - - return GoSettings; - })(); - - api.MethodSettings = (function() { - - /** - * Properties of a MethodSettings. - * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields - */ - - /** - * Constructs a new MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings - * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set - */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.selector = ""; - - /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.longRunning = null; - - /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance - */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); - }; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); - return writer; - }; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodSettings message. - * @function verify - * @memberof google.api.MethodSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodSettings.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) { - var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning, long + 1); - if (error) - return "longRunning." + error; - } - if (message.autoPopulatedFields != null && Object.hasOwnProperty.call(message, "autoPopulatedFields")) { - if (!Array.isArray(message.autoPopulatedFields)) - return "autoPopulatedFields: array expected"; - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - if (!$util.isString(message.autoPopulatedFields[i])) - return "autoPopulatedFields: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings - */ - MethodSettings.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.MethodSettings) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.MethodSettings: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.api.MethodSettings(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.longRunning != null) { - if (!$util.isObject(object.longRunning)) - throw TypeError(".google.api.MethodSettings.longRunning: object expected"); - message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning, long + 1); - } - if (object.autoPopulatedFields) { - if (!Array.isArray(object.autoPopulatedFields)) - throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); - message.autoPopulatedFields = []; - for (var i = 0; i < object.autoPopulatedFields.length; ++i) - message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings - * @static - * @param {google.api.MethodSettings} message MethodSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodSettings.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; - if (options.defaults) { - object.selector = ""; - object.longRunning = null; - } - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - object.selector = message.selector; - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options, q + 1); - if (message.autoPopulatedFields && message.autoPopulatedFields.length) { - object.autoPopulatedFields = []; - for (var j = 0; j < message.autoPopulatedFields.length; ++j) - object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; - } - return object; - }; - - /** - * Converts this MethodSettings to JSON. - * @function toJSON - * @memberof google.api.MethodSettings - * @instance - * @returns {Object.} JSON object - */ - MethodSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodSettings - * @function getTypeUrl - * @memberof google.api.MethodSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings"; - }; - - MethodSettings.LongRunning = (function() { - - /** - * Properties of a LongRunning. - * @memberof google.api.MethodSettings - * @interface ILongRunning - * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay - * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier - * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay - * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout - */ - - /** - * Constructs a new LongRunning. - * @memberof google.api.MethodSettings - * @classdesc Represents a LongRunning. - * @implements ILongRunning - * @constructor - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - */ - function LongRunning(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; - - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; - - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; - - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; - - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay, long + 1); - if (error) - return "initialPollDelay." + error; - } - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - if (typeof message.pollDelayMultiplier !== "number") - return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.maxPollDelay, long + 1); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout, long + 1); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.MethodSettings.LongRunning: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.api.MethodSettings.LongRunning(); - if (object.initialPollDelay != null) { - if (!$util.isObject(object.initialPollDelay)) - throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); - message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay, long + 1); - } - if (object.pollDelayMultiplier != null) - message.pollDelayMultiplier = Number(object.pollDelayMultiplier); - if (object.maxPollDelay != null) { - if (!$util.isObject(object.maxPollDelay)) - throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); - message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay, long + 1); - } - if (object.totalPollTimeout != null) { - if (!$util.isObject(object.totalPollTimeout)) - throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); - message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LongRunning.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.initialPollDelay = null; - object.pollDelayMultiplier = 0; - object.maxPollDelay = null; - object.totalPollTimeout = null; - } - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options, q + 1); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options, q + 1); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options, q + 1); - return object; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @property {number} SHOPPING=5 SHOPPING value - * @property {number} GEO=6 GEO value - * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value - */ - api.ClientLibraryOrganization = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD"] = 1; - values[valuesById[2] = "ADS"] = 2; - values[valuesById[3] = "PHOTOS"] = 3; - values[valuesById[4] = "STREET_VIEW"] = 4; - values[valuesById[5] = "SHOPPING"] = 5; - values[valuesById[6] = "GEO"] = 6; - values[valuesById[7] = "GENERATIVE_AI"] = 7; - return values; - })(); - - /** - * ClientLibraryDestination enum. - * @name google.api.ClientLibraryDestination - * @enum {number} - * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value - * @property {number} GITHUB=10 GITHUB value - * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value - */ - api.ClientLibraryDestination = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; - values[valuesById[10] = "GITHUB"] = 10; - values[valuesById[20] = "PACKAGE_MANAGER"] = 20; - return values; - })(); - - api.SelectiveGapicGeneration = (function() { - - /** - * Properties of a SelectiveGapicGeneration. - * @memberof google.api - * @interface ISelectiveGapicGeneration - * @property {Array.|null} [methods] SelectiveGapicGeneration methods - * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal - */ - - /** - * Constructs a new SelectiveGapicGeneration. - * @memberof google.api - * @classdesc Represents a SelectiveGapicGeneration. - * @implements ISelectiveGapicGeneration - * @constructor - * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set - */ - function SelectiveGapicGeneration(properties) { - this.methods = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * SelectiveGapicGeneration methods. - * @member {Array.} methods - * @memberof google.api.SelectiveGapicGeneration - * @instance - */ - SelectiveGapicGeneration.prototype.methods = $util.emptyArray; - - /** - * SelectiveGapicGeneration generateOmittedAsInternal. - * @member {boolean} generateOmittedAsInternal - * @memberof google.api.SelectiveGapicGeneration - * @instance - */ - SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; - - /** - * Creates a new SelectiveGapicGeneration instance using the specified properties. - * @function create - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set - * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance - */ - SelectiveGapicGeneration.create = function create(properties) { - return new SelectiveGapicGeneration(properties); - }; - - /** - * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. - * @function encode - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SelectiveGapicGeneration.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.methods != null && message.methods.length) - for (var i = 0; i < message.methods.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); - if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); - return writer; - }; - - /** - * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. - * @function decode - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SelectiveGapicGeneration.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.methods && message.methods.length)) - message.methods = []; - message.methods.push(reader.string()); - break; - } - case 2: { - message.generateOmittedAsInternal = reader.bool(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SelectiveGapicGeneration message. - * @function verify - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SelectiveGapicGeneration.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.methods != null && Object.hasOwnProperty.call(message, "methods")) { - if (!Array.isArray(message.methods)) - return "methods: array expected"; - for (var i = 0; i < message.methods.length; ++i) - if (!$util.isString(message.methods[i])) - return "methods: string[] expected"; - } - if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) - if (typeof message.generateOmittedAsInternal !== "boolean") - return "generateOmittedAsInternal: boolean expected"; - return null; - }; - - /** - * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {Object.} object Plain object - * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration - */ - SelectiveGapicGeneration.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.SelectiveGapicGeneration) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.SelectiveGapicGeneration: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.api.SelectiveGapicGeneration(); - if (object.methods) { - if (!Array.isArray(object.methods)) - throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); - message.methods = []; - for (var i = 0; i < object.methods.length; ++i) - message.methods[i] = String(object.methods[i]); - } - if (object.generateOmittedAsInternal != null) - message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); - return message; - }; - - /** - * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SelectiveGapicGeneration.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.methods = []; - if (options.defaults) - object.generateOmittedAsInternal = false; - if (message.methods && message.methods.length) { - object.methods = []; - for (var j = 0; j < message.methods.length; ++j) - object.methods[j] = message.methods[j]; - } - if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) - object.generateOmittedAsInternal = message.generateOmittedAsInternal; - return object; - }; - - /** - * Converts this SelectiveGapicGeneration to JSON. - * @function toJSON - * @memberof google.api.SelectiveGapicGeneration - * @instance - * @returns {Object.} JSON object - */ - SelectiveGapicGeneration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SelectiveGapicGeneration - * @function getTypeUrl - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; - }; - - return SelectiveGapicGeneration; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; - })(); - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.ResourceDescriptor = (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 - */ - - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * 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 new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - } - case 3: { - message.nameField = reader.string(); - break; - } - case 4: { - message.history = reader.int32(); - break; - } - case 5: { - message.plural = reader.string(); - break; - } - case 6: { - message.singular = reader.string(); - break; - } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDescriptor.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && Object.hasOwnProperty.call(message, "pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && Object.hasOwnProperty.call(message, "style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.ResourceDescriptor: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && Object.hasOwnProperty.call(message, "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 && Object.hasOwnProperty.call(message, "nameField")) - object.nameField = message.nameField; - if (message.history != null && Object.hasOwnProperty.call(message, "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 && Object.hasOwnProperty.call(message, "plural")) - object.plural = message.plural; - if (message.singular != null && Object.hasOwnProperty.call(message, "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]; - } - return object; - }; - - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * 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"; - }; - - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.childType = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.api.ResourceReference) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.api.ResourceReference: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceReference.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; - } - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - object.type = message.type; - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - object.childType = message.childType; - return object; - }; - - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * 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 api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.file != null && Object.hasOwnProperty.call(message, "file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i], long + 1); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FileDescriptorSet: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 (!$util.isObject(object.file[i])) - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i], long + 1); - } - } - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - 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, q + 1); - } - 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); - }; - - /** - * 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; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_LEGACY=900 EDITION_LEGACY value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[900] = "EDITION_LEGACY"] = 900; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - 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} [optionDependency] FileDescriptorProto optionDependency - * @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 {google.protobuf.Edition|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.optionDependency = []; - 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto optionDependency. - * @member {Array.} optionDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.optionDependency = $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; - - /** - * 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 {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 0; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - if (message.optionDependency != null && message.optionDependency.length) - for (var i = 0; i < message.optionDependency.length; ++i) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 15: { - if (!(message.optionDependency && message.optionDependency.length)) - message.optionDependency = []; - message.optionDependency.push(reader.string()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && Object.hasOwnProperty.call(message, "dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && Object.hasOwnProperty.call(message, "publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && Object.hasOwnProperty.call(message, "weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.optionDependency != null && Object.hasOwnProperty.call(message, "optionDependency")) { - if (!Array.isArray(message.optionDependency)) - return "optionDependency: array expected"; - for (var i = 0; i < message.optionDependency.length; ++i) - if (!$util.isString(message.optionDependency[i])) - return "optionDependency: string[] expected"; - } - if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i], long + 1); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i], long + 1); - if (error) - return "enumType." + error; - } - } - if (message.service != null && Object.hasOwnProperty.call(message, "service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i], long + 1); - if (error) - return "service." + error; - } - } - if (message.extension != null && Object.hasOwnProperty.call(message, "extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], long + 1); - if (error) - return "extension." + error; - } - } - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options, long + 1); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo, long + 1); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 900: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FileDescriptorProto: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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.optionDependency) { - if (!Array.isArray(object.optionDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); - message.optionDependency = []; - for (var i = 0; i < object.optionDependency.length; ++i) - message.optionDependency[i] = String(object.optionDependency[i]); - } - 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 (!$util.isObject(object.messageType[i])) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i], long + 1); - } - } - 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 (!$util.isObject(object.enumType[i])) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i], long + 1); - } - } - 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 (!$util.isObject(object.service[i])) - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i], long + 1); - } - } - 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 (!$util.isObject(object.extension[i])) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], long + 1); - } - } - if (object.options != null) { - if (!$util.isObject(object.options)) - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options, long + 1); - } - if (object.sourceCodeInfo != null) { - if (!$util.isObject(object.sourceCodeInfo)) - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo, long + 1); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_LEGACY": - case 900: - message.edition = 900; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - return message; - }; - - /** - * 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - object.optionDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - object.name = message.name; - if (message["package"] != null && Object.hasOwnProperty.call(message, "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, q + 1); - } - 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, q + 1); - } - 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, q + 1); - } - 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, q + 1); - } - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options, q + 1); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options, q + 1); - 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 && Object.hasOwnProperty.call(message, "syntax")) - object.syntax = message.syntax; - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - if (message.optionDependency && message.optionDependency.length) { - object.optionDependency = []; - for (var j = 0; j < message.optionDependency.length; ++j) - object.optionDependency[j] = message.optionDependency[j]; - } - return object; - }; - - /** - * 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); - }; - - /** - * 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.DescriptorProto = (function() { - - /** - * 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 - * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * 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; - - /** - * DescriptorProto visibility. - * @member {google.protobuf.SymbolVisibility} visibility - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.visibility = 0; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork(), q + 1).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - case 11: { - message.visibility = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && Object.hasOwnProperty.call(message, "field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i], long + 1); - if (error) - return "field." + error; - } - } - if (message.extension != null && Object.hasOwnProperty.call(message, "extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], long + 1); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && Object.hasOwnProperty.call(message, "nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i], long + 1); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i], long + 1); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && Object.hasOwnProperty.call(message, "extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i], long + 1); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && Object.hasOwnProperty.call(message, "oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i], long + 1); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options, long + 1); - if (error) - return "options." + error; - } - if (message.reservedRange != null && Object.hasOwnProperty.call(message, "reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i], long + 1); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && Object.hasOwnProperty.call(message, "reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) - switch (message.visibility) { - default: - return "visibility: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.DescriptorProto: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 (!$util.isObject(object.field[i])) - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i], long + 1); - } - } - 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 (!$util.isObject(object.extension[i])) - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], long + 1); - } - } - 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 (!$util.isObject(object.nestedType[i])) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i], long + 1); - } - } - 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 (!$util.isObject(object.enumType[i])) - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i], long + 1); - } - } - 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 (!$util.isObject(object.extensionRange[i])) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i], long + 1); - } - } - 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 (!$util.isObject(object.oneofDecl[i])) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i], long + 1); - } - } - if (object.options != null) { - if (!$util.isObject(object.options)) - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options, long + 1); - } - 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 (!$util.isObject(object.reservedRange[i])) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i], long + 1); - } - } - 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]); - } - switch (object.visibility) { - default: - if (typeof object.visibility === "number") { - message.visibility = object.visibility; - break; - } - break; - case "VISIBILITY_UNSET": - case 0: - message.visibility = 0; - break; - case "VISIBILITY_LOCAL": - case 1: - message.visibility = 1; - break; - case "VISIBILITY_EXPORT": - case 2: - message.visibility = 2; - break; - } - return message; - }; - - /** - * 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - 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; - object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; - } - if (message.name != null && Object.hasOwnProperty.call(message, "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, q + 1); - } - 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, q + 1); - } - 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, q + 1); - } - 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, q + 1); - } - 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, q + 1); - } - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options, q + 1); - 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, q + 1); - } - 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, q + 1); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) - object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; - return object; - }; - - /** - * 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); - }; - - /** - * 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"; - }; - - 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 - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options, long + 1); - if (error) - return "options." + error; - } - return 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, long) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 (!$util.isObject(object.options)) - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options, long + 1); - } - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - object.start = message.start; - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - object.end = message.end; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options, q + 1); - 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 && keys[i] !== "__proto__") - 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 new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.DescriptorProto.ReservedRange: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - object.start = message.start; - if (message.end != null && Object.hasOwnProperty.call(message, "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() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * 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 = []; - this.declaration = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork(), q + 1).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && Object.hasOwnProperty.call(message, "declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i], long + 1); - if (error) - return "declaration." + error; - } - } - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); - if (error) - return "features." + error; - } - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.ExtensionRangeOptions: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 (!$util.isObject(object.uninterpretedOption[i])) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (!$util.isObject(object.declaration[i])) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i], long + 1); - } - } - if (object.features != null) { - if (!$util.isObject(object.features)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - return message; - }; - - /** - * 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options, q + 1); - } - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); - 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, q + 1); - } - return object; - }; - - /** - * 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); - }; - - /** - * 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"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.Declaration: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - object.number = message.number; - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - object.fullName = message.fullName; - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - object.type = message.type; - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - object.reserved = message.reserved; - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - object.repeated = message.repeated; - return object; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); - - return ExtensionRangeOptions; - })(); - - 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 - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * 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 new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork(), q + 1).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options, long + 1); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FieldDescriptorProto: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - 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 (!$util.isObject(object.options)) - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options, long + 1); - } - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - 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 && Object.hasOwnProperty.call(message, "name")) - object.name = message.name; - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - object.extendee = message.extendee; - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - object.number = message.number; - if (message.label != null && Object.hasOwnProperty.call(message, "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 && Object.hasOwnProperty.call(message, "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 && Object.hasOwnProperty.call(message, "typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options, q + 1); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "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 {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - 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 && keys[i] !== "__proto__") - 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 a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options, long + 1); - if (error) - return "options." + error; - } - return 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, long) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.OneofDescriptorProto: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (!$util.isObject(object.options)) - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options, long + 1); - } - return message; - }; - - /** - * 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - object.name = message.name; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options, q + 1); - return object; - }; - - /** - * 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); - }; - - /** - * 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"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * 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 - * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 - * @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; - - /** - * EnumDescriptorProto visibility. - * @member {google.protobuf.SymbolVisibility} visibility - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.visibility = 0; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - case 6: { - message.visibility = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && Object.hasOwnProperty.call(message, "value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i], long + 1); - if (error) - return "value." + error; - } - } - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options, long + 1); - if (error) - return "options." + error; - } - if (message.reservedRange != null && Object.hasOwnProperty.call(message, "reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i], long + 1); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && Object.hasOwnProperty.call(message, "reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) - switch (message.visibility) { - default: - return "visibility: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.EnumDescriptorProto: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 (!$util.isObject(object.value[i])) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i], long + 1); - } - } - if (object.options != null) { - if (!$util.isObject(object.options)) - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options, long + 1); - } - 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 (!$util.isObject(object.reservedRange[i])) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i], long + 1); - } - } - 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]); - } - switch (object.visibility) { - default: - if (typeof object.visibility === "number") { - message.visibility = object.visibility; - break; - } - break; - case "VISIBILITY_UNSET": - case 0: - message.visibility = 0; - break; - case "VISIBILITY_LOCAL": - case 1: - message.visibility = 1; - break; - case "VISIBILITY_EXPORT": - case 2: - message.visibility = 2; - break; - } - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; - } - if (message.name != null && Object.hasOwnProperty.call(message, "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, q + 1); - } - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options, q + 1); - 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, q + 1); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) - object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; - 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); - }; - - /** - * 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 && keys[i] !== "__proto__") - 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 a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.EnumDescriptorProto.EnumReservedRange: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - object.start = message.start; - if (message.end != null && Object.hasOwnProperty.call(message, "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.EnumValueDescriptorProto = (function() { - - /** - * 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 - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options, long + 1); - if (error) - return "options." + error; - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.EnumValueDescriptorProto: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 (!$util.isObject(object.options)) - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options, long + 1); - } - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - object.name = message.name; - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - object.number = message.number; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options, q + 1); - 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 && keys[i] !== "__proto__") - 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 new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && Object.hasOwnProperty.call(message, "method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i], long + 1); - if (error) - return "method." + error; - } - } - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options, long + 1); - if (error) - return "options." + error; - } - return 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, long) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.ServiceDescriptorProto: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 (!$util.isObject(object.method[i])) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i], long + 1); - } - } - if (object.options != null) { - if (!$util.isObject(object.options)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options, long + 1); - } - return message; - }; - - /** - * 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && Object.hasOwnProperty.call(message, "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, q + 1); - } - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options, q + 1); - return object; - }; - - /** - * 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); - }; - - /** - * 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.MethodDescriptorProto = (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 - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - 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 new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options, long + 1); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.MethodDescriptorProto: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 (!$util.isObject(object.options)) - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options, long + 1); - } - 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 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - object.name = message.name; - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - object.inputType = message.inputType; - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - object.outputType = message.outputType; - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options, q + 1); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * 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 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.FileOptions = (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 {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 {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * 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 - * @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 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 = ""; - - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; - - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; - - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * 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 new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork(), q + 1).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); - break; - } - case 40: { - message.phpClassPrefix = reader.string(); - break; - } - case 41: { - message.phpNamespace = reader.string(); - break; - } - case 44: { - message.phpMetadataNamespace = reader.string(); - break; - } - case 45: { - message.rubyPackage = reader.string(); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i], long + 1); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FileOptions: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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.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.features != null) { - if (!$util.isObject(object.features)) - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); - } - 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 (!$util.isObject(object.uninterpretedOption[i])) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); - } - } - 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 (!$util.isObject(object[".google.api.resourceDefinition"][i])) - 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], long + 1); - } - } - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - 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.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "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 && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); - 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, q + 1); - } - 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, q + 1); - } - return object; - }; - - /** - * 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); - }; - - /** - * 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"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * 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 {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * 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 deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * 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 new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork(), q + 1).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"], long + 1); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.MessageOptions: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (!$util.isObject(object.features)) - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); - } - 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 (!$util.isObject(object.uninterpretedOption[i])) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); - } - } - if (object[".google.api.resource"] != null) { - if (!$util.isObject(object[".google.api.resource"])) - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"], long + 1); - } - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - 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.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); - 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, q + 1); - } - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options, q + 1); - 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); - }; - - /** - * 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.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} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport - * @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.targets = []; - this.editionDefaults = []; - 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * 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 debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions featureSupport. - * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.featureSupport = null; - - /** - * 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 new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); - if (message.editionDefaults != null && message.editionDefaults.length) - for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork(), q + 1).ldelim(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork(), q + 1).ldelim(); - if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) - $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).fork(), q + 1).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 16: { - message.debugRedact = reader.bool(); - break; - } - case 17: { - message.retention = reader.int32(); - break; - } - case 19: { - if (!(message.targets && message.targets.length)) - message.targets = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.targets.push(reader.int32()); - } else - message.targets.push(reader.int32()); - break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 22: { - message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && Object.hasOwnProperty.call(message, "targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && Object.hasOwnProperty.call(message, "editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i], long + 1); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); - if (error) - return "features." + error; - } - if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) { - var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport, long + 1); - if (error) - return "featureSupport." + error; - } - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && Object.hasOwnProperty.call(message, ".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"], long + 1); - if (error) - return ".google.api.resourceReference." + error; - } - return 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, long) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FieldOptions: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (!$util.isObject(object.editionDefaults[i])) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i], long + 1); - } - } - if (object.features != null) { - if (!$util.isObject(object.features)) - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); - } - if (object.featureSupport != null) { - if (!$util.isObject(object.featureSupport)) - throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); - message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport, long + 1); - } - 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 (!$util.isObject(object.uninterpretedOption[i])) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); - } - } - 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; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (!$util.isObject(object[".google.api.resourceReference"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"], long + 1); - } - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.editionDefaults = []; - 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.debugRedact = false; - object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; - object.features = null; - object.featureSupport = null; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && Object.hasOwnProperty.call(message, "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 && Object.hasOwnProperty.call(message, "packed")) - object.packed = message.packed; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - object.lazy = message.lazy; - if (message.jstype != null && Object.hasOwnProperty.call(message, "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 && Object.hasOwnProperty.call(message, "weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; - } - if (message.editionDefaults && message.editionDefaults.length) { - object.editionDefaults = []; - for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options, q + 1); - } - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); - if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) - object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options, q + 1); - 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, q + 1); - } - 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 && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options, q + 1); - 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); - }; - - /** - * 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 {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - - /** - * OptionRetention enum. - * @name google.protobuf.FieldOptions.OptionRetention - * @enum {number} - * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value - * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value - * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value - */ - FieldOptions.OptionRetention = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; - values[valuesById[1] = "RETENTION_RUNTIME"] = 1; - values[valuesById[2] = "RETENTION_SOURCE"] = 2; - return values; - })(); - - /** - * OptionTargetType enum. - * @name google.protobuf.FieldOptions.OptionTargetType - * @enum {number} - * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value - * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value - * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value - * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value - * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value - * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value - * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value - * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value - * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value - * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value - */ - FieldOptions.OptionTargetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; - values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; - values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; - values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; - values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; - values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; - values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; - values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; - values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; - return values; - })(); - - FieldOptions.EditionDefault = (function() { - - /** - * Properties of an EditionDefault. - * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value - */ - - /** - * Constructs a new EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault - * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - */ - function EditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.edition = 0; - - /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.value = ""; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance - */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); - }; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EditionDefault message. - * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditionDefault.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 900: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - */ - EditionDefault.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FieldOptions.EditionDefault: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_LEGACY": - case 900: - message.edition = 900; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EditionDefault.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - object.value = message.value; - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this EditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - * @returns {Object.} JSON object - */ - EditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; - }; - - return EditionDefault; - })(); - - FieldOptions.FeatureSupport = (function() { - - /** - * Properties of a FeatureSupport. - * @memberof google.protobuf.FieldOptions - * @interface IFeatureSupport - * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced - * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated - * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning - * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved - */ - - /** - * Constructs a new FeatureSupport. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents a FeatureSupport. - * @implements IFeatureSupport - * @constructor - * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set - */ - function FeatureSupport(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSupport editionIntroduced. - * @member {google.protobuf.Edition} editionIntroduced - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @instance - */ - FeatureSupport.prototype.editionIntroduced = 0; - - /** - * FeatureSupport editionDeprecated. - * @member {google.protobuf.Edition} editionDeprecated - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @instance - */ - FeatureSupport.prototype.editionDeprecated = 0; - - /** - * FeatureSupport deprecationWarning. - * @member {string} deprecationWarning - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @instance - */ - FeatureSupport.prototype.deprecationWarning = ""; - - /** - * FeatureSupport editionRemoved. - * @member {google.protobuf.Edition} editionRemoved - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @instance - */ - FeatureSupport.prototype.editionRemoved = 0; - - /** - * Creates a new FeatureSupport instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance - */ - FeatureSupport.create = function create(properties) { - return new FeatureSupport(properties); - }; - - /** - * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSupport.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); - if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); - if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); - if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); - return writer; - }; - - /** - * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a FeatureSupport message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSupport.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.editionIntroduced = reader.int32(); - break; - } - case 2: { - message.editionDeprecated = reader.int32(); - break; - } - case 3: { - message.deprecationWarning = reader.string(); - break; - } - case 4: { - message.editionRemoved = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSupport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSupport message. - * @function verify - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSupport.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) - switch (message.editionIntroduced) { - default: - return "editionIntroduced: enum value expected"; - case 0: - case 900: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) - switch (message.editionDeprecated) { - default: - return "editionDeprecated: enum value expected"; - case 0: - case 900: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) - if (!$util.isString(message.deprecationWarning)) - return "deprecationWarning: string expected"; - if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) - switch (message.editionRemoved) { - default: - return "editionRemoved: enum value expected"; - case 0: - case 900: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport - */ - FeatureSupport.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FieldOptions.FeatureSupport: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); - switch (object.editionIntroduced) { - default: - if (typeof object.editionIntroduced === "number") { - message.editionIntroduced = object.editionIntroduced; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.editionIntroduced = 0; - break; - case "EDITION_LEGACY": - case 900: - message.editionIntroduced = 900; - break; - case "EDITION_PROTO2": - case 998: - message.editionIntroduced = 998; - break; - case "EDITION_PROTO3": - case 999: - message.editionIntroduced = 999; - break; - case "EDITION_2023": - case 1000: - message.editionIntroduced = 1000; - break; - case "EDITION_2024": - case 1001: - message.editionIntroduced = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.editionIntroduced = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.editionIntroduced = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.editionIntroduced = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.editionIntroduced = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.editionIntroduced = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.editionIntroduced = 2147483647; - break; - } - switch (object.editionDeprecated) { - default: - if (typeof object.editionDeprecated === "number") { - message.editionDeprecated = object.editionDeprecated; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.editionDeprecated = 0; - break; - case "EDITION_LEGACY": - case 900: - message.editionDeprecated = 900; - break; - case "EDITION_PROTO2": - case 998: - message.editionDeprecated = 998; - break; - case "EDITION_PROTO3": - case 999: - message.editionDeprecated = 999; - break; - case "EDITION_2023": - case 1000: - message.editionDeprecated = 1000; - break; - case "EDITION_2024": - case 1001: - message.editionDeprecated = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.editionDeprecated = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.editionDeprecated = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.editionDeprecated = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.editionDeprecated = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.editionDeprecated = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.editionDeprecated = 2147483647; - break; - } - if (object.deprecationWarning != null) - message.deprecationWarning = String(object.deprecationWarning); - switch (object.editionRemoved) { - default: - if (typeof object.editionRemoved === "number") { - message.editionRemoved = object.editionRemoved; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.editionRemoved = 0; - break; - case "EDITION_LEGACY": - case 900: - message.editionRemoved = 900; - break; - case "EDITION_PROTO2": - case 998: - message.editionRemoved = 998; - break; - case "EDITION_PROTO3": - case 999: - message.editionRemoved = 999; - break; - case "EDITION_2023": - case 1000: - message.editionRemoved = 1000; - break; - case "EDITION_2024": - case 1001: - message.editionRemoved = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.editionRemoved = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.editionRemoved = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.editionRemoved = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.editionRemoved = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.editionRemoved = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.editionRemoved = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSupport.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.deprecationWarning = ""; - object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) - object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; - if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) - object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; - if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) - object.deprecationWarning = message.deprecationWarning; - if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) - object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; - return object; - }; - - /** - * Converts this FeatureSupport to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @instance - * @returns {Object.} JSON object - */ - FeatureSupport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSupport - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; - }; - - return FeatureSupport; - })(); - - return FieldOptions; - })(); - - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * OneofOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.features = null; - - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.OneofOptions: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.protobuf.OneofOptions(); - if (object.features != null) { - if (!$util.isObject(object.features)) - throw TypeError(".google.protobuf.OneofOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); - } - 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 (!$util.isObject(object.uninterpretedOption[i])) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); - } - } - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.features = null; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); - 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, q + 1); - } - 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); - }; - - /** - * 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.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features - * @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 && keys[i] !== "__proto__") - 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 deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.features = null; - - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork(), q + 1).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); - if (error) - return "uninterpretedOption." + error; - } - } - return 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, long) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.EnumOptions: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (!$util.isObject(object.features)) - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); - } - 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 (!$util.isObject(object.uninterpretedOption[i])) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); - } - } - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); - 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, q + 1); - } - 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); - }; - - /** - * 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.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.features = null; - - /** - * EnumValueOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.debugRedact = false; - - /** - * EnumValueOptions featureSupport. - * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.featureSupport = null; - - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance - */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); - }; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) - $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 3: { - message.debugRedact = reader.bool(); - break; - } - case 4: { - message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); - if (error) - return "features." + error; - } - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) { - var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport, long + 1); - if (error) - return "featureSupport." + error; - } - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.EnumValueOptions: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.features != null) { - if (!$util.isObject(object.features)) - throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - if (object.featureSupport != null) { - if (!$util.isObject(object.featureSupport)) - throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); - message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport, long + 1); - } - 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 (!$util.isObject(object.uninterpretedOption[i])) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); - } - } - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object.debugRedact = false; - object.featureSupport = null; - } - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - object.debugRedact = message.debugRedact; - if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) - object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options, q + 1); - 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, q + 1); - } - 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); - }; - - /** - * 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.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features - * @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 - * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ServiceOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.features = null; - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * 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"] = ""; - - /** - * ServiceOptions .google.api.apiVersion. - * @member {string} .google.api.apiVersion - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.apiVersion"] = ""; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork(), q + 1).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); - return writer; - }; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 33: { - message.deprecated = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); - break; - } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); - break; - } - case 525000001: { - message[".google.api.apiVersion"] = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); - if (error) - return "features." + error; - } - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - if (!$util.isString(message[".google.api.apiVersion"])) - return ".google.api.apiVersion: string expected"; - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.ServiceOptions: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.protobuf.ServiceOptions(); - if (object.features != null) { - if (!$util.isObject(object.features)) - throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); - } - 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 (!$util.isObject(object.uninterpretedOption[i])) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); - } - } - 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[".google.api.apiVersion"] != null) - message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); - return message; - }; - - /** - * 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - object[".google.api.apiVersion"] = ""; - } - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); - 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, q + 1); - } - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; - return object; - }; - - /** - * 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); - }; - - /** - * 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.MethodOptions = (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 {google.protobuf.IFeatureSet|null} [features] MethodOptions features - * @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 - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.features = null; - - /** - * 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; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork(), q + 1).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork(), q + 1).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 35: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.features != null && Object.hasOwnProperty.call(message, "features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && Object.hasOwnProperty.call(message, "uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"], long + 1); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && Object.hasOwnProperty.call(message, ".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.MethodOptions: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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.features != null) { - if (!$util.isObject(object.features)) - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); - } - 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 (!$util.isObject(object.uninterpretedOption[i])) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); - } - } - if (object[".google.api.http"] != null) { - if (!$util.isObject(object[".google.api.http"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"], long + 1); - } - 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]); - } - return message; - }; - - /** - * 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - 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.features = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "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.features != null && Object.hasOwnProperty.call(message, "features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options, q + 1); - 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, q + 1); - } - 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 && Object.hasOwnProperty.call(message, ".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options, q + 1); - return object; - }; - - /** - * 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); - }; - - /** - * 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 {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - 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|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|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 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 3: { - message.identifierValue = reader.string(); - break; - } - case 4: { - message.positiveIntValue = reader.uint64(); - break; - } - case 5: { - message.negativeIntValue = reader.int64(); - break; - } - case 6: { - message.doubleValue = reader.double(); - break; - } - case 7: { - message.stringValue = reader.bytes(); - break; - } - case 8: { - message.aggregateValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.name != null && Object.hasOwnProperty.call(message, "name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i], long + 1); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.UninterpretedOption: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 (!$util.isObject(object.name[i])) - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i], long + 1); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue, 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, 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 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - 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() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("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() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("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, q + 1); - } - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.positiveIntValue = typeof message.positiveIntValue === "number" ? BigInt(message.positiveIntValue) : $util.Long.fromBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0, true).toBigInt(); - else 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 && Object.hasOwnProperty.call(message, "negativeIntValue")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.negativeIntValue = typeof message.negativeIntValue === "number" ? BigInt(message.negativeIntValue) : $util.Long.fromBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0, false).toBigInt(); - else 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 && Object.hasOwnProperty.call(message, "doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && Object.hasOwnProperty.call(message, "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 && Object.hasOwnProperty.call(message, "aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; - - /** - * 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); - }; - - /** - * 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 && keys[i] !== "__proto__") - 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 new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); - break; - } - case 2: { - message.isExtension = reader.bool(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - if (!Object.hasOwnProperty.call(message, "namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!Object.hasOwnProperty.call(message, "isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.UninterpretedOption.NamePart: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && Object.hasOwnProperty.call(message, "namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && Object.hasOwnProperty.call(message, "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.FeatureSet = (function() { - - /** - * Properties of a FeatureSet. - * @memberof google.protobuf - * @interface IFeatureSet - * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence - * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType - * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation - * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding - * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat - * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle - * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility - */ - - /** - * Constructs a new FeatureSet. - * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet - * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - */ - function FeatureSet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.fieldPresence = 0; - - /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enumType = 0; - - /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.repeatedFieldEncoding = 0; - - /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.utf8Validation = 0; - - /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.messageEncoding = 0; - - /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.jsonFormat = 0; - - /** - * FeatureSet enforceNamingStyle. - * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enforceNamingStyle = 0; - - /** - * FeatureSet defaultSymbolVisibility. - * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.defaultSymbolVisibility = 0; - - /** - * Creates a new FeatureSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance - */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); - }; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); - if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); - if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); - return writer; - }; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.fieldPresence = reader.int32(); - break; - } - case 2: { - message.enumType = reader.int32(); - break; - } - case 3: { - message.repeatedFieldEncoding = reader.int32(); - break; - } - case 4: { - message.utf8Validation = reader.int32(); - break; - } - case 5: { - message.messageEncoding = reader.int32(); - break; - } - case 6: { - message.jsonFormat = reader.int32(); - break; - } - case 7: { - message.enforceNamingStyle = reader.int32(); - break; - } - case 8: { - message.defaultSymbolVisibility = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSet message. - * @function verify - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSet.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) - switch (message.enforceNamingStyle) { - default: - return "enforceNamingStyle: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) - switch (message.defaultSymbolVisibility) { - default: - return "defaultSymbolVisibility: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet - */ - FeatureSet.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FeatureSet: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.protobuf.FeatureSet(); - switch (object.fieldPresence) { - default: - if (typeof object.fieldPresence === "number") { - message.fieldPresence = object.fieldPresence; - break; - } - break; - case "FIELD_PRESENCE_UNKNOWN": - case 0: - message.fieldPresence = 0; - break; - case "EXPLICIT": - case 1: - message.fieldPresence = 1; - break; - case "IMPLICIT": - case 2: - message.fieldPresence = 2; - break; - case "LEGACY_REQUIRED": - case 3: - message.fieldPresence = 3; - break; - } - switch (object.enumType) { - default: - if (typeof object.enumType === "number") { - message.enumType = object.enumType; - break; - } - break; - case "ENUM_TYPE_UNKNOWN": - case 0: - message.enumType = 0; - break; - case "OPEN": - case 1: - message.enumType = 1; - break; - case "CLOSED": - case 2: - message.enumType = 2; - break; - } - switch (object.repeatedFieldEncoding) { - default: - if (typeof object.repeatedFieldEncoding === "number") { - message.repeatedFieldEncoding = object.repeatedFieldEncoding; - break; - } - break; - case "REPEATED_FIELD_ENCODING_UNKNOWN": - case 0: - message.repeatedFieldEncoding = 0; - break; - case "PACKED": - case 1: - message.repeatedFieldEncoding = 1; - break; - case "EXPANDED": - case 2: - message.repeatedFieldEncoding = 2; - break; - } - switch (object.utf8Validation) { - default: - if (typeof object.utf8Validation === "number") { - message.utf8Validation = object.utf8Validation; - break; - } - break; - case "UTF8_VALIDATION_UNKNOWN": - case 0: - message.utf8Validation = 0; - break; - case "VERIFY": - case 2: - message.utf8Validation = 2; - break; - case "NONE": - case 3: - message.utf8Validation = 3; - break; - } - switch (object.messageEncoding) { - default: - if (typeof object.messageEncoding === "number") { - message.messageEncoding = object.messageEncoding; - break; - } - break; - case "MESSAGE_ENCODING_UNKNOWN": - case 0: - message.messageEncoding = 0; - break; - case "LENGTH_PREFIXED": - case 1: - message.messageEncoding = 1; - break; - case "DELIMITED": - case 2: - message.messageEncoding = 2; - break; - } - switch (object.jsonFormat) { - default: - if (typeof object.jsonFormat === "number") { - message.jsonFormat = object.jsonFormat; - break; - } - break; - case "JSON_FORMAT_UNKNOWN": - case 0: - message.jsonFormat = 0; - break; - case "ALLOW": - case 1: - message.jsonFormat = 1; - break; - case "LEGACY_BEST_EFFORT": - case 2: - message.jsonFormat = 2; - break; - } - switch (object.enforceNamingStyle) { - default: - if (typeof object.enforceNamingStyle === "number") { - message.enforceNamingStyle = object.enforceNamingStyle; - break; - } - break; - case "ENFORCE_NAMING_STYLE_UNKNOWN": - case 0: - message.enforceNamingStyle = 0; - break; - case "STYLE2024": - case 1: - message.enforceNamingStyle = 1; - break; - case "STYLE_LEGACY": - case 2: - message.enforceNamingStyle = 2; - break; - } - switch (object.defaultSymbolVisibility) { - default: - if (typeof object.defaultSymbolVisibility === "number") { - message.defaultSymbolVisibility = object.defaultSymbolVisibility; - break; - } - break; - case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": - case 0: - message.defaultSymbolVisibility = 0; - break; - case "EXPORT_ALL": - case 1: - message.defaultSymbolVisibility = 1; - break; - case "EXPORT_TOP_LEVEL": - case 2: - message.defaultSymbolVisibility = 2; - break; - case "LOCAL_ALL": - case 3: - message.defaultSymbolVisibility = 3; - break; - case "STRICT": - case 4: - message.defaultSymbolVisibility = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.FeatureSet} message FeatureSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSet.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; - object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; - object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; - object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; - object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; - object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; - object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; - object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN" : 0; - } - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) - object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; - if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) - object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; - return object; - }; - - /** - * Converts this FeatureSet to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet - * @instance - * @returns {Object.} JSON object - */ - FeatureSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSet - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; - }; - - /** - * FieldPresence enum. - * @name google.protobuf.FeatureSet.FieldPresence - * @enum {number} - * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value - * @property {number} EXPLICIT=1 EXPLICIT value - * @property {number} IMPLICIT=2 IMPLICIT value - * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value - */ - FeatureSet.FieldPresence = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; - values[valuesById[1] = "EXPLICIT"] = 1; - values[valuesById[2] = "IMPLICIT"] = 2; - values[valuesById[3] = "LEGACY_REQUIRED"] = 3; - return values; - })(); - - /** - * EnumType enum. - * @name google.protobuf.FeatureSet.EnumType - * @enum {number} - * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - FeatureSet.EnumType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "OPEN"] = 1; - values[valuesById[2] = "CLOSED"] = 2; - return values; - })(); - - /** - * RepeatedFieldEncoding enum. - * @name google.protobuf.FeatureSet.RepeatedFieldEncoding - * @enum {number} - * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value - * @property {number} PACKED=1 PACKED value - * @property {number} EXPANDED=2 EXPANDED value - */ - FeatureSet.RepeatedFieldEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "PACKED"] = 1; - values[valuesById[2] = "EXPANDED"] = 2; - return values; - })(); - - /** - * Utf8Validation enum. - * @name google.protobuf.FeatureSet.Utf8Validation - * @enum {number} - * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value - * @property {number} VERIFY=2 VERIFY value - * @property {number} NONE=3 NONE value - */ - FeatureSet.Utf8Validation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; - values[valuesById[2] = "VERIFY"] = 2; - values[valuesById[3] = "NONE"] = 3; - return values; - })(); - - /** - * MessageEncoding enum. - * @name google.protobuf.FeatureSet.MessageEncoding - * @enum {number} - * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value - * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value - * @property {number} DELIMITED=2 DELIMITED value - */ - FeatureSet.MessageEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "LENGTH_PREFIXED"] = 1; - values[valuesById[2] = "DELIMITED"] = 2; - return values; - })(); - - /** - * JsonFormat enum. - * @name google.protobuf.FeatureSet.JsonFormat - * @enum {number} - * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value - * @property {number} ALLOW=1 ALLOW value - * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value - */ - FeatureSet.JsonFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; - values[valuesById[1] = "ALLOW"] = 1; - values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; - return values; - })(); - - /** - * EnforceNamingStyle enum. - * @name google.protobuf.FeatureSet.EnforceNamingStyle - * @enum {number} - * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value - * @property {number} STYLE2024=1 STYLE2024 value - * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value - */ - FeatureSet.EnforceNamingStyle = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; - values[valuesById[1] = "STYLE2024"] = 1; - values[valuesById[2] = "STYLE_LEGACY"] = 2; - return values; - })(); - - FeatureSet.VisibilityFeature = (function() { - - /** - * Properties of a VisibilityFeature. - * @memberof google.protobuf.FeatureSet - * @interface IVisibilityFeature - */ - - /** - * Constructs a new VisibilityFeature. - * @memberof google.protobuf.FeatureSet - * @classdesc Represents a VisibilityFeature. - * @implements IVisibilityFeature - * @constructor - * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set - */ - function VisibilityFeature(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new VisibilityFeature instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance - */ - VisibilityFeature.create = function create(properties) { - return new VisibilityFeature(properties); - }; - - /** - * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VisibilityFeature.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - return writer; - }; - - /** - * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a VisibilityFeature message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VisibilityFeature.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VisibilityFeature message. - * @function verify - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VisibilityFeature.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - return null; - }; - - /** - * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature - */ - VisibilityFeature.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) - return object; - return new $root.google.protobuf.FeatureSet.VisibilityFeature(); - }; - - /** - * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VisibilityFeature.toObject = function toObject() { - return {}; - }; - - /** - * Converts this VisibilityFeature to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @instance - * @returns {Object.} JSON object - */ - VisibilityFeature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VisibilityFeature - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; - }; - - /** - * DefaultSymbolVisibility enum. - * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility - * @enum {number} - * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value - * @property {number} EXPORT_ALL=1 EXPORT_ALL value - * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value - * @property {number} LOCAL_ALL=3 LOCAL_ALL value - * @property {number} STRICT=4 STRICT value - */ - VisibilityFeature.DefaultSymbolVisibility = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; - values[valuesById[1] = "EXPORT_ALL"] = 1; - values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; - values[valuesById[3] = "LOCAL_ALL"] = 3; - values[valuesById[4] = "STRICT"] = 4; - return values; - })(); - - return VisibilityFeature; - })(); - - return FeatureSet; - })(); - - protobuf.FeatureSetDefaults = (function() { - - /** - * Properties of a FeatureSetDefaults. - * @memberof google.protobuf - * @interface IFeatureSetDefaults - * @property {Array.|null} [defaults] FeatureSetDefaults defaults - * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition - * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition - */ - - /** - * Constructs a new FeatureSetDefaults. - * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults - * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - */ - function FeatureSetDefaults(properties) { - this.defaults = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; - - /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.minimumEdition = 0; - - /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.maximumEdition = 0; - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance - */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); - }; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.defaults != null && message.defaults.length) - for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); - return writer; - }; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetDefaults message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetDefaults.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.defaults != null && Object.hasOwnProperty.call(message, "defaults")) { - if (!Array.isArray(message.defaults)) - return "defaults: array expected"; - for (var i = 0; i < message.defaults.length; ++i) { - var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i], long + 1); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - case 900: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - case 900: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - */ - FeatureSetDefaults.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FeatureSetDefaults: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.protobuf.FeatureSetDefaults(); - if (object.defaults) { - if (!Array.isArray(object.defaults)) - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); - message.defaults = []; - for (var i = 0; i < object.defaults.length; ++i) { - if (!$util.isObject(object.defaults[i])) - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i], long + 1); - } - } - switch (object.minimumEdition) { - default: - if (typeof object.minimumEdition === "number") { - message.minimumEdition = object.minimumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.minimumEdition = 0; - break; - case "EDITION_LEGACY": - case 900: - message.minimumEdition = 900; - break; - case "EDITION_PROTO2": - case 998: - message.minimumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.minimumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.minimumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.minimumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.minimumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.minimumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.minimumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.minimumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.minimumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.minimumEdition = 2147483647; - break; - } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.maximumEdition = 0; - break; - case "EDITION_LEGACY": - case 900: - message.maximumEdition = 900; - break; - case "EDITION_PROTO2": - case 998: - message.maximumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.maximumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.maximumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.maximumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.maximumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.maximumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.maximumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.maximumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.maximumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetDefaults.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.arrays || options.defaults) - object.defaults = []; - if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.defaults && message.defaults.length) { - object.defaults = []; - for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options, q + 1); - } - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; - return object; - }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults - * @instance - * @returns {Object.} JSON object - */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetDefaults - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; - }; - - FeatureSetDefaults.FeatureSetEditionDefault = (function() { - - /** - * Properties of a FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @interface IFeatureSetEditionDefault - * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [overridableFeatures] FeatureSetEditionDefault overridableFeatures - * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures - */ - - /** - * Constructs a new FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @classdesc Represents a FeatureSetEditionDefault. - * @implements IFeatureSetEditionDefault - * @constructor - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - */ - function FeatureSetEditionDefault(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault overridableFeatures. - * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.overridableFeatures = null; - - /** - * FeatureSetEditionDefault fixedFeatures. - * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.fixedFeatures = null; - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance - */ - FeatureSetEditionDefault.create = function create(properties) { - return new FeatureSetEditionDefault(properties); - }; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) - $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork(), q + 1).ldelim(); - if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) - $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 4: { - message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 5: { - message.fixedFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetEditionDefault message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetEditionDefault.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 900: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) { - var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures, long + 1); - if (error) - return "overridableFeatures." + error; - } - if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) { - var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures, long + 1); - if (error) - return "fixedFeatures." + error; - } - return null; - }; - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - */ - FeatureSetEditionDefault.fromObject = function fromObject(object, long) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_LEGACY": - case 900: - message.edition = 900; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.overridableFeatures != null) { - if (!$util.isObject(object.overridableFeatures)) - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); - message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures, long + 1); - } - if (object.fixedFeatures != null) { - if (!$util.isObject(object.fixedFeatures)) - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); - message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures, long + 1); - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetEditionDefault.toObject = function toObject(message, options, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (options.defaults) { - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.overridableFeatures = null; - object.fixedFeatures = null; - } - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) - object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options, q + 1); - if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) - object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options, q + 1); - return object; - }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - * @returns {Object.} JSON object - */ - FeatureSetEditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; - }; - - return FeatureSetEditionDefault; - })(); - - return FeatureSetDefaults; - })(); - - protobuf.SourceCodeInfo = (function() { - - /** - * 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.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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.location != null && Object.hasOwnProperty.call(message, "location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i], long + 1); - if (error) - return "location." + error; - } - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.SourceCodeInfo: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 (!$util.isObject(object.location[i])) - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i], long + 1); - } - } - return message; - }; - - /** - * 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - 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, q + 1); - } - 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); - }; - - /** - * 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 && keys[i] !== "__proto__") - 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 new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.path != null && Object.hasOwnProperty.call(message, "path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && Object.hasOwnProperty.call(message, "span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && Object.hasOwnProperty.call(message, "leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - 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 && Object.hasOwnProperty.call(message, "leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "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() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.annotation != null && Object.hasOwnProperty.call(message, "annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i], long + 1); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.GeneratedCodeInfo: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 (!$util.isObject(object.annotation[i])) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i], long + 1); - } - } - return message; - }; - - /** - * 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - 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, q + 1); - } - return object; - }; - - /** - * 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); - }; - - /** - * 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 && keys[i] !== "__proto__") - 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 a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.path != null && Object.hasOwnProperty.call(message, "path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return 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, long) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - 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 && Object.hasOwnProperty.call(message, "sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - object.begin = message.begin; - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - object.end = message.end; - if (message.semantic != null && Object.hasOwnProperty.call(message, "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 {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - - /** - * SymbolVisibility enum. - * @name google.protobuf.SymbolVisibility - * @enum {number} - * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value - * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value - * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value - */ - protobuf.SymbolVisibility = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VISIBILITY_UNSET"] = 0; - values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; - values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; - return values; - })(); - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Duration seconds. - * @member {number|Long} 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 new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.Duration) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.Duration: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - message.seconds = $util.Long.fromValue(object.seconds, 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - 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() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; - } else - object.seconds = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - object.nanos = 0; - } - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.seconds = typeof message.seconds === "number" ? BigInt(message.seconds) : $util.Long.fromBits(message.seconds.low >>> 0, message.seconds.high >>> 0, false).toBigInt(); - else 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 && Object.hasOwnProperty.call(message, "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; - })(); - - protobuf.Empty = (function() { - - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - return writer; - }; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * 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 {}; - }; - - /** - * 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.FieldMask = (function() { - - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; - - /** - * Creates a new FieldMask instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance - */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldMask message. - * @function verify - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldMask.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.paths != null && Object.hasOwnProperty.call(message, "paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return 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, long) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.FieldMask: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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; - }; - - /** - * 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - 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; - }; - - /** - * 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); - }; - - /** - * 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; - })(); - - protobuf.Struct = (function() { - - /** - * Properties of a Struct. - * @memberof google.protobuf - * @interface IStruct - * @property {Object.|null} [fields] Struct fields - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Struct fields. - * @member {Object.} fields - * @memberof google.protobuf.Struct - * @instance - */ - Struct.prototype.fields = $util.emptyObject; - - /** - * Creates a new Struct instance using the specified properties. - * @function create - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct=} [properties] Properties to set - * @returns {google.protobuf.Struct} Struct instance - */ - Struct.create = function create(properties) { - return new Struct(properties); - }; - - /** - * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Struct.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) - for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork(), q + 1).ldelim().ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Struct - * @static - * @param {google.protobuf.IStruct} message Struct message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Struct.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a Struct message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Struct - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Struct} Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Struct.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (message.fields === $util.emptyObject) - message.fields = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.protobuf.Value.decode(reader, reader.uint32(), undefined, long + 1); - break; - default: - reader.skipType(tag2 & 7, long); - break; - } - } - if (key === "__proto__") - $util.makeProp(message.fields, key); - message.fields[key] = value; - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a Struct message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Struct - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Struct} Struct - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Struct.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Struct message. - * @function verify - * @memberof google.protobuf.Struct - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Struct.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.fields != null && Object.hasOwnProperty.call(message, "fields")) { - if (!$util.isObject(message.fields)) - return "fields: object expected"; - var key = Object.keys(message.fields); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.fields[key[i]], long + 1); - if (error) - return "fields." + error; - } - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.Struct) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.Struct: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.protobuf.Struct(); - if (object.fields) { - if (!$util.isObject(object.fields)) - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields = {}; - for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) { - if (keys[i] === "__proto__") - $util.makeProp(message.fields, keys[i]); - if (!$util.isObject(object.fields[keys[i]])) - throw TypeError(".google.protobuf.Struct.fields: object expected"); - message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]], long + 1); - } - } - 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - 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) { - if (keys2[j] === "__proto__") - $util.makeProp(object.fields, keys2[j]); - object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options, q + 1); - } - } - 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); - }; - - /** - * 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.Value = (function() { - - /** - * 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 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Value nullValue. - * @member {google.protobuf.NullValue|null|undefined} nullValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.nullValue = null; - - /** - * Value numberValue. - * @member {number|null|undefined} numberValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.numberValue = null; - - /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.stringValue = null; - - /** - * Value boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.boolValue = null; - - /** - * Value structValue. - * @member {google.protobuf.IStruct|null|undefined} structValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.structValue = null; - - /** - * Value listValue. - * @member {google.protobuf.IListValue|null|undefined} listValue - * @memberof google.protobuf.Value - * @instance - */ - Value.prototype.listValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * 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) - }); - - /** - * Creates a new Value instance using the specified properties. - * @function create - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue=} [properties] Properties to set - * @returns {google.protobuf.Value} Value instance - */ - Value.create = function create(properties) { - return new Value(properties); - }; - - /** - * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue); - if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue); - if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) - $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork(), q + 1).ldelim(); - if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) - $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Value - * @static - * @param {google.protobuf.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a Value message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.nullValue = reader.int32(); - break; - } - case 2: { - message.numberValue = reader.double(); - break; - } - case 3: { - message.stringValue = reader.string(); - break; - } - case 4: { - message.boolValue = reader.bool(); - break; - } - case 5: { - message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - case 6: { - message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32(), undefined, long + 1); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Value message. - * @function verify - * @memberof google.protobuf.Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Value.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - var properties = {}; - if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue")) { - properties.kind = 1; - switch (message.nullValue) { - default: - return "nullValue: enum value expected"; - case 0: - break; - } - } - if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.numberValue !== "number") - return "numberValue: number expected"; - } - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.boolValue !== "boolean") - return "boolValue: boolean expected"; - } - if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.Struct.verify(message.structValue, long + 1); - if (error) - return "structValue." + error; - } - } - if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - { - var error = $root.google.protobuf.ListValue.verify(message.listValue, long + 1); - if (error) - return "listValue." + error; - } - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.Value) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.Value: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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.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 (!$util.isObject(object.structValue)) - throw TypeError(".google.protobuf.Value.structValue: object expected"); - message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue, long + 1); - } - if (object.listValue != null) { - if (!$util.isObject(object.listValue)) - throw TypeError(".google.protobuf.Value.listValue: object expected"); - message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue, long + 1); - } - return message; - }; - - /** - * 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - var object = {}; - if (message.nullValue != null && Object.hasOwnProperty.call(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"; - } - if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue")) { - object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue; - if (options.oneofs) - object.kind = "numberValue"; - } - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue")) { - object.boolValue = message.boolValue; - if (options.oneofs) - object.kind = "boolValue"; - } - if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue")) { - object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options, q + 1); - if (options.oneofs) - object.kind = "structValue"; - } - if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue")) { - object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options, q + 1); - if (options.oneofs) - object.kind = "listValue"; - } - return object; - }; - - /** - * 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); - }; - - /** - * 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; - })(); - - /** - * NullValue enum. - * @name google.protobuf.NullValue - * @enum {number} - * @property {number} NULL_VALUE=0 NULL_VALUE value - */ - protobuf.NullValue = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NULL_VALUE"] = 0; - return values; - })(); - - protobuf.ListValue = (function() { - - /** - * Properties of a ListValue. - * @memberof google.protobuf - * @interface IListValue - * @property {Array.|null} [values] ListValue values - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListValue values. - * @member {Array.} values - * @memberof google.protobuf.ListValue - * @instance - */ - ListValue.prototype.values = $util.emptyArray; - - /** - * Creates a new ListValue instance using the specified properties. - * @function create - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue=} [properties] Properties to set - * @returns {google.protobuf.ListValue} ListValue instance - */ - ListValue.create = function create(properties) { - return new ListValue(properties); - }; - - /** - * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListValue.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork(), q + 1).ldelim(); - return writer; - }; - - /** - * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ListValue - * @static - * @param {google.protobuf.IListValue} message ListValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a ListValue message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ListValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ListValue} ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListValue.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32(), undefined, long + 1)); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a ListValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ListValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ListValue} ListValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListValue.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListValue message. - * @function verify - * @memberof google.protobuf.ListValue - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListValue.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.values != null && Object.hasOwnProperty.call(message, "values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.values[i], long + 1); - if (error) - return "values." + error; - } - } - return null; - }; - - /** - * 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, long) { - if (object instanceof $root.google.protobuf.ListValue) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.ListValue: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - 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 (!$util.isObject(object.values[i])) - throw TypeError(".google.protobuf.ListValue.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i], long + 1); - } - } - return message; - }; - - /** - * 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - 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, q + 1); - } - 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); - }; - - /** - * 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.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * 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 && keys[i] !== "__proto__") - this[keys[i]] = properties[keys[i]]; - } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer, q) { - if (!writer) - writer = $Writer.create(); - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer && writer.len ? writer.fork() : writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length, error, long) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - if (long === undefined) - long = 0; - if (long > $Reader.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7, long); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message, long) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - return "maximum nesting depth exceeded"; - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return 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, long) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - if (!$util.isObject(object)) - throw TypeError(".google.protobuf.Timestamp: object expected"); - if (long === undefined) - long = 0; - if (long > $util.recursionLimit) - throw Error("maximum nesting depth exceeded"); - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - message.seconds = $util.Long.fromValue(object.seconds, 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 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, q) { - if (!options) - options = {}; - if (q === undefined) - q = 0; - if (q > $util.recursionLimit) - throw Error("max depth exceeded"); - 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() : typeof BigInt !== "undefined" && options.longs === BigInt ? long.toBigInt() : long; - } else - object.seconds = options.longs === String ? "0" : typeof BigInt !== "undefined" && options.longs === BigInt ? BigInt("0") : 0; - object.nanos = 0; - } - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - if (typeof BigInt !== "undefined" && options.longs === BigInt) - object.seconds = typeof message.seconds === "number" ? BigInt(message.seconds) : $util.Long.fromBits(message.seconds.low >>> 0, message.seconds.high >>> 0, false).toBigInt(); - else 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 && Object.hasOwnProperty.call(message, "nanos")) - object.nanos = message.nanos; - 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); - }; - - /** - * 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; - })(); - - return protobuf; - })(); - - return google; - })(); - - return $root; -}); +module.exports = require('@google-cloud/pubsub-api/build/protos/protos'); From 2fccf81568160f4fda0f09fa30d05cd3acef3b77 Mon Sep 17 00:00:00 2001 From: Santi Quiroga Date: Thu, 15 Oct 2026 06:58:12 +0000 Subject: [PATCH 2/2] fix(firestore): remove discontinued v1beta1 declaration from types --- handwritten/firestore/types/firestore.d.ts | 8 -------- 1 file changed, 8 deletions(-) diff --git a/handwritten/firestore/types/firestore.d.ts b/handwritten/firestore/types/firestore.d.ts index 8cbae7618e68..9720e6a2f802 100644 --- a/handwritten/firestore/types/firestore.d.ts +++ b/handwritten/firestore/types/firestore.d.ts @@ -3163,14 +3163,6 @@ declare namespace FirebaseFirestore { */ build(): Buffer; } - /** - * The v1beta1 Veneer client. This client provides access to the underlying - * Firestore v1beta1 RPCs. - * @deprecated Prefer the v1 client instead of the v1beta1 client. If your use case requires the v1beta1 client, it is published as part of the standalone @google-cloud/firestore-api package. - */ - export const v1beta1: { - FirestoreClient: typeof import('./v1beta1/firestore_client').FirestoreClient; - }; /** * The v1 Veneer clients. These clients provide access to the Firestore Admin * API and the underlying Firestore v1 RPCs.