# Google Cloud Network Management V1 Client - Class ConnectivityTest (2.9.2)

2.9.2 (latest) 2.9.1 2.8.0 2.7.0 2.6.1 2.5.0 2.4.2 2.3.2 2.2.1 2.1.1 2.0.1 1.7.3 1.5.0 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 Management V1 Client class ConnectivityTest.

A Connectivity Test for a network reachability analysis.

Generated from protobuf message `google.cloud.networkmanagement.v1.ConnectivityTest`

## Namespace

Google \\ Cloud \\ NetworkManagement \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ name` | `string` Identifier. Unique name of the resource using the form: `projects/{project_id}/locations/global/connectivityTests/{test_id}` |
| `↳ description` | `string` The user-supplied description of the Connectivity Test. Maximum of 512 characters. |
| `↳ source` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-management/latest/V1.Endpoint` Required. Source specification of the Connectivity Test. You can use a combination of source IP address, URI of a supported endpoint, project ID, or VPC network to identify the source location. Reachability analysis might proceed even if the source location is ambiguous. However, the test result might include endpoints or use a source that you don't intend to test. |
| `↳ destination` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-management/latest/V1.Endpoint` Required. Destination specification of the Connectivity Test. You can use a combination of destination IP address, URI of a supported endpoint, project ID, or VPC network to identify the destination location. Reachability analysis proceeds even if the destination location is ambiguous. However, the test result might include endpoints or use a destination that you don't intend to test. |
| `↳ protocol` | `string` IP Protocol of the test. When not provided, "TCP" is assumed. |
| `↳ related_projects` | `string[]` Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries. |
| `↳ display_name` | `string` Output only. The display name of a Connectivity Test. |
| `↳ labels` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Resource labels to represent user-provided metadata. |
| `↳ create_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time the test was created. |
| `↳ update_time` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` Output only. The time the test's configuration was updated. |
| `↳ reachability_details` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-management/latest/V1.ReachabilityDetails` Output only. The reachability details of this test from the latest run. The details are updated when creating a new test, updating an existing test, or triggering a one-time rerun of an existing test. |
| `↳ probing_details` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-management/latest/V1.ProbingDetails` Output only. The probing details of this test from the latest run, present for applicable tests only. The details are updated when creating a new test, updating an existing test, or triggering a one-time rerun of an existing test. |
| `↳ round_trip` | `bool` Whether run analysis for the return path from destination to source. Default value is false. |
| `↳ return_reachability_details` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-management/latest/V1.ReachabilityDetails` Output only. The reachability details of this test from the latest run for the return path. The details are updated when creating a new test, updating an existing test, or triggering a one-time rerun of an existing test. |
| `↳ bypass_firewall_checks` | `bool` Whether the analysis should skip firewall checking. Default value is false. |

### getName

Identifier. Unique name of the resource using the form:
`projects/{project_id}/locations/global/connectivityTests/{test_id}`

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

### setName

Identifier. Unique name of the resource using the form:
`projects/{project_id}/locations/global/connectivityTests/{test_id}`

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

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

### getDescription

The user-supplied description of the Connectivity Test.

Maximum of 512 characters.

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

### setDescription

The user-supplied description of the Connectivity Test.

Maximum of 512 characters.

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

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

### getSource

Required. Source specification of the Connectivity Test.

You can use a combination of source IP address, URI of a supported
endpoint, project ID, or VPC network to identify the source location.
Reachability analysis might proceed even if the source location is
ambiguous. However, the test result might include endpoints or use a source
that you don't intend to test.

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

### hasSource

### clearSource

### setSource

Required. Source specification of the Connectivity Test.

You can use a combination of source IP address, URI of a supported
endpoint, project ID, or VPC network to identify the source location.
Reachability analysis might proceed even if the source location is
ambiguous. However, the test result might include endpoints or use a source
that you don't intend to test.

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

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

### getDestination

Required. Destination specification of the Connectivity Test.

You can use a combination of destination IP address, URI of a supported
endpoint, project ID, or VPC network to identify the destination location.
Reachability analysis proceeds even if the destination location is
ambiguous. However, the test result might include endpoints or use a
destination that you don't intend to test.

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

### hasDestination

### clearDestination

### setDestination

Required. Destination specification of the Connectivity Test.

You can use a combination of destination IP address, URI of a supported
endpoint, project ID, or VPC network to identify the destination location.
Reachability analysis proceeds even if the destination location is
ambiguous. However, the test result might include endpoints or use a
destination that you don't intend to test.

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

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

### getProtocol

IP Protocol of the test. When not provided, "TCP" is assumed.

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

### setProtocol

IP Protocol of the test. When not provided, "TCP" is assumed.

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

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

### getRelatedProjects

Other projects that may be relevant for reachability analysis.

This is applicable to scenarios where a test can cross project boundaries.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setRelatedProjects

Other projects that may be relevant for reachability analysis.

This is applicable to scenarios where a test can cross project boundaries.

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

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

### getDisplayName

Output only. The display name of a Connectivity Test.

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

### setDisplayName

Output only. The display name of a Connectivity Test.

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

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

### getLabels

Resource labels to represent user-provided metadata.

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

### setLabels

Resource labels to represent user-provided metadata.

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

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

### getCreateTime

Output only. The time the test was created.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

Output only. The time the test was created.

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

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

### getUpdateTime

Output only. The time the test's configuration was updated.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

Output only. The time the test's configuration was updated.

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

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

### getReachabilityDetails

Output only. The reachability details of this test from the latest run.

The details are updated when creating a new test, updating an
existing test, or triggering a one-time rerun of an existing test.

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

### hasReachabilityDetails

### clearReachabilityDetails

### setReachabilityDetails

Output only. The reachability details of this test from the latest run.

The details are updated when creating a new test, updating an
existing test, or triggering a one-time rerun of an existing test.

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

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

### getProbingDetails

Output only. The probing details of this test from the latest run, present
for applicable tests only. The details are updated when creating a new
test, updating an existing test, or triggering a one-time rerun of an
existing test.

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

### hasProbingDetails

### clearProbingDetails

### setProbingDetails

Output only. The probing details of this test from the latest run, present
for applicable tests only. The details are updated when creating a new
test, updating an existing test, or triggering a one-time rerun of an
existing test.

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

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

### getRoundTrip

Whether run analysis for the return path from destination to source.

Default value is false.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setRoundTrip

Whether run analysis for the return path from destination to source.

Default value is false.

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

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

### getReturnReachabilityDetails

Output only. The reachability details of this test from the latest run for
the return path. The details are updated when creating a new test,
updating an existing test, or triggering a one-time rerun of an existing
test.

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

### hasReturnReachabilityDetails

### clearReturnReachabilityDetails

### setReturnReachabilityDetails

Output only. The reachability details of this test from the latest run for
the return path. The details are updated when creating a new test,
updating an existing test, or triggering a one-time rerun of an existing
test.

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

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

### getBypassFirewallChecks

Whether the analysis should skip firewall checking. Default value is false.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setBypassFirewallChecks

Whether the analysis should skip firewall checking. Default value is false.

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

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