Google Cloud Build V1 Client - Class PublishLifecycleEventRequest (0.3.8)

Reference documentation and code samples for the Google Cloud Build V1 Client class PublishLifecycleEventRequest.

Publishes 'lifecycle events' that update the high-level state of a build:

  • BuildEnqueued: When a build is scheduled.

  • InvocationAttemptStarted: When work for a build starts; there can be multiple invocations for a build (e.g. retries).

  • InvocationAttemptCompleted: When work for a build finishes.
  • BuildFinished: When a build is finished.

Generated from protobuf message google.devtools.build.v1.PublishLifecycleEventRequest

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ service_level int

The interactivity of this build.

↳ build_event Google\Cloud\Build\V1\OrderedBuildEvent

Required. The lifecycle build event. If this is a build tool event, the RPC will fail with INVALID_REQUEST.

↳ stream_timeout Google\Protobuf\Duration

If the next event for this build or invocation (depending on the event type) hasn't been published after this duration from when {build_event} is written to BES, consider this stream expired. If this field is not set, BES backend will use its own default value.

↳ notification_keywords array

Additional information about a build request. These are define by the event publishers, and the Build Event Service does not validate or interpret them. They are used while notifying internal systems of new builds and invocations if the OrderedBuildEvent.event type is BuildEnqueued/InvocationAttemptStarted.

↳ project_id string

Required. The project this build is associated with. This should match the project used for the initial call to PublishLifecycleEvent (containing a BuildEnqueued message).

↳ check_preceding_lifecycle_events_present bool

Whether to require a previously received matching parent lifecycle event for the current request's event before continuing processing. - InvocationAttemptStarted and BuildFinished events require a BuildEnqueued parent event. - InvocationAttemptFinished events require an InvocationAttemptStarted parent event.

getServiceLevel

The interactivity of this build.

Returns
TypeDescription
int

setServiceLevel

The interactivity of this build.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getBuildEvent

Required. The lifecycle build event. If this is a build tool event, the RPC will fail with INVALID_REQUEST.

Returns
TypeDescription
Google\Cloud\Build\V1\OrderedBuildEvent|null

hasBuildEvent

clearBuildEvent

setBuildEvent

Required. The lifecycle build event. If this is a build tool event, the RPC will fail with INVALID_REQUEST.

Parameter
NameDescription
var Google\Cloud\Build\V1\OrderedBuildEvent
Returns
TypeDescription
$this

getStreamTimeout

If the next event for this build or invocation (depending on the event type) hasn't been published after this duration from when {build_event} is written to BES, consider this stream expired. If this field is not set, BES backend will use its own default value.

Returns
TypeDescription
Google\Protobuf\Duration|null

hasStreamTimeout

clearStreamTimeout

setStreamTimeout

If the next event for this build or invocation (depending on the event type) hasn't been published after this duration from when {build_event} is written to BES, consider this stream expired. If this field is not set, BES backend will use its own default value.

Parameter
NameDescription
var Google\Protobuf\Duration
Returns
TypeDescription
$this

getNotificationKeywords

Additional information about a build request. These are define by the event publishers, and the Build Event Service does not validate or interpret them. They are used while notifying internal systems of new builds and invocations if the OrderedBuildEvent.event type is BuildEnqueued/InvocationAttemptStarted.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setNotificationKeywords

Additional information about a build request. These are define by the event publishers, and the Build Event Service does not validate or interpret them. They are used while notifying internal systems of new builds and invocations if the OrderedBuildEvent.event type is BuildEnqueued/InvocationAttemptStarted.

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getProjectId

Required. The project this build is associated with.

This should match the project used for the initial call to PublishLifecycleEvent (containing a BuildEnqueued message).

Returns
TypeDescription
string

setProjectId

Required. The project this build is associated with.

This should match the project used for the initial call to PublishLifecycleEvent (containing a BuildEnqueued message).

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getCheckPrecedingLifecycleEventsPresent

Whether to require a previously received matching parent lifecycle event for the current request's event before continuing processing.

  • InvocationAttemptStarted and BuildFinished events require a BuildEnqueued parent event.
  • InvocationAttemptFinished events require an InvocationAttemptStarted parent event.
Returns
TypeDescription
bool

setCheckPrecedingLifecycleEventsPresent

Whether to require a previously received matching parent lifecycle event for the current request's event before continuing processing.

  • InvocationAttemptStarted and BuildFinished events require a BuildEnqueued parent event.
  • InvocationAttemptFinished events require an InvocationAttemptStarted parent event.
Parameter
NameDescription
var bool
Returns
TypeDescription
$this