Eventarc Publishing v1 API - Class CloudEvent (2.0.0-beta08)

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

Reference documentation and code samples for the Eventarc Publishing v1 API class CloudEvent.

CloudEvent represents a vendor-neutral specification for defining the format of event data.

Inheritance

object > CloudEvent

Namespace

Google.Cloud.Eventarc.Publishing.V1

Assembly

Google.Cloud.Eventarc.Publishing.V1.dll

Constructors

CloudEvent()

public CloudEvent()

CloudEvent(CloudEvent)

public CloudEvent(CloudEvent other)
Parameter
Name Description
other CloudEvent

Properties

Attributes

public MapField<string, CloudEvent.Types.CloudEventAttributeValue> Attributes { get; }

Optional. Used for Optional & Extension Attributes

Property Value
Type Description
MapFieldstringCloudEventTypesCloudEventAttributeValue

BinaryData

public ByteString BinaryData { get; set; }

Optional. Binary data.

Property Value
Type Description
ByteString

DataCase

public CloudEvent.DataOneofCase DataCase { get; }
Property Value
Type Description
CloudEventDataOneofCase

HasBinaryData

public bool HasBinaryData { get; }

Gets whether the "binary_data" field is set

Property Value
Type Description
bool

HasTextData

public bool HasTextData { get; }

Gets whether the "text_data" field is set

Property Value
Type Description
bool

Id

public string Id { get; set; }

Required. Identifies the event. Producers MUST ensure that source + id is unique for each distinct event.

Property Value
Type Description
string

ProtoData

public Any ProtoData { get; set; }

Optional. Proto data.

NOTE: The protoData field only functions as expected when the payload is specifically a CloudEvent message type, and can't be used for arbitrary protocol buffer messages. For any other protocol buffer type, you must serialize your proto message into bytes, and use the binaryData field instead.

Property Value
Type Description
Any

Source

public string Source { get; set; }

Required. Identifies the context in which an event happened. URI-reference

Property Value
Type Description
string

SpecVersion

public string SpecVersion { get; set; }

Required. The version of the CloudEvents specification which the event uses.

Property Value
Type Description
string

TextData

public string TextData { get; set; }

Optional. Text data.

Property Value
Type Description
string

Type

public string Type { get; set; }

Required. This attribute contains a value describing the type of event related to the originating occurrence.

Property Value
Type Description
string