# Google Cloud Run V2 Client - Class UpdateServiceRequest (1.12.2)

1.12.2 (latest) 1.12.1 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.0 1.5.2 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.9.3 0.8.0 0.7.2 0.6.0 0.5.2 0.4.0 0.3.4 Reference documentation and code samples for the Google Cloud Run V2 Client class UpdateServiceRequest.

Request message for updating a service.

Generated from protobuf message `google.cloud.run.v2.UpdateServiceRequest`

## Namespace

Google \\ Cloud \\ Run \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ update_mask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Optional. The list of fields to be updated. |
| `↳ service` | `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.Service` Required. The Service to be updated. |
| `↳ validate_only` | `bool` Indicates that the request should be validated and default values populated, without persisting the request or updating any resources. |
| `↳ allow_missing` | `bool` Optional. If set to true, and if the Service does not exist, it will create a new one. The caller must have 'run.services.create' permissions if this is set to true and the Service does not exist. |

### getUpdateMask

Optional. The list of fields to be updated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask|null` |   |

### hasUpdateMask

### clearUpdateMask

### setUpdateMask

Optional. The list of fields to be updated.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` |

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

### getService

Required. The Service to be updated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.Service|null` |   |

### hasService

### clearService

### setService

Required. The Service to be updated.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.Service` |

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

### getValidateOnly

Indicates that the request should be validated and default values
populated, without persisting the request or updating any resources.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setValidateOnly

Indicates that the request should be validated and default values
populated, without persisting the request or updating any resources.

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

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

### getAllowMissing

Optional. If set to true, and if the Service does not exist, it will create
a new one. The caller must have 'run.services.create' permissions if this
is set to true and the Service does not exist.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setAllowMissing

Optional. If set to true, and if the Service does not exist, it will create
a new one. The caller must have 'run.services.create' permissions if this
is set to true and the Service does not exist.

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

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

### static::build

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `service` | `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.Service` Required. The Service to be updated. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.UpdateServiceRequest` |   |

### static::buildFromServiceUpdateMask

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `service` | `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.Service` Required. The Service to be updated. |
| `updateMask` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/FieldMask` Optional. The list of fields to be updated. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-run/latest/V2.UpdateServiceRequest` |   |