Google Cloud Eventarc Publishing V1 Client - Class CloudEvent (1.1.0)

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 \ V1

Methods

__construct

Constructor.

Parameters
Name Description
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 array|Google\Protobuf\Internal\MapField

Optional. Used for Optional & Extension Attributes

↳ binary_data string

Optional. Binary data.

↳ text_data string

Optional. Text data.

↳ proto_data Google\Protobuf\Any

Optional. Proto data.

getId

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

Returns
Type Description
string

setId

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

Parameter
Name Description
var string
Returns
Type Description
$this

getSource

Required. Identifies the context in which an event happened.

URI-reference

Returns
Type Description
string

setSource

Required. Identifies the context in which an event happened.

URI-reference

Parameter
Name Description
var string
Returns
Type Description
$this

getSpecVersion

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

Returns
Type Description
string

setSpecVersion

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

Parameter
Name Description
var string
Returns
Type Description
$this

getType

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

Returns
Type Description
string

setType

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

Parameter
Name Description
var string
Returns
Type Description
$this

getAttributes

Optional. Used for Optional & Extension Attributes

Returns
Type Description
Google\Protobuf\Internal\MapField

setAttributes

Optional. Used for Optional & Extension Attributes

Parameter
Name Description
var array|Google\Protobuf\Internal\MapField
Returns
Type Description
$this

getBinaryData

Optional. Binary data.

Returns
Type Description
string

hasBinaryData

setBinaryData

Optional. Binary data.

Parameter
Name Description
var string
Returns
Type Description
$this

getTextData

Optional. Text data.

Returns
Type Description
string

hasTextData

setTextData

Optional. Text data.

Parameter
Name Description
var string
Returns
Type Description
$this

getProtoData

Optional. Proto data.

Returns
Type Description
Google\Protobuf\Any|null

hasProtoData

setProtoData

Optional. Proto data.

Parameter
Name Description
var Google\Protobuf\Any
Returns
Type Description
$this

getData

Returns
Type Description
string