# Google Cloud Storage Transfer V1 Client - Class CreateAgentPoolRequest (2.4.0)

2.4.0 (latest) 2.3.2 2.2.1 2.1.1 2.0.2 1.5.0 1.4.5 1.3.1 1.2.0 1.1.1 1.0.6 Reference documentation and code samples for the Google Cloud Storage Transfer V1 Client class CreateAgentPoolRequest.

Specifies the request passed to CreateAgentPool.

Generated from protobuf message `google.storagetransfer.v1.CreateAgentPoolRequest`

## Namespace

Google \\ Cloud \\ StorageTransfer \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ project_id` | `string` Required. The ID of the Google Cloud project that owns the agent pool. |
| `↳ agent_pool` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.AgentPool` Required. The agent pool to create. |
| `↳ agent_pool_id` | `string` Required. The ID of the agent pool to create. The `agent_pool_id` must meet the following requirements: \* \* Length of 128 characters or less. \* \* Not start with the string `goog`. \* \* Start with a lowercase ASCII character, followed by: \* \* Zero or more: lowercase Latin alphabet characters, numerals, hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). \* \* One or more numerals or lowercase ASCII characters. As expressed by the regular expression: `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`. |

### getProjectId

Required. The ID of the Google Cloud project that owns the
agent pool.

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

### setProjectId

Required. The ID of the Google Cloud project that owns the
agent pool.

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

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

### getAgentPool

Required. The agent pool to create.

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

### hasAgentPool

### clearAgentPool

### setAgentPool

Required. The agent pool to create.

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

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

### getAgentPoolId

Required. The ID of the agent pool to create.

The `agent_pool_id` must meet the following requirements:

- Length of 128 characters or less.
- Not start with the string `goog`.
- Start with a lowercase ASCII character, followed by:
  - Zero or more: lowercase Latin alphabet characters, numerals, hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`).
  - One or more numerals or lowercase ASCII characters. As expressed by the regular expression: `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`.

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

### setAgentPoolId

Required. The ID of the agent pool to create.

The `agent_pool_id` must meet the following requirements:

- Length of 128 characters or less.
- Not start with the string `goog`.
- Start with a lowercase ASCII character, followed by:
  - Zero or more: lowercase Latin alphabet characters, numerals, hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`).
  - One or more numerals or lowercase ASCII characters. As expressed by the regular expression: `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `projectId` | `string` Required. The ID of the Google Cloud project that owns the agent pool. |
| `agentPool` | `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.AgentPool` Required. The agent pool to create. |
| `agentPoolId` | `string` Required. The ID of the agent pool to create. The `agent_pool_id` must meet the following requirements: - - Length of 128 characters or less. - - Not start with the string `goog`. - - Start with a lowercase ASCII character, followed by: - - Zero or more: lowercase Latin alphabet characters, numerals, hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). - - One or more numerals or lowercase ASCII characters. As expressed by the regular expression: `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-storage-transfer/latest/V1.CreateAgentPoolRequest` |   |