# Stackdriver Logging V2 Client - Class Link (2.1.0)

2.1.0 (latest) 2.0.0 1.34.5 1.33.0 1.32.3 1.31.3 1.30.3 1.29.0 1.28.5 1.27.1 1.26.0 1.25.5 1.24.10 Reference documentation and code samples for the Stackdriver Logging V2 Client class Link.

Describes a link connected to an analytics enabled bucket.

Generated from protobuf message `google.logging.v2.Link`

## Namespace

Google \\ Cloud \\ Logging \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` The resource name of the link. The name can have up to 100 characters. A valid link id (at the end of the link name) must only have alphanumeric characters and underscores within it. "projects/\[PROJECT_ID\]/locations/\[LOCATION_ID\]/buckets/\[BUCKET_ID\]/links/\[LINK_ID\]" "organizations/\[ORGANIZATION_ID\]/locations/\[LOCATION_ID\]/buckets/\[BUCKET_ID\]/links/\[LINK_ID\]" "billingAccounts/\[BILLING_ACCOUNT_ID\]/locations/\[LOCATION_ID\]/buckets/\[BUCKET_ID\]/links/\[LINK_ID\]" "folders/\[FOLDER_ID\]/locations/\[LOCATION_ID\]/buckets/\[BUCKET_ID\]/links/\[LINK_ID\]" For example: \`projects/my-project/locations/global/buckets/my-bucket/links/my_link |
| `↳ description` | `string` Describes this link. The maximum length of the description is 8000 characters. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The creation timestamp of the link. |
| `↳ lifecycle_state` | `int` Output only. The resource lifecycle state. |
| `↳ bigquery_dataset` | `https://docs.cloud.google.com/php/docs/reference/cloud-logging/latest/V2.BigQueryDataset` The information of a BigQuery Dataset. When a link is created, a BigQuery dataset is created along with it, in the same project as the LogBucket it's linked to. This dataset will also have BigQuery Views corresponding to the LogViews in the bucket. |

### getName

The resource name of the link. The name can have up to 100 characters.

A valid link id (at the end of the link name) must only have alphanumeric
characters and underscores within it.
"projects/\[PROJECT_ID\]/locations/\[LOCATION_ID\]/buckets/\[BUCKET_ID\]/links/\[LINK_ID\]"
"organizations/\[ORGANIZATION_ID\]/locations/\[LOCATION_ID\]/buckets/\[BUCKET_ID\]/links/\[LINK_ID\]"
"billingAccounts/\[BILLING_ACCOUNT_ID\]/locations/\[LOCATION_ID\]/buckets/\[BUCKET_ID\]/links/\[LINK_ID\]"
"folders/\[FOLDER_ID\]/locations/\[LOCATION_ID\]/buckets/\[BUCKET_ID\]/links/\[LINK_ID\]"
For example:
\`projects/my-project/locations/global/buckets/my-bucket/links/my_link

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

### setName

The resource name of the link. The name can have up to 100 characters.

A valid link id (at the end of the link name) must only have alphanumeric
characters and underscores within it.
"projects/\[PROJECT_ID\]/locations/\[LOCATION_ID\]/buckets/\[BUCKET_ID\]/links/\[LINK_ID\]"
"organizations/\[ORGANIZATION_ID\]/locations/\[LOCATION_ID\]/buckets/\[BUCKET_ID\]/links/\[LINK_ID\]"
"billingAccounts/\[BILLING_ACCOUNT_ID\]/locations/\[LOCATION_ID\]/buckets/\[BUCKET_ID\]/links/\[LINK_ID\]"
"folders/\[FOLDER_ID\]/locations/\[LOCATION_ID\]/buckets/\[BUCKET_ID\]/links/\[LINK_ID\]"
For example:
\`projects/my-project/locations/global/buckets/my-bucket/links/my_link

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

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

### getDescription

Describes this link.

The maximum length of the description is 8000 characters.

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

### setDescription

Describes this link.

The maximum length of the description is 8000 characters.

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

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

### getCreateTime

Output only. The creation timestamp of the link.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The creation timestamp of the link.

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

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

### getLifecycleState

Output only. The resource lifecycle state.

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

### setLifecycleState

Output only. The resource lifecycle state.

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

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

### getBigqueryDataset

The information of a BigQuery Dataset. When a link is created, a BigQuery
dataset is created along with it, in the same project as the LogBucket it's
linked to. This dataset will also have BigQuery Views corresponding to the
LogViews in the bucket.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-logging/latest/V2.BigQueryDataset|null` |   |

### hasBigqueryDataset

### clearBigqueryDataset

### setBigqueryDataset

The information of a BigQuery Dataset. When a link is created, a BigQuery
dataset is created along with it, in the same project as the LogBucket it's
linked to. This dataset will also have BigQuery Views corresponding to the
LogViews in the bucket.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-logging/latest/V2.BigQueryDataset` |

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