Class PublisherServiceApiClientImpl (2.5.0)

public sealed class PublisherServiceApiClientImpl : PublisherServiceApiClient

PublisherServiceApi client wrapper implementation, for convenient use.

Inheritance

Object > PublisherServiceApiClient > PublisherServiceApiClientImpl

Namespace

Google.Cloud.PubSub.V1

Assembly

Google.Cloud.PubSub.V1.dll

Remarks

The service that an application uses to manipulate topics, and to send messages to a topic.

Constructors

PublisherServiceApiClientImpl(Publisher.PublisherClient, PublisherServiceApiSettings)

public PublisherServiceApiClientImpl(Publisher.PublisherClient grpcClient, PublisherServiceApiSettings settings)

Constructs a client wrapper for the PublisherServiceApi service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientPublisher.PublisherClient

The underlying gRPC client.

settingsPublisherServiceApiSettings

The base PublisherServiceApiSettings used within this client.

Properties

GrpcClient

public override Publisher.PublisherClient GrpcClient { get; }

The underlying gRPC PublisherServiceApi client

Property Value
TypeDescription
Publisher.PublisherClient
Overrides

Methods

CreateTopic(Topic, CallSettings)

public override Topic CreateTopic(Topic request, CallSettings callSettings = null)

Creates the given topic with the given name. See the resource name rules.

Parameters
NameDescription
requestTopic

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Topic

The RPC response.

Overrides

CreateTopicAsync(Topic, CallSettings)

public override Task<Topic> CreateTopicAsync(Topic request, CallSettings callSettings = null)

Creates the given topic with the given name. See the resource name rules.

Parameters
NameDescription
requestTopic

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Topic>

A Task containing the RPC response.

Overrides

DeleteTopic(DeleteTopicRequest, CallSettings)

public override void DeleteTopic(DeleteTopicRequest request, CallSettings callSettings = null)

Deletes the topic with the given name. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their topic field is set to _deleted-topic_.

Parameters
NameDescription
requestDeleteTopicRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Overrides

DeleteTopicAsync(DeleteTopicRequest, CallSettings)

public override Task DeleteTopicAsync(DeleteTopicRequest request, CallSettings callSettings = null)

Deletes the topic with the given name. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their topic field is set to _deleted-topic_.

Parameters
NameDescription
requestDeleteTopicRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task

A Task containing the RPC response.

Overrides

DetachSubscription(DetachSubscriptionRequest, CallSettings)

public override DetachSubscriptionResponse DetachSubscription(DetachSubscriptionRequest request, CallSettings callSettings = null)

Detaches a subscription from this topic. All messages retained in the subscription are dropped. Subsequent Pull and StreamingPull requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will stop.

Parameters
NameDescription
requestDetachSubscriptionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DetachSubscriptionResponse

The RPC response.

Overrides

DetachSubscriptionAsync(DetachSubscriptionRequest, CallSettings)

public override Task<DetachSubscriptionResponse> DetachSubscriptionAsync(DetachSubscriptionRequest request, CallSettings callSettings = null)

Detaches a subscription from this topic. All messages retained in the subscription are dropped. Subsequent Pull and StreamingPull requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will stop.

Parameters
NameDescription
requestDetachSubscriptionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<DetachSubscriptionResponse>

A Task containing the RPC response.

Overrides

GetIamPolicy(GetIamPolicyRequest, CallSettings)

public override Policy GetIamPolicy(GetIamPolicyRequest request, CallSettings callSettings = null)

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
NameDescription
requestGetIamPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Overrides

GetIamPolicyAsync(GetIamPolicyRequest, CallSettings)

public override Task<Policy> GetIamPolicyAsync(GetIamPolicyRequest request, CallSettings callSettings = null)

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters
NameDescription
requestGetIamPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Overrides

GetTopic(GetTopicRequest, CallSettings)

public override Topic GetTopic(GetTopicRequest request, CallSettings callSettings = null)

Gets the configuration of a topic.

Parameters
NameDescription
requestGetTopicRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Topic

The RPC response.

Overrides

GetTopicAsync(GetTopicRequest, CallSettings)

public override Task<Topic> GetTopicAsync(GetTopicRequest request, CallSettings callSettings = null)

Gets the configuration of a topic.

Parameters
NameDescription
requestGetTopicRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Topic>

A Task containing the RPC response.

Overrides

ListTopics(ListTopicsRequest, CallSettings)

public override PagedEnumerable<ListTopicsResponse, Topic> ListTopics(ListTopicsRequest request, CallSettings callSettings = null)

Lists matching topics.

Parameters
NameDescription
requestListTopicsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTopicsResponse, Topic>

A pageable sequence of Topic resources.

Overrides

ListTopicsAsync(ListTopicsRequest, CallSettings)

