# Google Cloud Org Policy V2 Client - Class Parameter (1.3.3)

1.3.3 (latest) 1.3.2 1.2.2 1.1.3 1.0.0 0.7.0 0.6.5 0.5.3 0.4.2 0.3.7 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` | `https://protobuf.dev/reference/php/api-docs/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` | `https://docs.cloud.google.com/php/docs/reference/cloud-org-policy/latest/V2.Constraint.CustomConstraintDefinition.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` | Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-org-policy/latest/V2.Constraint.CustomConstraintDefinition.Parameter.Type). |

### setType

Type of the parameter.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-org-policy/latest/V2.Constraint.CustomConstraintDefinition.Parameter.Type). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDefaultValue

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/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` | `https://protobuf.dev/reference/php/api-docs/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** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-org-policy/latest/V2.Constraint.CustomConstraintDefinition.Parameter.Metadata|null` |   |

### hasMetadata

### clearMetadata

### setMetadata

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-org-policy/latest/V2.Constraint.CustomConstraintDefinition.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` | Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-org-policy/latest/V2.Constraint.CustomConstraintDefinition.Parameter.Type). |

### 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` Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-org-policy/latest/V2.Constraint.CustomConstraintDefinition.Parameter.Type). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |