0.6.0 (latest) 0.5.3 0.4.5 0.3.1 0.2.0 0.1.6 Reference documentation and code samples for the Google Cloud App Hub V1 Client class Workload.

Workload is an App Hub data model that contains a discovered workload, which
represents a binary deployment (such as managed instance groups (MIGs) and
GKE deployments) that performs the smallest logical subset of business
functionality.

Generated from protobuf message `google.cloud.apphub.v1.Workload`

## Namespace

Google \\ Cloud \\ AppHub \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. The resource name of the Workload. Format: `"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"` |
| `↳ display_name` | `string` Optional. User-defined name for the Workload. Can have a maximum length of 63 characters. |
| `↳ description` | `string` Optional. User-defined description of a Workload. Can have a maximum length of 2048 characters. |
| `↳ workload_reference` | `https://docs.cloud.google.com/php/docs/reference/cloud-apphub/latest/V1.WorkloadReference` Output only. Reference of an underlying compute resource represented by the Workload. These are immutable. |
| `↳ workload_properties` | `https://docs.cloud.google.com/php/docs/reference/cloud-apphub/latest/V1.WorkloadProperties` Output only. Properties of an underlying compute resource represented by the Workload. These are immutable. |
| `↳ discovered_workload` | `string` Required. Immutable. The resource name of the original discovered workload. |
| `↳ attributes` | `https://docs.cloud.google.com/php/docs/reference/cloud-apphub/latest/V1.Attributes` Optional. Consumer provided attributes. |
| `↳ create_time` | `Google\Protobuf\Timestamp` Output only. Create time. |
| `↳ update_time` | `Google\Protobuf\Timestamp` Output only. Update time. |
| `↳ uid` | `string` Output only. A universally unique identifier (UUID) for the `Workload` in the UUID4 format. |
| `↳ state` | `int` Output only. Workload state. |

### getName

Identifier. The resource name of the Workload. Format:
`"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"`

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

### setName

Identifier. The resource name of the Workload. Format:
`"projects/{host-project-id}/locations/{location}/applications/{application-id}/workloads/{workload-id}"`

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

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

### getDisplayName

Optional. User-defined name for the Workload.

Can have a maximum length of 63 characters.

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

### setDisplayName

Optional. User-defined name for the Workload.

Can have a maximum length of 63 characters.

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

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

### getDescription

Optional. User-defined description of a Workload.

Can have a maximum length of 2048 characters.

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

### setDescription

Optional. User-defined description of a Workload.

Can have a maximum length of 2048 characters.

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

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

### getWorkloadReference

Output only. Reference of an underlying compute resource represented by the
Workload. These are immutable.

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

### hasWorkloadReference

### clearWorkloadReference

### setWorkloadReference

Output only. Reference of an underlying compute resource represented by the
Workload. These are immutable.

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

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

### getWorkloadProperties

Output only. Properties of an underlying compute resource represented by
the Workload. These are immutable.

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

### hasWorkloadProperties

### clearWorkloadProperties

### setWorkloadProperties

Output only. Properties of an underlying compute resource represented by
the Workload. These are immutable.

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

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

### getDiscoveredWorkload

Required. Immutable. The resource name of the original discovered workload.

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

### setDiscoveredWorkload

Required. Immutable. The resource name of the original discovered workload.

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

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

### getAttributes

Optional. Consumer provided attributes.

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

### hasAttributes

### clearAttributes

### setAttributes

Optional. Consumer provided attributes.

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

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

### getCreateTime

Output only. Create time.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Create time.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getUpdateTime

Output only. Update time.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Update time.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getUid

Output only. A universally unique identifier (UUID) for the `Workload` in
the UUID4 format.

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

### setUid

Output only. A universally unique identifier (UUID) for the `Workload` in
the UUID4 format.

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

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

### getState

Output only. Workload state.

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

### setState

Output only. Workload state.

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

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