# Google Cloud Network Security V1 Client - Class SACAttachment (1.4.0)

1.4.0 (latest) 1.3.0 1.2.3 1.1.0 1.0.4 0.6.5 0.5.2 0.4.1 0.3.7 Reference documentation and code samples for the Google Cloud Network Security V1 Client class SACAttachment.

Represents a Secure Access Connect (SAC) attachment resource.

A Secure Access Connect attachment enables NCC Gateway to process traffic
with an SSE product.

Generated from protobuf message `google.cloud.networksecurity.v1.SACAttachment`

## Namespace

Google \\ Cloud \\ NetworkSecurity \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. Resource name, in the form `projects/{project}/locations/{location}/sacAttachments/{sac_attachment}`. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Timestamp when the attachment was created. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Timestamp when the attachment was last updated. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Optional list of labels applied to the resource. |
| `↳ sac_realm` | `string` Required. SAC Realm which owns the attachment. This can be input as an ID or a full resource name. The output always has the form `projects/{project_number}/locations/{location}/sacRealms/{sac_realm}`. |
| `↳ ncc_gateway` | `string` Required. NCC Gateway associated with the attachment. This can be input as an ID or a full resource name. The output always has the form `projects/{project_number}/locations/{location}/spokes/{ncc_gateway}`. |
| `↳ state` | `int` Output only. State of the attachment. |

### getName

Identifier. Resource name, in the form
`projects/{project}/locations/{location}/sacAttachments/{sac_attachment}`.

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

### setName

Identifier. Resource name, in the form
`projects/{project}/locations/{location}/sacAttachments/{sac_attachment}`.

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

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

### getCreateTime

Output only. Timestamp when the attachment was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Timestamp when the attachment was created.

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

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

### getUpdateTime

Output only. Timestamp when the attachment was last updated.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Timestamp when the attachment was last updated.

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

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

### getLabels

Optional. Optional list of labels applied to the resource.

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

### setLabels

Optional. Optional list of labels applied to the resource.

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

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

### getSacRealm

Required. SAC Realm which owns the attachment. This can be input as an ID
or a full resource name. The output always has the form
`projects/{project_number}/locations/{location}/sacRealms/{sac_realm}`.

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

### setSacRealm

Required. SAC Realm which owns the attachment. This can be input as an ID
or a full resource name. The output always has the form
`projects/{project_number}/locations/{location}/sacRealms/{sac_realm}`.

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

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

### getNccGateway

Required. NCC Gateway associated with the attachment. This can be input as
an ID or a full resource name. The output always has the form
`projects/{project_number}/locations/{location}/spokes/{ncc_gateway}`.

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

### setNccGateway

Required. NCC Gateway associated with the attachment. This can be input as
an ID or a full resource name. The output always has the form
`projects/{project_number}/locations/{location}/spokes/{ncc_gateway}`.

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

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

### getState

Output only. State of the attachment.

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

### setState

Output only. State of the attachment.

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

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