# Google Cloud Network Security V1 Client - Class CreateDnsThreatDetectorRequest (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 CreateDnsThreatDetectorRequest.

The message to create a DnsThreatDetector.

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

## Namespace

Google \\ Cloud \\ NetworkSecurity \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The value for the parent of the DnsThreatDetector resource. |
| `↳ dns_threat_detector_id` | `string` Optional. The ID of the requesting DnsThreatDetector object. If this field is not supplied, the service generates an identifier. |
| `↳ dns_threat_detector` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.DnsThreatDetector` Required. The `DnsThreatDetector` resource to create. |

### getParent

Required. The value for the parent of the DnsThreatDetector resource.

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

### setParent

Required. The value for the parent of the DnsThreatDetector resource.

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

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

### getDnsThreatDetectorId

Optional. The ID of the requesting DnsThreatDetector object.

If this field is not supplied, the service generates an identifier.

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

### setDnsThreatDetectorId

Optional. The ID of the requesting DnsThreatDetector object.

If this field is not supplied, the service generates an identifier.

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

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

### getDnsThreatDetector

Required. The `DnsThreatDetector` resource to create.

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

### hasDnsThreatDetector

### clearDnsThreatDetector

### setDnsThreatDetector

Required. The `DnsThreatDetector` resource to create.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The value for the parent of the DnsThreatDetector resource. Please see DnsThreatDetectorServiceClient::locationName() for help formatting this field. |
| `dnsThreatDetector` | `https://docs.cloud.google.com/php/docs/reference/cloud-network-security/latest/V1.DnsThreatDetector` Required. The `DnsThreatDetector` resource to create. |
| `dnsThreatDetectorId` | `string` Optional. The ID of the requesting DnsThreatDetector object. If this field is not supplied, the service generates an identifier. |

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