public override PagedAsyncEnumerable<ListTopicsResponse, Topic> ListTopicsAsync(ListTopicsRequest request, CallSettings callSettings = null)

Lists matching topics.

Parameters
NameDescription
requestListTopicsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTopicsResponse, Topic>

A pageable asynchronous sequence of Topic resources.

Overrides

ListTopicSnapshots(ListTopicSnapshotsRequest, CallSettings)

public override PagedEnumerable<ListTopicSnapshotsResponse, string> ListTopicSnapshots(ListTopicSnapshotsRequest request, CallSettings callSettings = null)

Lists the names of the snapshots on this topic. Snapshots are used in Seek operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.

Parameters
NameDescription
requestListTopicSnapshotsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTopicSnapshotsResponse, String>

A pageable sequence of String resources.

Overrides

ListTopicSnapshotsAsync(ListTopicSnapshotsRequest, CallSettings)

public override PagedAsyncEnumerable<ListTopicSnapshotsResponse, string> ListTopicSnapshotsAsync(ListTopicSnapshotsRequest request, CallSettings callSettings = null)

Lists the names of the snapshots on this topic. Snapshots are used in Seek operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.

Parameters
NameDescription
requestListTopicSnapshotsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTopicSnapshotsResponse, String>

A pageable asynchronous sequence of String resources.

Overrides

ListTopicSubscriptions(ListTopicSubscriptionsRequest, CallSettings)

public override PagedEnumerable<ListTopicSubscriptionsResponse, string> ListTopicSubscriptions(ListTopicSubscriptionsRequest request, CallSettings callSettings = null)

Lists the names of the attached subscriptions on this topic.

Parameters
NameDescription
requestListTopicSubscriptionsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListTopicSubscriptionsResponse, String>

A pageable sequence of String resources.

Overrides

ListTopicSubscriptionsAsync(ListTopicSubscriptionsRequest, CallSettings)

public override PagedAsyncEnumerable<ListTopicSubscriptionsResponse, string> ListTopicSubscriptionsAsync(ListTopicSubscriptionsRequest request, CallSettings callSettings = null)

Lists the names of the attached subscriptions on this topic.

Parameters
NameDescription
requestListTopicSubscriptionsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListTopicSubscriptionsResponse, String>

A pageable asynchronous sequence of String resources.

Overrides

Publish(PublishRequest, CallSettings)

public override PublishResponse Publish(PublishRequest request, CallSettings callSettings = null)

Adds one or more messages to the topic. Returns NOT_FOUND if the topic does not exist.

Parameters
NameDescription
requestPublishRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PublishResponse

The RPC response.

Overrides

PublishAsync(PublishRequest, CallSettings)

public override Task<PublishResponse> PublishAsync(PublishRequest request, CallSettings callSettings = null)

Adds one or more messages to the topic. Returns NOT_FOUND if the topic does not exist.

Parameters
NameDescription
requestPublishRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<PublishResponse>

A Task containing the RPC response.

Overrides

SetIamPolicy(SetIamPolicyRequest, CallSettings)

public override Policy SetIamPolicy(SetIamPolicyRequest request, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED

Parameters
NameDescription
requestSetIamPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Policy

The RPC response.

Overrides

SetIamPolicyAsync(SetIamPolicyRequest, CallSettings)

public override Task<Policy> SetIamPolicyAsync(SetIamPolicyRequest request, CallSettings callSettings = null)

Sets the access control policy on the specified resource. Replaces any existing policy.

Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED

Parameters
NameDescription
requestSetIamPolicyRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Policy>

A Task containing the RPC response.

Overrides

TestIamPermissions(TestIamPermissionsRequest, CallSettings)

public override TestIamPermissionsResponse TestIamPermissions(TestIamPermissionsRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
NameDescription
requestTestIamPermissionsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TestIamPermissionsResponse

The RPC response.

Overrides

TestIamPermissionsAsync(TestIamPermissionsRequest, CallSettings)

public override Task<TestIamPermissionsResponse> TestIamPermissionsAsync(TestIamPermissionsRequest request, CallSettings callSettings = null)

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters
NameDescription
requestTestIamPermissionsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<TestIamPermissionsResponse>

A Task containing the RPC response.

Overrides

UpdateTopic(UpdateTopicRequest, CallSettings)

public override Topic UpdateTopic(UpdateTopicRequest request, CallSettings callSettings = null)

Updates an existing topic. Note that certain properties of a topic are not modifiable.

Parameters
NameDescription
requestUpdateTopicRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Topic

The RPC response.

Overrides

UpdateTopicAsync(UpdateTopicRequest, CallSettings)

public override Task<Topic> UpdateTopicAsync(UpdateTopicRequest request, CallSettings callSettings = null)

Updates an existing topic. Note that certain properties of a topic are not modifiable.

Parameters
NameDescription
requestUpdateTopicRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Topic>

A Task containing the RPC response.

Overrides