# Google Cloud Run V2 Client - Class Condition (1.12.2)

1.12.2 (latest) 1.12.1 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.0 1.5.2 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.9.3 0.8.0 0.7.2 0.6.0 0.5.2 0.4.0 0.3.4 Reference documentation and code samples for the Google Cloud Run V2 Client class Condition.

Defines a status condition for a resource.

Generated from protobuf message `google.cloud.run.v2.Condition`

## Namespace

Google \\ Cloud \\ Run \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ type` | `string` type is used to communicate the status of the reconciliation process. See also: <https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting> Types common to all resources include: \* \* "Ready": True when the Resource is ready. |
| `↳ state` | `int` State of the condition. |
| `↳ message` | `string` Human readable message indicating details about the current status. |
| `↳ last_transition_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Last time the condition transitioned from one status to another. |
| `↳ severity` | `int` How to interpret failures of this condition, one of Error, Warning, Info |
| `↳ reason` | `int` Output only. A common (service-level) reason for this condition. |
| `↳ revision_reason` | `int` Output only. A reason for the revision condition. |
| `↳ execution_reason` | `int` Output only. A reason for the execution condition. |

### getType

type is used to communicate the status of the reconciliation process.

See also:
<https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting>
Types common to all resources include:

- "Ready": True when the Resource is ready.

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

### setType

type is used to communicate the status of the reconciliation process.

See also:
<https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting>
Types common to all resources include:

- "Ready": True when the Resource is ready.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getState

State of the condition.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.Condition.State). |

### setState

State of the condition.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [State](https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.Condition.State). |

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

### getMessage

Human readable message indicating details about the current status.

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

### setMessage

Human readable message indicating details about the current status.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

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

### getLastTransitionTime

Last time the condition transitioned from one status to another.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasLastTransitionTime

### clearLastTransitionTime

### setLastTransitionTime

Last time the condition transitioned from one status to another.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

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

### getSeverity

How to interpret failures of this condition, one of Error, Warning, Info

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Severity](https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.Condition.Severity). |

### setSeverity

How to interpret failures of this condition, one of Error, Warning, Info

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Severity](https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.Condition.Severity). |

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

### getReason

Output only. A common (service-level) reason for this condition.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [CommonReason](https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.Condition.CommonReason). |

### hasReason

### setReason

Output only. A common (service-level) reason for this condition.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [CommonReason](https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.Condition.CommonReason). |

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

### getRevisionReason

Output only. A reason for the revision condition.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [RevisionReason](https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.Condition.RevisionReason). |

### hasRevisionReason

### setRevisionReason

Output only. A reason for the revision condition.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [RevisionReason](https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.Condition.RevisionReason). |

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

### getExecutionReason

Output only. A reason for the execution condition.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [ExecutionReason](https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.Condition.ExecutionReason). |

### hasExecutionReason

### setExecutionReason

Output only. A reason for the execution condition.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [ExecutionReason](https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.Condition.ExecutionReason). |

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

### getReasons

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