Subscriber

google.pubsub.v1. Subscriber

Represents a Subscriber

Constructor

new Subscriber(rpcImpl, requestDelimitedopt, responseDelimitedopt)

Constructs a new Subscriber service.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Extends

  • $protobuf.rpc.Service

Methods

acknowledge(request, callback) → {undefined}

Calls Acknowledge.

Parameters:
Name Type Description
request google.pubsub.v1.IAcknowledgeRequest

AcknowledgeRequest message or plain object

callback google.pubsub.v1.Subscriber.AcknowledgeCallback

Node-style callback called with the error, if any, and Empty

Returns:
Type Description
undefined

acknowledge(request) → {Promise.<google.protobuf.Empty>}

Calls Acknowledge.

Parameters:
Name Type Description
request google.pubsub.v1.IAcknowledgeRequest

AcknowledgeRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

createSnapshot(request, callback) → {undefined}

Calls CreateSnapshot.

Parameters:
Name Type Description
request google.pubsub.v1.ICreateSnapshotRequest

CreateSnapshotRequest message or plain object

callback google.pubsub.v1.Subscriber.CreateSnapshotCallback

Node-style callback called with the error, if any, and Snapshot

Returns:
Type Description
undefined

createSnapshot(request) → {Promise.<google.pubsub.v1.Snapshot>}

Calls CreateSnapshot.

Parameters:
Name Type Description
request google.pubsub.v1.ICreateSnapshotRequest

CreateSnapshotRequest message or plain object

Returns:
Type Description
Promise.<google.pubsub.v1.Snapshot>

Promise

createSubscription(request, callback) → {undefined}

Calls CreateSubscription.

Parameters:
Name Type Description
request google.pubsub.v1.ISubscription

Subscription message or plain object

callback google.pubsub.v1.Subscriber.CreateSubscriptionCallback

Node-style callback called with the error, if any, and Subscription

Returns:
Type Description
undefined

createSubscription(request) → {Promise.<google.pubsub.v1.Subscription>}

Calls CreateSubscription.

Parameters:
Name Type Description
request google.pubsub.v1.ISubscription

Subscription message or plain object

Returns:
Type Description
Promise.<google.pubsub.v1.Subscription>

Promise

deleteSnapshot(request, callback) → {undefined}

Calls DeleteSnapshot.

Parameters:
Name Type Description
request google.pubsub.v1.IDeleteSnapshotRequest

DeleteSnapshotRequest message or plain object

callback google.pubsub.v1.Subscriber.DeleteSnapshotCallback

Node-style callback called with the error, if any, and Empty

Returns:
Type Description
undefined

deleteSnapshot(request) → {Promise.<google.protobuf.Empty>}

Calls DeleteSnapshot.

Parameters:
Name Type Description
request google.pubsub.v1.IDeleteSnapshotRequest

DeleteSnapshotRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

deleteSubscription(request, callback) → {undefined}

Calls DeleteSubscription.

Parameters:
Name Type Description
request google.pubsub.v1.IDeleteSubscriptionRequest

DeleteSubscriptionRequest message or plain object

callback google.pubsub.v1.Subscriber.DeleteSubscriptionCallback

Node-style callback called with the error, if any, and Empty

Returns:
Type Description
undefined

deleteSubscription(request) → {Promise.<google.protobuf.Empty>}

Calls DeleteSubscription.

Parameters:
Name Type Description
request google.pubsub.v1.IDeleteSubscriptionRequest

DeleteSubscriptionRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

getSnapshot(request, callback) → {undefined}

Calls GetSnapshot.

Parameters:
Name Type Description
request google.pubsub.v1.IGetSnapshotRequest

GetSnapshotRequest message or plain object

callback google.pubsub.v1.Subscriber.GetSnapshotCallback

Node-style callback called with the error, if any, and Snapshot

Returns:
Type Description
undefined

getSnapshot(request) → {Promise.<google.pubsub.v1.Snapshot>}

Calls GetSnapshot.

Parameters:
Name Type Description
request google.pubsub.v1.IGetSnapshotRequest

GetSnapshotRequest message or plain object

Returns:
Type Description
Promise.<google.pubsub.v1.Snapshot>

Promise

getSubscription(request, callback) → {undefined}

Calls GetSubscription.

Parameters:
Name Type Description
request google.pubsub.v1.IGetSubscriptionRequest

GetSubscriptionRequest message or plain object

callback google.pubsub.v1.Subscriber.GetSubscriptionCallback

Node-style callback called with the error, if any, and Subscription

Returns:
Type Description
undefined

getSubscription(request) → {Promise.<google.pubsub.v1.Subscription>}

Calls GetSubscription.

