Show / Hide Table of Contents

Class TopicsResource

The "topics" collection of methods.

Inheritance
object
TopicsResource
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Pubsub.v1beta1a
Assembly: Google.Apis.Pubsub.v1beta1a.dll
Syntax
public class TopicsResource

Constructors

TopicsResource(IClientService)

Constructs a new resource.

Declaration
public TopicsResource(IClientService service)
Parameters
Type Name Description
IClientService service

Methods

Create(Topic)

Creates the given topic with the given name.

Declaration
public virtual TopicsResource.CreateRequest Create(Topic body)
Parameters
Type Name Description
Topic body

The body of the request.

Returns
Type Description
TopicsResource.CreateRequest

Delete(string)

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.

Declaration
public virtual TopicsResource.DeleteRequest Delete(string topic)
Parameters
Type Name Description
string topic

Name of the topic to delete.

Returns
Type Description
TopicsResource.DeleteRequest

Get(string)

Gets the configuration of a topic. Since the topic only has the name attribute, this method is only useful to check the existence of a topic. If other attributes are added in the future, they will be returned here.

Declaration
public virtual TopicsResource.GetRequest Get(string topic)
Parameters
Type Name Description
string topic

The name of the topic to get.

Returns
Type Description
TopicsResource.GetRequest

List()

Lists matching topics.

Declaration
public virtual TopicsResource.ListRequest List()
Returns
Type Description
TopicsResource.ListRequest

Publish(PublishRequest)

Adds a message to the topic. Returns NOT_FOUND if the topic does not exist.

Declaration
public virtual TopicsResource.PublishRequest Publish(PublishRequest body)
Parameters
Type Name Description
PublishRequest body

The body of the request.

Returns
Type Description
TopicsResource.PublishRequest

PublishBatch(PublishBatchRequest)

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

Declaration
public virtual TopicsResource.PublishBatchRequest PublishBatch(PublishBatchRequest body)
Parameters
Type Name Description
PublishBatchRequest body

The body of the request.

Returns
Type Description
TopicsResource.PublishBatchRequest
In this article
Back to top Generated by DocFX