# Google Cloud Network Services V1 Client - Class ServiceBinding (0.8.2)

0.8.2 (latest) 0.8.1 0.7.1 0.6.1 0.5.0 0.4.0 0.3.0 0.2.3 0.1.1 Reference documentation and code samples for the Google Cloud Network Services V1 Client class ServiceBinding.

ServiceBinding can be used to:

- Bind a Service Directory Service to be used in a BackendService resource.

This feature will be deprecated soon.

- Bind a Private Service Connect producer service to be used in consumer Cloud Service Mesh or Application Load Balancers.
- Bind a Cloud Run service to be used in consumer Cloud Service Mesh or Application Load Balancers.

Generated from protobuf message `google.cloud.networkservices.v1.ServiceBinding`

## Namespace

Google \\ Cloud \\ NetworkServices \\ V1

## Methods

### __construct

Constructor.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `data` | `mixed` |

### getName

Identifier. Name of the ServiceBinding resource. It matches pattern
`projects/*/locations/*/serviceBindings/<service_binding_name>`.

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

### setName

Identifier. Name of the ServiceBinding resource. It matches pattern
`projects/*/locations/*/serviceBindings/<service_binding_name>`.

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

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

### getDescription

Optional. A free-text description of the resource. Max length 1024
characters.

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

### setDescription

Optional. A free-text description of the resource. Max length 1024
characters.

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

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

### getCreateTime

Output only. The timestamp when the resource was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The timestamp when the resource was created.

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

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

### getUpdateTime

Output only. The timestamp when the resource was updated.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The timestamp when the resource was updated.

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

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

### getService

Optional. The full Service Directory Service name of the format
`projects/*/locations/*/namespaces/*/services/*`.

This field is for Service Directory integration which will be deprecated
soon.

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

### setService

Optional. The full Service Directory Service name of the format
`projects/*/locations/*/namespaces/*/services/*`.

This field is for Service Directory integration which will be deprecated
soon.

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

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

### getServiceId

Output only. The unique identifier of the Service Directory Service against
which the ServiceBinding resource is validated. This is populated when the
Service Binding resource is used in another resource (like Backend
Service). This is of the UUID4 format. This field is for Service Directory
integration which will be deprecated soon.

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

### setServiceId

Output only. The unique identifier of the Service Directory Service against
which the ServiceBinding resource is validated. This is populated when the
Service Binding resource is used in another resource (like Backend
Service). This is of the UUID4 format. This field is for Service Directory
integration which will be deprecated soon.

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

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

### getLabels

Optional. Set of label tags associated with the ServiceBinding resource.

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

### setLabels

Optional. Set of label tags associated with the ServiceBinding resource.

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

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