3.6.0 (latest) 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.3.0 2.2.0

    public sealed class PubsubTarget : IMessage<PubsubTarget>, IEquatable<PubsubTarget>, IDeepCloneable<PubsubTarget>, IBufferMessage, IMessage

Reference documentation and code samples for the Google Cloud Scheduler v1 API class PubsubTarget.

Pub/Sub target. The job will be delivered by publishing a message to
the given Pub/Sub topic.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> PubsubTarget

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[PubsubTarget](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Scheduler.V1/latest/Google.Cloud.Scheduler.V1.PubsubTarget.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[PubsubTarget](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Scheduler.V1/latest/Google.Cloud.Scheduler.V1.PubsubTarget.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[PubsubTarget](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Scheduler.V1/latest/Google.Cloud.Scheduler.V1.PubsubTarget.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.Scheduler.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Scheduler.V1/latest/Google.Cloud.Scheduler.V1.md.txt)

## Assembly

Google.Cloud.Scheduler.V1.dll

## Constructors

### PubsubTarget()

    public PubsubTarget()

### PubsubTarget(PubsubTarget)

    public PubsubTarget(PubsubTarget other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `PubsubTarget` |

## Properties

### Attributes

    public MapField<string, string> Attributes { get; }

Attributes for PubsubMessage.

Pubsub message must contain either non-empty data, or at least one
attribute.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `MapFieldstringstring` |   |

### Data

    public ByteString Data { get; set; }

The message payload for PubsubMessage.

Pubsub message must contain either non-empty data, or at least one
attribute.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `ByteString` |   |

### TopicName

    public string TopicName { get; set; }

Required. The name of the Cloud Pub/Sub topic to which messages will
be published when a job is delivered. The topic name must be in the
same format as required by Pub/Sub's
[PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
for example `projects/PROJECT_ID/topics/TOPIC_ID`.

The topic must be in the same project as the Cloud Scheduler job.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### TopicNameAsTopicName

    public TopicName TopicNameAsTopicName { get; set; }

[TopicName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Scheduler.V1/latest/Google.Cloud.Scheduler.V1.TopicName.md.txt)-typed view over the [TopicName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Scheduler.V1/latest/Google.Cloud.Scheduler.V1.PubsubTarget.md.txt#Google_Cloud_Scheduler_V1_PubsubTarget_TopicName) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `TopicName` |   |