# Google Cloud Managed Kafka V1 Client - Class CreateConnectorRequest (0.8.0)

0.8.0 (latest) 0.7.2 0.6.1 0.5.0 0.4.1 0.3.1 0.2.3 0.1.3 Reference documentation and code samples for the Google Cloud Managed Kafka V1 Client class CreateConnectorRequest.

Request for CreateConnector.

Generated from protobuf message `google.cloud.managedkafka.v1.CreateConnectorRequest`

## Namespace

Google \\ Cloud \\ ManagedKafka \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The parent Connect cluster in which to create the connector. Structured like `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. |
| `↳ connector_id` | `string` Required. The ID to use for the connector, which will become the final component of the connector's name. The ID must be 1-63 characters long, and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with RFC 1035. This value is structured like: `my-connector-id`. |
| `↳ connector` | `https://docs.cloud.google.com/php/docs/reference/cloud-managedkafka/latest/V1.Connector` Required. The connector to create. |

### getParent

Required. The parent Connect cluster in which to create the connector.

Structured like
`projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`.

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

### setParent

Required. The parent Connect cluster in which to create the connector.

Structured like
`projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`.

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

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

### getConnectorId

Required. The ID to use for the connector, which will become the final
component of the connector's name. The ID must be 1-63 characters long, and
match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with
RFC 1035.

This value is structured like: `my-connector-id`.

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

### setConnectorId

Required. The ID to use for the connector, which will become the final
component of the connector's name. The ID must be 1-63 characters long, and
match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with
RFC 1035.

This value is structured like: `my-connector-id`.

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

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

### getConnector

Required. The connector to create.

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

### hasConnector

### clearConnector

### setConnector

Required. The connector to create.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The parent Connect cluster in which to create the connector. Structured like `projects/{project}/locations/{location}/connectClusters/{connect_cluster_id}`. Please see ManagedKafkaConnectClient::connectClusterName() for help formatting this field. |
| `connector` | `https://docs.cloud.google.com/php/docs/reference/cloud-managedkafka/latest/V1.Connector` Required. The connector to create. |
| `connectorId` | `string` Required. The ID to use for the connector, which will become the final component of the connector's name. The ID must be 1-63 characters long, and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` to comply with RFC 1035. This value is structured like: `my-connector-id`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-managedkafka/latest/V1.CreateConnectorRequest` |   |