# Google API Common Protos Client - Class Control (4.14.0)

4.14.0 (latest) 4.13.0 4.12.5 4.11.0 4.10.0 4.9.0 4.8.3 Reference documentation and code samples for the Google API Common Protos Client class Control.

Selects and configures the service controller used by the service.

Example:
control:
environment: servicecontrol.googleapis.com

Generated from protobuf message `google.api.Control`

## Namespace

Google \\ Api

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ environment` | `string` The service controller environment to use. If empty, no control plane features (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com. |
| `↳ method_policies` | `array<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.MethodPolicy>` Defines policies applying to the API methods of the service. |

### getEnvironment

The service controller environment to use. If empty, no control plane
features (like quota and billing) will be enabled. The recommended value
for most services is servicecontrol.googleapis.com.

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

### setEnvironment

The service controller environment to use. If empty, no control plane
features (like quota and billing) will be enabled. The recommended value
for most services is servicecontrol.googleapis.com.

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

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

### getMethodPolicies

Defines policies applying to the API methods of the service.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.MethodPolicy>` |   |

### setMethodPolicies

Defines policies applying to the API methods of the service.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.MethodPolicy>` |

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