Represents a Subscription.
Package
@google-cloud/pubsubConstructors
(constructor)(properties)
constructor(properties?: google.pubsub.v1.ISubscription);Constructs a new Subscription.
| Name | Description |
| properties |
google.pubsub.v1.ISubscription
Properties to set |
Properties
ackDeadlineSeconds
public ackDeadlineSeconds: number;Subscription ackDeadlineSeconds.
| Type | Description |
| number |
deadLetterPolicy
public deadLetterPolicy?: (google.pubsub.v1.IDeadLetterPolicy|null);Subscription deadLetterPolicy.
| Type | Description |
| (google.pubsub.v1.IDeadLetterPolicy|null) |
detached
public detached: boolean;Subscription detached.
| Type | Description |
| boolean |
enableMessageOrdering
public enableMessageOrdering: boolean;Subscription enableMessageOrdering.
| Type | Description |
| boolean |
expirationPolicy
public expirationPolicy?: (google.pubsub.v1.IExpirationPolicy|null);Subscription expirationPolicy.
| Type | Description |
| (google.pubsub.v1.IExpirationPolicy|null) |
filter
public filter: string;Subscription filter.
| Type | Description |
| string |
labels
public labels: { [k: string]: string };Subscription labels.
| Type | Description |
| { [k: string]: string } |
messageRetentionDuration
public messageRetentionDuration?: (google.protobuf.IDuration|null);Subscription messageRetentionDuration.
| Type | Description |
| (google.protobuf.IDuration|null) |
name
public name: string;Subscription name.
| Type | Description |
| string |
pushConfig
public pushConfig?: (google.pubsub.v1.IPushConfig|null);Subscription pushConfig.
| Type | Description |
| (google.pubsub.v1.IPushConfig|null) |
retainAckedMessages
public retainAckedMessages: boolean;Subscription retainAckedMessages.
| Type | Description |
| boolean |
retryPolicy
public retryPolicy?: (google.pubsub.v1.IRetryPolicy|null);Subscription retryPolicy.
| Type | Description |
| (google.pubsub.v1.IRetryPolicy|null) |
topic
public topic: string;Subscription topic.
| Type | Description |
| string |
topicMessageRetentionDuration
public topicMessageRetentionDuration?: (google.protobuf.IDuration|null);Subscription topicMessageRetentionDuration.
| Type | Description |
| (google.protobuf.IDuration|null) |
Methods
create(properties)
public static create(properties?: google.pubsub.v1.ISubscription): google.pubsub.v1.Subscription;Creates a new Subscription instance using the specified properties.
| Name | Description |
| properties |
google.pubsub.v1.ISubscription
Properties to set |
| Type | Description |
| google.pubsub.v1.Subscription | Subscription instance |
decode(reader, length)
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.pubsub.v1.Subscription;Decodes a Subscription message from the specified reader or buffer.
| Name | Description |
| reader |
($protobuf.Reader|Uint8Array)
Reader or buffer to decode from |
| length |
number
Message length if known beforehand |
| Type | Description |
| google.pubsub.v1.Subscription | Subscription |
decodeDelimited(reader)
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.pubsub.v1.Subscription;Decodes a Subscription message from the specified reader or buffer, length delimited.
| Name | Description |
| reader |
($protobuf.Reader|Uint8Array)
Reader or buffer to decode from |
| Type | Description |
| google.pubsub.v1.Subscription | Subscription |
encode(message, writer)
public static encode(message: google.pubsub.v1.ISubscription, writer?: $protobuf.Writer): $protobuf.Writer;Encodes the specified Subscription message. Does not implicitly messages.
| Name | Description |
| message |
google.pubsub.v1.ISubscription
Subscription message or plain object to encode |
| writer |
$protobuf.Writer
Writer to encode to |
| Type | Description |
| $protobuf.Writer | Writer |
encodeDelimited(message, writer)
public static encodeDelimited(message: google.pubsub.v1.ISubscription, writer?: $protobuf.Writer): $protobuf.Writer;Encodes the specified Subscription message, length delimited. Does not implicitly messages.
| Name | Description |
| message |
google.pubsub.v1.ISubscription
Subscription message or plain object to encode |
| writer |
$protobuf.Writer
Writer to encode to |
| Type | Description |
| $protobuf.Writer | Writer |
fromObject(object)
public static fromObject(object: { [k: string]: any }): google.pubsub.v1.Subscription;Creates a Subscription message from a plain object. Also converts values to their respective internal types.
| Name | Description |
| object |
{ [k: string]: any }
Plain object |
| Type | Description |
| google.pubsub.v1.Subscription | Subscription |
toJSON()
public toJSON(): { [k: string]: any };Converts this Subscription to JSON.
| Type | Description |
| { [k: string]: any } | JSON object |
toObject(message, options)
public static toObject(message: google.pubsub.v1.Subscription, options?: $protobuf.IConversionOptions): { [k: string]: any };Creates a plain object from a Subscription message. Also converts values to other types if specified.
| Name | Description |
| message |
google.pubsub.v1.Subscription
Subscription |
| options |
$protobuf.IConversionOptions
Conversion options |
| Type | Description |
| { [k: string]: any } | Plain object |
verify(message)
public static verify(message: { [k: string]: any }): (string|null);Verifies a Subscription message.
| Name | Description |
| message |
{ [k: string]: any }
Plain object to verify |
| Type | Description |
| (string|null) |
|