# Data Loss Prevention V2 Client - Class DiscoveryTarget (2.13.0)

2.13.0 (latest) 2.12.0 2.11.0 2.10.0 2.9.2 2.8.1 2.7.0 2.6.1 2.4.1 2.3.0 2.2.3 2.1.0 2.0.0 1.19.0 1.18.0 1.17.0 1.16.0 1.15.1 1.14.0 1.13.2 1.12.0 1.11.0 1.10.2 1.9.0 1.8.6 Reference documentation and code samples for the Data Loss Prevention V2 Client class DiscoveryTarget.

Target used to match against for Discovery.

Generated from protobuf message `google.privacy.dlp.v2.DiscoveryTarget`

## Namespace

Google \\ Cloud \\ Dlp \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ big_query_target` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.BigQueryDiscoveryTarget` BigQuery target for Discovery. The first target to match a table will be the one applied. |
| `↳ cloud_sql_target` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.CloudSqlDiscoveryTarget` Cloud SQL target for Discovery. The first target to match a table will be the one applied. |
| `↳ secrets_target` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.SecretsDiscoveryTarget` Discovery target that looks for credentials and secrets stored in cloud resource metadata and reports them as vulnerabilities to Security Command Center. Only one target of this type is allowed. |
| `↳ cloud_storage_target` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.CloudStorageDiscoveryTarget` Cloud Storage target for Discovery. The first target to match a table will be the one applied. |
| `↳ other_cloud_target` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.OtherCloudDiscoveryTarget` Other clouds target for discovery. The first target to match a resource will be the one applied. |
| `↳ vertex_dataset_target` | `https://docs.cloud.google.com/php/docs/reference/cloud-dlp/latest/V2.VertexDatasetDiscoveryTarget` Vertex AI dataset target for Discovery. The first target to match a dataset will be the one applied. Note that discovery for Vertex AI can incur Cloud Storage Class B operation charges for storage.objects.get operations and retrieval fees. For more information, see [Cloud Storage pricing](https://cloud.google.com/storage/pricing#price-tables). Note that discovery for Vertex AI dataset will not be able to scan images unless DiscoveryConfig.processing_location.image_fallback_location has multi_region_processing or global_processing configured. |

### getBigQueryTarget

BigQuery target for Discovery. The first target to match a table will be
the one applied.

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

### hasBigQueryTarget

### setBigQueryTarget

BigQuery target for Discovery. The first target to match a table will be
the one applied.

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

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

### getCloudSqlTarget

Cloud SQL target for Discovery. The first target to match a table will be
the one applied.

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

### hasCloudSqlTarget

### setCloudSqlTarget

Cloud SQL target for Discovery. The first target to match a table will be
the one applied.

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

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

### getSecretsTarget

Discovery target that looks for credentials and secrets stored in cloud
resource metadata and reports them as vulnerabilities to Security Command
Center. Only one target of this type is allowed.

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

### hasSecretsTarget

### setSecretsTarget

Discovery target that looks for credentials and secrets stored in cloud
resource metadata and reports them as vulnerabilities to Security Command
Center. Only one target of this type is allowed.

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

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

### getCloudStorageTarget

Cloud Storage target for Discovery. The first target to match a table
will be the one applied.

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

### hasCloudStorageTarget

### setCloudStorageTarget

Cloud Storage target for Discovery. The first target to match a table
will be the one applied.

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

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

### getOtherCloudTarget

Other clouds target for discovery. The first target to match a resource
will be the one applied.

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

### hasOtherCloudTarget

### setOtherCloudTarget

Other clouds target for discovery. The first target to match a resource
will be the one applied.

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

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

### getVertexDatasetTarget

Vertex AI dataset target for Discovery. The first target to match a
dataset will be the one applied. Note that discovery for Vertex AI can
incur Cloud Storage Class B operation charges for storage.objects.get
operations and retrieval fees. For more information, see [Cloud Storage
pricing](https://cloud.google.com/storage/pricing#price-tables).

Note that discovery for Vertex AI dataset will not be able to scan images
unless DiscoveryConfig.processing_location.image_fallback_location has
multi_region_processing or global_processing configured.

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

### hasVertexDatasetTarget

### setVertexDatasetTarget

Vertex AI dataset target for Discovery. The first target to match a
dataset will be the one applied. Note that discovery for Vertex AI can
incur Cloud Storage Class B operation charges for storage.objects.get
operations and retrieval fees. For more information, see [Cloud Storage
pricing](https://cloud.google.com/storage/pricing#price-tables).

Note that discovery for Vertex AI dataset will not be able to scan images
unless DiscoveryConfig.processing_location.image_fallback_location has
multi_region_processing or global_processing configured.

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

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

### getTarget

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