Parameters:
Name Type Description
request google.pubsub.v1.IGetSubscriptionRequest

GetSubscriptionRequest message or plain object

Returns:
Type Description
Promise.<google.pubsub.v1.Subscription>

Promise

listSnapshots(request, callback) → {undefined}

Calls ListSnapshots.

Parameters:
Name Type Description
request google.pubsub.v1.IListSnapshotsRequest

ListSnapshotsRequest message or plain object

callback google.pubsub.v1.Subscriber.ListSnapshotsCallback

Node-style callback called with the error, if any, and ListSnapshotsResponse

Returns:
Type Description
undefined

listSnapshots(request) → {Promise.<google.pubsub.v1.ListSnapshotsResponse>}

Calls ListSnapshots.

Parameters:
Name Type Description
request google.pubsub.v1.IListSnapshotsRequest

ListSnapshotsRequest message or plain object

Returns:
Type Description
Promise.<google.pubsub.v1.ListSnapshotsResponse>

Promise

listSubscriptions(request, callback) → {undefined}

Calls ListSubscriptions.

Parameters:
Name Type Description
request google.pubsub.v1.IListSubscriptionsRequest

ListSubscriptionsRequest message or plain object

callback google.pubsub.v1.Subscriber.ListSubscriptionsCallback

Node-style callback called with the error, if any, and ListSubscriptionsResponse

Returns:
Type Description
undefined

listSubscriptions(request) → {Promise.<google.pubsub.v1.ListSubscriptionsResponse>}

Calls ListSubscriptions.

Parameters:
Name Type Description
request google.pubsub.v1.IListSubscriptionsRequest

ListSubscriptionsRequest message or plain object

Returns:
Type Description
Promise.<google.pubsub.v1.ListSubscriptionsResponse>

Promise

modifyAckDeadline(request, callback) → {undefined}

Calls ModifyAckDeadline.

Parameters:
Name Type Description
request google.pubsub.v1.IModifyAckDeadlineRequest

ModifyAckDeadlineRequest message or plain object

callback google.pubsub.v1.Subscriber.ModifyAckDeadlineCallback

Node-style callback called with the error, if any, and Empty

Returns:
Type Description
undefined

modifyAckDeadline(request) → {Promise.<google.protobuf.Empty>}

Calls ModifyAckDeadline.

Parameters:
Name Type Description
request google.pubsub.v1.IModifyAckDeadlineRequest

ModifyAckDeadlineRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

modifyPushConfig(request, callback) → {undefined}

Calls ModifyPushConfig.

Parameters:
Name Type Description
request google.pubsub.v1.IModifyPushConfigRequest

ModifyPushConfigRequest message or plain object

callback google.pubsub.v1.Subscriber.ModifyPushConfigCallback

Node-style callback called with the error, if any, and Empty

Returns:
Type Description
undefined

modifyPushConfig(request) → {Promise.<google.protobuf.Empty>}

Calls ModifyPushConfig.

Parameters:
Name Type Description
request google.pubsub.v1.IModifyPushConfigRequest

ModifyPushConfigRequest message or plain object

Returns:
Type Description
Promise.<google.protobuf.Empty>

Promise

pull(request, callback) → {undefined}

Calls Pull.

Parameters:
Name Type Description
request google.pubsub.v1.IPullRequest

PullRequest message or plain object

callback google.pubsub.v1.Subscriber.PullCallback

Node-style callback called with the error, if any, and PullResponse

Returns:
Type Description
undefined

pull(request) → {Promise.<google.pubsub.v1.PullResponse>}

Calls Pull.

Parameters:
Name Type Description
request google.pubsub.v1.IPullRequest

PullRequest message or plain object

Returns:
Type Description
Promise.<google.pubsub.v1.PullResponse>

Promise

seek(request, callback) → {undefined}

Calls Seek.

Parameters:
Name Type Description
request google.pubsub.v1.ISeekRequest

SeekRequest message or plain object

callback google.pubsub.v1.Subscriber.SeekCallback

Node-style callback called with the error, if any, and SeekResponse

Returns:
Type Description
undefined

seek(request) → {Promise.<google.pubsub.v1.SeekResponse>}

Calls Seek.

Parameters:
Name Type Description
request google.pubsub.v1.ISeekRequest

SeekRequest message or plain object

Returns:
Type Description
Promise.<google.pubsub.v1.SeekResponse>

Promise

streamingPull(request, callback) → {undefined}

Calls StreamingPull.

Parameters:
Name Type Description
request google.pubsub.v1.IStreamingPullRequest

StreamingPullRequest message or plain object

callback google.pubsub.v1.Subscriber.StreamingPullCallback

Node-style callback called with the error, if any, and StreamingPullResponse

Returns:
Type Description
undefined

streamingPull(request) → {Promise.<google.pubsub.v1.StreamingPullResponse>}

Calls StreamingPull.

Parameters:
Name Type Description
request google.pubsub.v1.IStreamingPullRequest

StreamingPullRequest message or plain object

Returns:
Type Description
Promise.<google.pubsub.v1.StreamingPullResponse>

Promise

updateSnapshot(request, callback) → {undefined}

Calls UpdateSnapshot.

Parameters:
Name Type Description
request google.pubsub.v1.IUpdateSnapshotRequest

UpdateSnapshotRequest message or plain object

callback google.pubsub.v1.Subscriber.UpdateSnapshotCallback

Node-style callback called with the error, if any, and Snapshot

Returns:
Type Description
undefined

updateSnapshot(request) → {Promise.<google.pubsub.v1.Snapshot>}

Calls UpdateSnapshot.

Parameters:
Name Type Description
request google.pubsub.v1.IUpdateSnapshotRequest

UpdateSnapshotRequest message or plain object

Returns:
Type Description
Promise.<google.pubsub.v1.Snapshot>

Promise

updateSubscription(request, callback) → {undefined}

Calls UpdateSubscription.

Parameters:
Name Type Description
request google.pubsub.v1.IUpdateSubscriptionRequest

UpdateSubscriptionRequest message or plain object

callback google.pubsub.v1.Subscriber.UpdateSubscriptionCallback

Node-style callback called with the error, if any, and Subscription

Returns:
Type Description
undefined

updateSubscription(request) → {Promise.<google.pubsub.v1.Subscription>}

Calls UpdateSubscription.

Parameters:
Name Type Description
request google.pubsub.v1.IUpdateSubscriptionRequest

UpdateSubscriptionRequest message or plain object

Returns:
Type Description
Promise.<google.pubsub.v1.Subscription>

Promise

(static) create(rpcImpl, requestDelimitedopt, responseDelimitedopt) → {Subscriber}

Creates new Subscriber service using the specified rpc implementation.

Parameters:
Name Type Attributes Default Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean <optional>
false

Whether requests are length-delimited

responseDelimited boolean <optional>
false

Whether responses are length-delimited

Returns:
Type Description
Subscriber

RPC service. Useful where requests and/or responses are streamed.

Type Definitions

AcknowledgeCallback(error, responseopt)

Callback as used by acknowledge.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

CreateSnapshotCallback(error, responseopt)

Callback as used by createSnapshot.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.pubsub.v1.Snapshot <optional>

Snapshot

CreateSubscriptionCallback(error, responseopt)

Callback as used by createSubscription.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.pubsub.v1.Subscription <optional>

Subscription

DeleteSnapshotCallback(error, responseopt)

Callback as used by deleteSnapshot.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

DeleteSubscriptionCallback(error, responseopt)

Callback as used by deleteSubscription.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

GetSnapshotCallback(error, responseopt)

Callback as used by getSnapshot.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.pubsub.v1.Snapshot <optional>

Snapshot

GetSubscriptionCallback(error, responseopt)

Callback as used by getSubscription.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.pubsub.v1.Subscription <optional>

Subscription

ListSnapshotsCallback(error, responseopt)

Callback as used by listSnapshots.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.pubsub.v1.ListSnapshotsResponse <optional>

ListSnapshotsResponse

ListSubscriptionsCallback(error, responseopt)

Callback as used by listSubscriptions.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.pubsub.v1.ListSubscriptionsResponse <optional>

ListSubscriptionsResponse

ModifyAckDeadlineCallback(error, responseopt)

Callback as used by modifyAckDeadline.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

ModifyPushConfigCallback(error, responseopt)

Callback as used by modifyPushConfig.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.protobuf.Empty <optional>

Empty

PullCallback(error, responseopt)

Callback as used by pull.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.pubsub.v1.PullResponse <optional>

PullResponse

SeekCallback(error, responseopt)

Callback as used by seek.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.pubsub.v1.SeekResponse <optional>

SeekResponse

StreamingPullCallback(error, responseopt)

Callback as used by streamingPull.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.pubsub.v1.StreamingPullResponse <optional>

StreamingPullResponse

UpdateSnapshotCallback(error, responseopt)

Callback as used by updateSnapshot.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.pubsub.v1.Snapshot <optional>

Snapshot

UpdateSubscriptionCallback(error, responseopt)

Callback as used by updateSubscription.

Parameters:
Name Type Attributes Description
error Error | null

Error, if any

response google.pubsub.v1.Subscription <optional>

Subscription