Google Cloud Org Policy V2 Client - Class Parameter (1.2.1)

Reference documentation and code samples for the Google Cloud Org Policy V2 Client class Parameter.

Defines a parameter structure.

Generated from protobuf message google.cloud.orgpolicy.v2.Constraint.CustomConstraintDefinition.Parameter

Namespace

Google \ Cloud \ OrgPolicy \ V2 \ Constraint \ CustomConstraintDefinition

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ type int

Type of the parameter.

↳ default_value Google\Protobuf\Value

Sets the value of the parameter in an assignment if no value is given.

↳ valid_values_expr string

Provides a CEL expression to specify the acceptable parameter values during assignment. For example, parameterName in ("parameterValue1", "parameterValue2")

↳ metadata Parameter\Metadata

Defines subproperties primarily used by the UI to display user-friendly information.

↳ item int

Determines the parameter's value structure. For example, LIST<STRING> can be specified by defining type: LIST, and item: STRING.

getType

Type of the parameter.

Returns
Type Description
int

setType

Type of the parameter.

Parameter
Name Description
var int
Returns
Type Description
$this

getDefaultValue

Sets the value of the parameter in an assignment if no value is given.

Returns
Type Description
Google\Protobuf\Value|null

hasDefaultValue

clearDefaultValue

setDefaultValue

Sets the value of the parameter in an assignment if no value is given.

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

getValidValuesExpr

Provides a CEL expression to specify the acceptable parameter values during assignment.

For example, parameterName in ("parameterValue1", "parameterValue2")

Returns
Type Description
string

setValidValuesExpr

Provides a CEL expression to specify the acceptable parameter values during assignment.

For example, parameterName in ("parameterValue1", "parameterValue2")

Parameter
Name Description
var string
Returns
Type Description
$this

getMetadata

Defines subproperties primarily used by the UI to display user-friendly information.

Returns
Type Description
Parameter\Metadata|null

hasMetadata

clearMetadata

setMetadata

Defines subproperties primarily used by the UI to display user-friendly information.

Parameter
Name Description
var Parameter\Metadata
Returns
Type Description
$this

getItem

Determines the parameter's value structure.

For example, LIST<STRING> can be specified by defining type: LIST, and item: STRING.

Returns
Type Description
int

setItem

Determines the parameter's value structure.

For example, LIST<STRING> can be specified by defining type: LIST, and item: STRING.

Parameter
Name Description
var int
Returns
Type Description
$this