Google Cloud Functions V2 Client - Class PBFunction (1.0.3)

Reference documentation and code samples for the Google Cloud Functions V2 Client class PBFunction.

Describes a Cloud Function that contains user computation executed in response to an event. It encapsulates function and trigger configurations.

Generated from protobuf message google.cloud.functions.v2.Function

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*

↳ environment int

Describe whether the function is gen1 or gen2.

↳ description string

User-provided description of a function.

↳ build_config Google\Cloud\Functions\V2\BuildConfig

Describes the Build step of the function that builds a container from the given source.

↳ service_config Google\Cloud\Functions\V2\ServiceConfig

Describes the Service being deployed. Currently deploys services to Cloud Run (fully managed).

↳ event_trigger Google\Cloud\Functions\V2\EventTrigger

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service.

↳ state int

Output only. State of the function.

↳ update_time Google\Protobuf\Timestamp

Output only. The last update timestamp of a Cloud Function.

↳ labels array|Google\Protobuf\Internal\MapField

Labels associated with this Cloud Function.

↳ state_messages array<Google\Cloud\Functions\V2\StateMessage>

Output only. State Messages for this Cloud Function.

getName

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*

Returns
TypeDescription
string

setName

A user-defined name of the function. Function names must be unique globally and match pattern projects/*/locations/*/functions/*

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getEnvironment

Describe whether the function is gen1 or gen2.

Returns
TypeDescription
int

setEnvironment

Describe whether the function is gen1 or gen2.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getDescription

User-provided description of a function.

Returns
TypeDescription
string

setDescription

User-provided description of a function.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getBuildConfig

Describes the Build step of the function that builds a container from the given source.

Returns
TypeDescription
Google\Cloud\Functions\V2\BuildConfig|null

hasBuildConfig

clearBuildConfig

setBuildConfig

Describes the Build step of the function that builds a container from the given source.

Parameter
NameDescription
var Google\Cloud\Functions\V2\BuildConfig
Returns
TypeDescription
$this

getServiceConfig

Describes the Service being deployed. Currently deploys services to Cloud Run (fully managed).

Returns
TypeDescription
Google\Cloud\Functions\V2\ServiceConfig|null

hasServiceConfig

clearServiceConfig

setServiceConfig

Describes the Service being deployed. Currently deploys services to Cloud Run (fully managed).

Parameter
NameDescription
var Google\Cloud\Functions\V2\ServiceConfig
Returns
TypeDescription
$this

getEventTrigger

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service.

Returns
TypeDescription
Google\Cloud\Functions\V2\EventTrigger|null

hasEventTrigger

clearEventTrigger

setEventTrigger

An Eventarc trigger managed by Google Cloud Functions that fires events in response to a condition in another service.

Parameter
NameDescription
var Google\Cloud\Functions\V2\EventTrigger
Returns
TypeDescription
$this

getState

Output only. State of the function.

Returns
TypeDescription
int

setState

Output only. State of the function.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getUpdateTime

Output only. The last update timestamp of a Cloud Function.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The last update timestamp of a Cloud Function.

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

getLabels

Labels associated with this Cloud Function.

Returns
TypeDescription
Google\Protobuf\Internal\MapField

setLabels

Labels associated with this Cloud Function.

Parameter
NameDescription
var array|Google\Protobuf\Internal\MapField
Returns
TypeDescription
$this

getStateMessages

Output only. State Messages for this Cloud Function.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setStateMessages

Output only. State Messages for this Cloud Function.

Parameter
NameDescription
var array<Google\Cloud\Functions\V2\StateMessage>
Returns
TypeDescription
$this