# Google Cloud Network Connectivity V1 Client - Class ServiceConnectionMap (2.5.3)

2.5.3 (latest) 2.5.2 2.4.0 2.3.0 2.2.2 2.1.2 2.0.2 1.5.5 1.4.2 1.3.0 1.2.0 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud Network Connectivity V1 Client class ServiceConnectionMap.

The ServiceConnectionMap resource.

Generated from protobuf message `google.cloud.networkconnectivity.v1.ServiceConnectionMap`

## Namespace

Google \\ Cloud \\ NetworkConnectivity \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Immutable. The name of a ServiceConnectionMap. Format: projects/{project}/locations/{location}/serviceConnectionMaps/{service_connection_map} See: <https://google.aip.dev/122#fields-representing-resource-names> |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Time when the ServiceConnectionMap was created. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. Time when the ServiceConnectionMap was updated. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` User-defined labels. |
| `↳ description` | `string` A description of this resource. |
| `↳ service_class` | `string` The service class identifier this ServiceConnectionMap is for. The user of ServiceConnectionMap create API needs to have networkconnecitivty.serviceclasses.use iam permission for the service class. |
| `↳ service_class_uri` | `string` Output only. The service class uri this ServiceConnectionMap is for. |
| `↳ infrastructure` | `int` Output only. The infrastructure used for connections between consumers/producers. |
| `↳ producer_psc_configs` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-connectivity/latest/V1.ServiceConnectionMap.ProducerPscConfig>` The PSC configurations on producer side. |
| `↳ consumer_psc_configs` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-connectivity/latest/V1.ServiceConnectionMap.ConsumerPscConfig>` The PSC configurations on consumer side. |
| `↳ consumer_psc_connections` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-connectivity/latest/V1.ServiceConnectionMap.ConsumerPscConnection>` Output only. PSC connection details on consumer side. |
| `↳ token` | `string` The token provided by the consumer. This token authenticates that the consumer can create a connection within the specified project and network. |
| `↳ etag` | `string` Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |

### getName

Immutable. The name of a ServiceConnectionMap.

Format:
projects/{project}/locations/{location}/serviceConnectionMaps/{service_connection_map}
See: <https://google.aip.dev/122#fields-representing-resource-names>

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

### setName

Immutable. The name of a ServiceConnectionMap.

Format:
projects/{project}/locations/{location}/serviceConnectionMaps/{service_connection_map}
See: <https://google.aip.dev/122#fields-representing-resource-names>

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

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

### getCreateTime

Output only. Time when the ServiceConnectionMap was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. Time when the ServiceConnectionMap was created.

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

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

### getUpdateTime

Output only. Time when the ServiceConnectionMap was updated.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. Time when the ServiceConnectionMap was updated.

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

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

### getLabels

User-defined labels.

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

### setLabels

User-defined labels.

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

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

### getDescription

A description of this resource.

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

### setDescription

A description of this resource.

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

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

### getServiceClass

The service class identifier this ServiceConnectionMap is for.

The user of ServiceConnectionMap create API needs to have
networkconnecitivty.serviceclasses.use iam permission for the service
class.

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

### setServiceClass

The service class identifier this ServiceConnectionMap is for.

The user of ServiceConnectionMap create API needs to have
networkconnecitivty.serviceclasses.use iam permission for the service
class.

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

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

### getServiceClassUri

Output only. The service class uri this ServiceConnectionMap is for.

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

### setServiceClassUri

Output only. The service class uri this ServiceConnectionMap is for.

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

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

### getInfrastructure

Output only. The infrastructure used for connections between
consumers/producers.

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

### setInfrastructure

Output only. The infrastructure used for connections between
consumers/producers.

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

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

### getProducerPscConfigs

The PSC configurations on producer side.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-network-connectivity/latest/V1.ServiceConnectionMap.ProducerPscConfig>` |   |

### setProducerPscConfigs

The PSC configurations on producer side.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-connectivity/latest/V1.ServiceConnectionMap.ProducerPscConfig>` |

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

### getConsumerPscConfigs

The PSC configurations on consumer side.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-network-connectivity/latest/V1.ServiceConnectionMap.ConsumerPscConfig>` |   |

### setConsumerPscConfigs

The PSC configurations on consumer side.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-connectivity/latest/V1.ServiceConnectionMap.ConsumerPscConfig>` |

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

### getConsumerPscConnections

Output only. PSC connection details on consumer side.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-network-connectivity/latest/V1.ServiceConnectionMap.ConsumerPscConnection>` |   |

### setConsumerPscConnections

Output only. PSC connection details on consumer side.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-network-connectivity/latest/V1.ServiceConnectionMap.ConsumerPscConnection>` |

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

### getToken

The token provided by the consumer. This token authenticates that the
consumer can create a connection within the specified project and network.

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

### setToken

The token provided by the consumer. This token authenticates that the
consumer can create a connection within the specified project and network.

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

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

### getEtag

Optional. The etag is computed by the server, and may be sent on update and
delete requests to ensure the client has an up-to-date value before
proceeding.

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

### hasEtag

### clearEtag

### setEtag

Optional. The etag is computed by the server, and may be sent on update and
delete requests to ensure the client has an up-to-date value before
proceeding.

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

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