# Google API Common Protos Client - Class MethodSettings (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 MethodSettings.

Describes the generator configuration for a method.

Generated from protobuf message `google.api.MethodSettings`

## Namespace

Google \\ Api

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ selector` | `string` The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options. Example: publishing: method_settings: - selector: google.storage.control.v2.StorageControl.CreateFolder # method settings for CreateFolder... |
| `↳ long_running` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.MethodSettings.LongRunning` Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_settings: - selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes |
| `↳ auto_populated_fields` | `string[]` List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.CreateExample auto_populated_fields: - request_id |
| `↳ batching` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.BatchingConfigProto` Batching configuration for an API method in client libraries. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.BatchCreateExample batching: element_count_threshold: 1000 request_byte_threshold: 100000000 delay_threshold_millis: 10 |

### getSelector

The fully qualified name of the method, for which the options below apply.

This is used to find the method to apply the options.
Example:
publishing:
method_settings:

- selector: google.storage.control.v2.StorageControl.CreateFolder # method settings for CreateFolder...

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

### setSelector

The fully qualified name of the method, for which the options below apply.

This is used to find the method to apply the options.
Example:
publishing:
method_settings:

- selector: google.storage.control.v2.StorageControl.CreateFolder # method settings for CreateFolder...

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

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

### getLongRunning

Describes settings to use for long-running operations when generating
API methods for RPCs. Complements RPCs that use the annotations in
google/longrunning/operations.proto.

Example of a YAML configuration::
publishing:
method_settings:

- selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.MethodSettings.LongRunning|null` |   |

### hasLongRunning

### clearLongRunning

### setLongRunning

Describes settings to use for long-running operations when generating
API methods for RPCs. Complements RPCs that use the annotations in
google/longrunning/operations.proto.

Example of a YAML configuration::
publishing:
method_settings:

- selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.MethodSettings.LongRunning` |

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

### getAutoPopulatedFields

List of top-level fields of the request message, that should be
automatically populated by the client libraries based on their
(google.api.field_info).format. Currently supported format: UUID4.

Example of a YAML configuration:
publishing:
method_settings:

- selector: google.example.v1.ExampleService.CreateExample auto_populated_fields:
  - request_id

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

### setAutoPopulatedFields

List of top-level fields of the request message, that should be
automatically populated by the client libraries based on their
(google.api.field_info).format. Currently supported format: UUID4.

Example of a YAML configuration:
publishing:
method_settings:

- selector: google.example.v1.ExampleService.CreateExample auto_populated_fields:
  - request_id

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

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

### getBatching

Batching configuration for an API method in client libraries.

Example of a YAML configuration:
publishing:
method_settings:

- selector: google.example.v1.ExampleService.BatchCreateExample batching: element_count_threshold: 1000 request_byte_threshold: 100000000 delay_threshold_millis: 10

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Api.BatchingConfigProto|null` |   |

### hasBatching

### clearBatching

### setBatching

Batching configuration for an API method in client libraries.

Example of a YAML configuration:
publishing:
method_settings:

- selector: google.example.v1.ExampleService.BatchCreateExample batching: element_count_threshold: 1000 request_byte_threshold: 100000000 delay_threshold_millis: 10

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

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