UNPKG

@google-cloud/pubsub

Version:

Cloud Pub/Sub Client Library for Node.js

958 lines (790 loc) 887 kB
// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. import 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<google.pubsub.v1.Topic>; /** * 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<google.pubsub.v1.Topic>; /** * 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<google.pubsub.v1.PublishResponse>; /** * 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<google.pubsub.v1.Topic>; /** * 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<google.pubsub.v1.ListTopicsResponse>; /** * 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<google.pubsub.v1.ListTopicSubscriptionsResponse>; /** * 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<google.pubsub.v1.ListTopicSnapshotsResponse>; /** * 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<google.protobuf.Empty>; /** * 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<google.pubsub.v1.DetachSubscriptionResponse>; } 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(): { [