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

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
NameDescription
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
NameDescription
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Returns
TypeDescription
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
NameDescription
request google.pubsub.v1.ITopic

Topic message or plain object

callback google.pubsub.v1.Publisher.CreateTopicCallback

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

Returns
TypeDescription
void

createTopic(request)

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

Calls CreateTopic.

Parameter
NameDescription
request google.pubsub.v1.ITopic

Topic message or plain object

Returns
TypeDescription
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
NameDescription
request google.pubsub.v1.IDeleteTopicRequest

DeleteTopicRequest message or plain object

callback google.pubsub.v1.Publisher.DeleteTopicCallback

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

Returns
TypeDescription
void

deleteTopic(request)

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

Calls DeleteTopic.

Parameter
NameDescription
request google.pubsub.v1.IDeleteTopicRequest

DeleteTopicRequest message or plain object

Returns
TypeDescription
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
NameDescription
request google.pubsub.v1.IDetachSubscriptionRequest

DetachSubscriptionRequest message or plain object

callback google.pubsub.v1.Publisher.DetachSubscriptionCallback

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

Returns
TypeDescription
void

detachSubscription(request)

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

Calls DetachSubscription.

Parameter
NameDescription
request google.pubsub.v1.IDetachSubscriptionRequest

DetachSubscriptionRequest message or plain object

Returns
TypeDescription
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
NameDescription
request IGetTopicRequest

GetTopicRequest message or plain object

callback google.pubsub.v1.Publisher.GetTopicCallback

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

Returns
TypeDescription
void

getTopic(request)

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

Calls GetTopic.

Parameter
NameDescription
request IGetTopicRequest

GetTopicRequest message or plain object

Returns
TypeDescription
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
NameDescription
request google.pubsub.v1.IListTopicsRequest

ListTopicsRequest message or plain object

callback google.pubsub.v1.Publisher.ListTopicsCallback

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

Returns
TypeDescription
void

listTopics(request)

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

Calls ListTopics.

Parameter
NameDescription
request google.pubsub.v1.IListTopicsRequest

ListTopicsRequest message or plain object

Returns
TypeDescription
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
NameDescription
request google.pubsub.v1.IListTopicSnapshotsRequest

ListTopicSnapshotsRequest message or plain object

callback google.pubsub.v1.Publisher.ListTopicSnapshotsCallback

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

Returns
TypeDescription
void

listTopicSnapshots(request)

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

Calls ListTopicSnapshots.

Parameter
NameDescription
request google.pubsub.v1.IListTopicSnapshotsRequest

ListTopicSnapshotsRequest message or plain object

Returns
TypeDescription
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
NameDescription
request IListTopicSubscriptionsRequest

ListTopicSubscriptionsRequest message or plain object

callback google.pubsub.v1.Publisher.ListTopicSubscriptionsCallback

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

Returns
TypeDescription
void

listTopicSubscriptions(request)

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

Calls ListTopicSubscriptions.

Parameter
NameDescription
request IListTopicSubscriptionsRequest

ListTopicSubscriptionsRequest message or plain object

Returns
TypeDescription
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
NameDescription
request google.pubsub.v1.IPublishRequest

PublishRequest message or plain object

callback google.pubsub.v1.Publisher.PublishCallback

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

Returns
TypeDescription
void

publish(request)

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

Calls Publish.

Parameter
NameDescription
request google.pubsub.v1.IPublishRequest

PublishRequest message or plain object

Returns
TypeDescription
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
NameDescription
request google.pubsub.v1.IUpdateTopicRequest

UpdateTopicRequest message or plain object

callback google.pubsub.v1.Publisher.UpdateTopicCallback

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

Returns
TypeDescription
void

updateTopic(request)

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

Calls UpdateTopic.

Parameter
NameDescription
request google.pubsub.v1.IUpdateTopicRequest

UpdateTopicRequest message or plain object

Returns
TypeDescription
Promise<google.pubsub.v1.Topic>

Promise