# Google Cloud Service Usage V1 Client - Class BatchGetServicesRequest (2.2.0)

2.2.0 (latest) 2.1.2 2.0.4 1.3.4 1.2.3 1.1.1 1.0.5 Reference documentation and code samples for the Google Cloud Service Usage V1 Client class BatchGetServicesRequest.

Request message for the `BatchGetServices` method.

Generated from protobuf message `google.api.serviceusage.v1.BatchGetServicesRequest`

## Namespace

Google \\ Cloud \\ ServiceUsage \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Parent to retrieve services from. If this is set, the parent of all of the services specified in `names` must match this field. An example name would be: `projects/123` where `123` is the project number. The `BatchGetServices` method currently only supports projects. |
| `↳ names` | `string[]` Names of the services to retrieve. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number. A single request can get a maximum of 30 services at a time. |

### getParent

Parent to retrieve services from.

If this is set, the parent of all of the services specified in `names` must
match this field. An example name would be: `projects/123` where `123` is
the project number. The `BatchGetServices` method currently only supports
projects.

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

### setParent

Parent to retrieve services from.

If this is set, the parent of all of the services specified in `names` must
match this field. An example name would be: `projects/123` where `123` is
the project number. The `BatchGetServices` method currently only supports
projects.

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

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

### getNames

Names of the services to retrieve.

An example name would be:
`projects/123/services/serviceusage.googleapis.com` where `123` is the
project number.
A single request can get a maximum of 30 services at a time.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<string>` |   |

### setNames

Names of the services to retrieve.

An example name would be:
`projects/123/services/serviceusage.googleapis.com` where `123` is the
project number.
A single request can get a maximum of 30 services at a time.

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

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