0.5.3 (latest) 0.4.4 0.3.0 0.2.1 0.1.4 Reference documentation and code samples for the Google Cloud Api Hub V1 Client class CollectApiDataRequest.

The CollectApiData method's request.

Generated from protobuf message `google.cloud.apihub.v1.CollectApiDataRequest`

## Namespace

Google \\ Cloud \\ ApiHub \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ location` | `string` Required. The regional location of the API hub instance and its resources. Format: `projects/{project}/locations/{location}` |
| `↳ collection_type` | `int` Required. The type of collection. Applies to all entries in [api_data](https://docs.cloud.google.com/php/docs/reference/cloud-apihub/latest/V1.CollectApiDataRequest#_Google_Cloud_ApiHub_V1_CollectApiDataRequest__getApiData__). |
| `↳ plugin_instance` | `string` Required. The plugin instance collecting the API data. Format: `projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`. |
| `↳ action_id` | `string` Required. The action ID to be used for collecting the API data. This should map to one of the action IDs specified in action configs in the plugin. |
| `↳ api_data` | `https://docs.cloud.google.com/php/docs/reference/cloud-apihub/latest/V1.ApiData` Required. The API data to be collected. |

### getLocation

Required. The regional location of the API hub instance and its resources.

Format: `projects/{project}/locations/{location}`

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

### setLocation

Required. The regional location of the API hub instance and its resources.

Format: `projects/{project}/locations/{location}`

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

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

### getCollectionType

Required. The type of collection. Applies to all entries in
[api_data](https://docs.cloud.google.com/php/docs/reference/cloud-apihub/latest/V1.CollectApiDataRequest#_Google_Cloud_ApiHub_V1_CollectApiDataRequest__getApiData__).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [CollectionType](https://docs.cloud.google.com/php/docs/reference/cloud-apihub/latest/V1.CollectionType). |

### setCollectionType

Required. The type of collection. Applies to all entries in
[api_data](https://docs.cloud.google.com/php/docs/reference/cloud-apihub/latest/V1.CollectApiDataRequest#_Google_Cloud_ApiHub_V1_CollectApiDataRequest__getApiData__).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [CollectionType](https://docs.cloud.google.com/php/docs/reference/cloud-apihub/latest/V1.CollectionType). |

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

### getPluginInstance

Required. The plugin instance collecting the API data.

Format:
`projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.

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

### setPluginInstance

Required. The plugin instance collecting the API data.

Format:
`projects/{project}/locations/{location}/plugins/{plugin}/instances/{instance}`.

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

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

### getActionId

Required. The action ID to be used for collecting the API data.

This should map to one of the action IDs specified
in action configs in the plugin.

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

### setActionId

Required. The action ID to be used for collecting the API data.

This should map to one of the action IDs specified
in action configs in the plugin.

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

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

### getApiData

Required. The API data to be collected.

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

### hasApiData

### clearApiData

### setApiData

Required. The API data to be collected.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `location` | `string` Required. The regional location of the API hub instance and its resources. Format: `projects/{project}/locations/{location}` Please see ApiHubCollectClient::locationName() for help formatting this field. |
| `collectionType` | `int` Required. The type of collection. Applies to all entries in [api_data](https://docs.cloud.google.com/php/docs/reference/cloud-apihub/latest/V1.CollectApiDataRequest#_Google_Cloud_ApiHub_V1_CollectApiDataRequest__getApiData__). For allowed values, use constants defined on [CollectionType](https://docs.cloud.google.com/php/docs/reference/cloud-apihub/latest/V1.CollectionType) |
| `apiData` | `https://docs.cloud.google.com/php/docs/reference/cloud-apihub/latest/V1.ApiData` Required. The API data to be collected. |

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