# Google Cloud Asset V1 Client - Class AnalyzerOrgPolicyConstraint (2.3.3)

2.3.3 (latest) 2.3.2 2.2.3 2.1.3 2.0.1 1.16.4 1.14.1 1.13.2 1.12.2 1.11.3 1.10.2 1.9.2 Reference documentation and code samples for the Google Cloud Asset V1 Client class AnalyzerOrgPolicyConstraint.

The organization policy constraint definition.

Generated from protobuf message `google.cloud.asset.v1.AnalyzerOrgPolicyConstraint`

## Namespace

Google \\ Cloud \\ Asset \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ google_defined_constraint` | `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.AnalyzerOrgPolicyConstraint.Constraint` The definition of the canned constraint defined by Google. |
| `↳ custom_constraint` | `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.AnalyzerOrgPolicyConstraint.CustomConstraint` The definition of the custom constraint. |

### getGoogleDefinedConstraint

The definition of the canned constraint defined by Google.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.AnalyzerOrgPolicyConstraint.Constraint|null` |   |

### hasGoogleDefinedConstraint

### setGoogleDefinedConstraint

The definition of the canned constraint defined by Google.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.AnalyzerOrgPolicyConstraint.Constraint` |

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

### getCustomConstraint

The definition of the custom constraint.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.AnalyzerOrgPolicyConstraint.CustomConstraint|null` |   |

### hasCustomConstraint

### setCustomConstraint

The definition of the custom constraint.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-asset/latest/V1.AnalyzerOrgPolicyConstraint.CustomConstraint` |

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

### getConstraintDefinition

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |