Class protos.google.pubsub.v1.Publisher (4.8.0)

Represents a Publisher

Inheritance

$protobuf.rpc.Service > protos.google.pubsub.v1.Publisher

Package

@google-cloud/pubsub

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);

Constructs a new Publisher service.

Parameters
Name Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Methods

create(rpcImpl, requestDelimited, responseDelimited)

public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): Publisher;

Creates new Publisher service using the specified rpc implementation.

Parameters
Name Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Returns
Type Description
Publisher

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

createTopic(request, callback)

public createTopic(request: google.pubsub.v1.ITopic, callback: google.pubsub.v1.Publisher.CreateTopicCallback): void;

Calls CreateTopic.

Parameters
Name Description
request ITopic

Topic message or plain object

callback CreateTopicCallback

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

Returns
Type Description
void

createTopic(request)

public createTopic(request: google.pubsub.v1.ITopic): Promise<google.pubsub.v1.Topic>;

Calls CreateTopic.

Parameter
Name Description
request ITopic

Topic message or plain object

Returns
Type Description
Promise<google.pubsub.v1.Topic>

Promise

deleteTopic(request, callback)

public deleteTopic(request: google.pubsub.v1.IDeleteTopicRequest, callback: google.pubsub.v1.Publisher.DeleteTopicCallback): void;

Calls DeleteTopic.

Parameters
Name Description
request IDeleteTopicRequest

DeleteTopicRequest message or plain object

callback DeleteTopicCallback

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

Returns
Type Description
void

deleteTopic(request)

public deleteTopic(request: google.pubsub.v1.IDeleteTopicRequest): Promise<google.protobuf.Empty>;

Calls DeleteTopic.

Parameter
Name Description
request IDeleteTopicRequest

DeleteTopicRequest message or plain object

Returns
Type Description
Promise<google.protobuf.Empty>

Promise

detachSubscription(request, callback)

public detachSubscription(request: google.pubsub.v1.IDetachSubscriptionRequest, callback: google.pubsub.v1.Publisher.DetachSubscriptionCallback): void;

Calls DetachSubscription.

Parameters
Name Description
request IDetachSubscriptionRequest

DetachSubscriptionRequest message or plain object

callback DetachSubscriptionCallback

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

Returns
Type Description
void

detachSubscription(request)

public detachSubscription(request: google.pubsub.v1.IDetachSubscriptionRequest): Promise<google.pubsub.v1.DetachSubscriptionResponse>;

Calls DetachSubscription.

Parameter
Name Description
request IDetachSubscriptionRequest

DetachSubscriptionRequest message or plain object

Returns
Type Description
Promise<google.pubsub.v1.DetachSubscriptionResponse>

Promise

getTopic(request, callback)

public getTopic(request: google.pubsub.v1.IGetTopicRequest, callback: google.pubsub.v1.Publisher.GetTopicCallback): void;

Calls GetTopic.

Parameters
Name Description
request IGetTopicRequest

GetTopicRequest message or plain object

callback GetTopicCallback

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

Returns
Type Description
void

getTopic(request)

public getTopic(request: google.pubsub.v1.IGetTopicRequest): Promise<google.pubsub.v1.Topic>;

Calls GetTopic.

Parameter
Name Description
request IGetTopicRequest

GetTopicRequest message or plain object

Returns
Type Description
Promise<google.pubsub.v1.Topic>

Promise

listTopics(request, callback)

public listTopics(request: google.pubsub.v1.IListTopicsRequest, callback: google.pubsub.v1.Publisher.ListTopicsCallback): void;

Calls ListTopics.

Parameters
Name Description
request IListTopicsRequest

ListTopicsRequest message or plain object

callback ListTopicsCallback

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

Returns
Type Description
void

listTopics(request)

public listTopics(request: google.pubsub.v1.IListTopicsRequest): Promise<google.pubsub.v1.ListTopicsResponse>;

Calls ListTopics.

Parameter
Name Description
request IListTopicsRequest

ListTopicsRequest message or plain object

Returns
Type Description
Promise<google.pubsub.v1.ListTopicsResponse>

Promise

listTopicSnapshots(request, callback)

public listTopicSnapshots(request: google.pubsub.v1.IListTopicSnapshotsRequest, callback: google.pubsub.v1.Publisher.ListTopicSnapshotsCallback): void;

Calls ListTopicSnapshots.

Parameters
Name Description
request IListTopicSnapshotsRequest

ListTopicSnapshotsRequest message or plain object

callback ListTopicSnapshotsCallback

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

Returns
Type Description
void

listTopicSnapshots(request)

public listTopicSnapshots(request: google.pubsub.v1.IListTopicSnapshotsRequest): Promise<google.pubsub.v1.ListTopicSnapshotsResponse>;

Calls ListTopicSnapshots.

Parameter
Name Description
request IListTopicSnapshotsRequest

ListTopicSnapshotsRequest message or plain object

Returns
Type Description
Promise<google.pubsub.v1.ListTopicSnapshotsResponse>

Promise

listTopicSubscriptions(request, callback)

public listTopicSubscriptions(request: google.pubsub.v1.IListTopicSubscriptionsRequest, callback: google.pubsub.v1.Publisher.ListTopicSubscriptionsCallback): void;

Calls ListTopicSubscriptions.

Parameters
Name Description
request IListTopicSubscriptionsRequest

ListTopicSubscriptionsRequest message or plain object

callback ListTopicSubscriptionsCallback

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

Returns
Type Description
void

listTopicSubscriptions(request)

public listTopicSubscriptions(request: google.pubsub.v1.IListTopicSubscriptionsRequest): Promise<google.pubsub.v1.ListTopicSubscriptionsResponse>;

Calls ListTopicSubscriptions.

Parameter
Name Description
request IListTopicSubscriptionsRequest

ListTopicSubscriptionsRequest message or plain object

Returns
Type Description
Promise<google.pubsub.v1.ListTopicSubscriptionsResponse>

Promise

publish(request, callback)

public publish(request: google.pubsub.v1.IPublishRequest, callback: google.pubsub.v1.Publisher.PublishCallback): void;

Calls Publish.

Parameters
Name Description
request IPublishRequest

PublishRequest message or plain object

callback PublishCallback

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

Returns
Type Description
void

publish(request)

public publish(request: google.pubsub.v1.IPublishRequest): Promise<google.pubsub.v1.PublishResponse>;

Calls Publish.

Parameter
Name Description
request IPublishRequest

PublishRequest message or plain object

Returns
Type Description
Promise<google.pubsub.v1.PublishResponse>

Promise

updateTopic(request, callback)

public updateTopic(request: google.pubsub.v1.IUpdateTopicRequest, callback: google.pubsub.v1.Publisher.UpdateTopicCallback): void;

Calls UpdateTopic.

Parameters
Name Description
request IUpdateTopicRequest

UpdateTopicRequest message or plain object

callback UpdateTopicCallback

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

Returns
Type Description
void

updateTopic(request)

public updateTopic(request: google.pubsub.v1.IUpdateTopicRequest): Promise<google.pubsub.v1.Topic>;

Calls UpdateTopic.

Parameter
Name Description
request IUpdateTopicRequest

UpdateTopicRequest message or plain object

Returns
Type Description
Promise<google.pubsub.v1.Topic>

Promise