# Google Cloud Network Services V1 Client - Class CreateServiceLbPolicyRequest (0.8.2)

0.8.2 (latest) 0.8.1 0.7.1 0.6.1 0.5.0 0.4.0 0.3.0 0.2.3 0.1.1 Reference documentation and code samples for the Google Cloud Network Services V1 Client class CreateServiceLbPolicyRequest.

Request used by the ServiceLbPolicy method.

Generated from protobuf message `google.cloud.networkservices.v1.CreateServiceLbPolicyRequest`

## Namespace

Google \\ Cloud \\ NetworkServices \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ parent` | `string` Required. The parent resource of the ServiceLbPolicy. Must be in the format `projects/{project}/locations/{location}`. |
| `↳ service_lb_policy_id` | `string` Required. Short name of the ServiceLbPolicy resource to be created. E.g. for resource name `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. the id is value of {service_lb_policy_name} |
| `↳ service_lb_policy` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.ServiceLbPolicy` Required. ServiceLbPolicy resource to be created. |

### getParent

Required. The parent resource of the ServiceLbPolicy. Must be in the
format `projects/{project}/locations/{location}`.

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

### setParent

Required. The parent resource of the ServiceLbPolicy. Must be in the
format `projects/{project}/locations/{location}`.

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

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

### getServiceLbPolicyId

Required. Short name of the ServiceLbPolicy resource to be created.

E.g. for resource name
`projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.
the id is value of {service_lb_policy_name}

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

### setServiceLbPolicyId

Required. Short name of the ServiceLbPolicy resource to be created.

E.g. for resource name
`projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.
the id is value of {service_lb_policy_name}

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

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

### getServiceLbPolicy

Required. ServiceLbPolicy resource to be created.

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

### hasServiceLbPolicy

### clearServiceLbPolicy

### setServiceLbPolicy

Required. ServiceLbPolicy resource to be created.

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

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. The parent resource of the ServiceLbPolicy. Must be in the format `projects/{project}/locations/{location}`. Please see NetworkServicesClient::locationName() for help formatting this field. |
| `serviceLbPolicy` | `https://docs.cloud.google.com/php/docs/reference/cloud-networkservices/latest/V1.ServiceLbPolicy` Required. ServiceLbPolicy resource to be created. |
| `serviceLbPolicyId` | `string` Required. Short name of the ServiceLbPolicy resource to be created. E.g. for resource name `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. the id is value of {service_lb_policy_name} |

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