Reference documentation and code samples for the Google Cloud Eventarc Publishing V1 Client class CloudEvent.
CloudEvent represents a vendor-neutral specification for defining the format of event data.
Generated from protobuf message google.cloud.eventarc.publishing.v1.CloudEvent
Namespace
Google \ Cloud \ Eventarc \ Publishing \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ id
string
Required. Identifies the event. Producers MUST ensure that source + id is unique for each distinct event.
↳ source
string
Required. Identifies the context in which an event happened. URI-reference
↳ spec_version
string
Required. The version of the CloudEvents specification which the event uses.
↳ type
string
Required. This attribute contains a value describing the type of event related to the originating occurrence.
↳ attributes
↳ binary_data
string
Optional. Binary data.
↳ text_data
string
Optional. Text data.
↳ proto_data
Google\Protobuf\Any
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.
getId
Required. Identifies the event. Producers MUST ensure that source + id is unique for each distinct event.
string
setId
Required. Identifies the event. Producers MUST ensure that source + id is unique for each distinct event.
var
string
$this
getSource
Required. Identifies the context in which an event happened.
URI-reference
string
setSource
Required. Identifies the context in which an event happened.
URI-reference
var
string
$this
getSpecVersion
Required. The version of the CloudEvents specification which the event uses.
string
setSpecVersion
Required. The version of the CloudEvents specification which the event uses.
var
string
$this
getType
Required. This attribute contains a value describing the type of event related to the originating occurrence.
string
setType
Required. This attribute contains a value describing the type of event related to the originating occurrence.
var
string
$this
getAttributes
Optional. Used for Optional & Extension Attributes
setAttributes
Optional. Used for Optional & Extension Attributes
$this
getBinaryData
Optional. Binary data.
string
hasBinaryData
setBinaryData
Optional. Binary data.
var
string
$this
getTextData
Optional. Text data.
string
hasTextData
setTextData
Optional. Text data.
var
string
$this
getProtoData
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.
hasProtoData
setProtoData
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.
$this
getData
string

