# Interface ServiceLbPolicyOrBuilder (0.49.0)

0.49.0 (latest) 0.47.0 0.44.0 0.43.0 0.41.0 0.39.0 0.38.0 0.36.0 0.34.0 0.32.0 0.31.0 0.30.0 0.29.0 0.28.0 0.26.0 0.24.0 0.23.0 0.20.0 0.19.0 0.18.0 0.16.0 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.5.0 0.4.0 0.3.0 0.2.0 0.1.0

    public interface ServiceLbPolicyOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### containsLabels(String key)

    public abstract boolean containsLabels(String key)

Optional. Set of label tags associated with the ServiceLbPolicy resource.

`map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getAutoCapacityDrain()

    public abstract ServiceLbPolicy.AutoCapacityDrain getAutoCapacityDrain()

Optional. Configuration to automatically move traffic away for unhealthy
IG/NEG for the associated Backend Service.

`
.google.cloud.networkservices.v1.ServiceLbPolicy.AutoCapacityDrain auto_capacity_drain = 8 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/com.google.cloud.networkservices.v1.ServiceLbPolicy.AutoCapacityDrain` | The autoCapacityDrain. |

### getAutoCapacityDrainOrBuilder()

    public abstract ServiceLbPolicy.AutoCapacityDrainOrBuilder getAutoCapacityDrainOrBuilder()

Optional. Configuration to automatically move traffic away for unhealthy
IG/NEG for the associated Backend Service.

`
.google.cloud.networkservices.v1.ServiceLbPolicy.AutoCapacityDrain auto_capacity_drain = 8 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/com.google.cloud.networkservices.v1.ServiceLbPolicy.AutoCapacityDrainOrBuilder` |   |

### getCreateTime()

    public abstract Timestamp getCreateTime()

Output only. The timestamp when this resource was created.

`.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The createTime. |

### getCreateTimeOrBuilder()

    public abstract TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The timestamp when this resource was created.

`.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getDescription()

    public abstract String getDescription()

Optional. A free-text description of the resource. Max length 1024
characters.

`string description = 5 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The description. |

### getDescriptionBytes()

    public abstract ByteString getDescriptionBytes()

Optional. A free-text description of the resource. Max length 1024
characters.

`string description = 5 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for description. |

### getFailoverConfig()

    public abstract ServiceLbPolicy.FailoverConfig getFailoverConfig()

Optional. Configuration related to health based failover.

`
.google.cloud.networkservices.v1.ServiceLbPolicy.FailoverConfig failover_config = 10 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/com.google.cloud.networkservices.v1.ServiceLbPolicy.FailoverConfig` | The failoverConfig. |

### getFailoverConfigOrBuilder()

    public abstract ServiceLbPolicy.FailoverConfigOrBuilder getFailoverConfigOrBuilder()

Optional. Configuration related to health based failover.

`
.google.cloud.networkservices.v1.ServiceLbPolicy.FailoverConfig failover_config = 10 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/com.google.cloud.networkservices.v1.ServiceLbPolicy.FailoverConfigOrBuilder` |   |

### getIsolationConfig()

    public abstract ServiceLbPolicy.IsolationConfig getIsolationConfig()

Optional. Configuration to provide isolation support for the associated
Backend Service.

`
.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationConfig isolation_config = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/com.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationConfig` | The isolationConfig. |

### getIsolationConfigOrBuilder()

    public abstract ServiceLbPolicy.IsolationConfigOrBuilder getIsolationConfigOrBuilder()

Optional. Configuration to provide isolation support for the associated
Backend Service.

`
.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationConfig isolation_config = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/com.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationConfigOrBuilder` |   |

### getLabels() (deprecated)

    public abstract Map<String,String> getLabels()

Use [#getLabelsMap()](https://docs.cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/com.google.cloud.networkservices.v1.ServiceLbPolicyOrBuilder#com_google_cloud_networkservices_v1_ServiceLbPolicyOrBuilder_getLabelsMap__) instead.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsCount()

    public abstract int getLabelsCount()

Optional. Set of label tags associated with the ServiceLbPolicy resource.

`map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### getLabelsMap()

    public abstract Map<String,String> getLabelsMap()

Optional. Set of label tags associated with the ServiceLbPolicy resource.

`map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |   |

### getLabelsOrDefault(String key, String defaultValue)

    public abstract String getLabelsOrDefault(String key, String defaultValue)

Optional. Set of label tags associated with the ServiceLbPolicy resource.

`map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |
| `defaultValue` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getLabelsOrThrow(String key)

    public abstract String getLabelsOrThrow(String key)

Optional. Set of label tags associated with the ServiceLbPolicy resource.

`map<string, string> labels = 4 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `key` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### getLoadBalancingAlgorithm()

    public abstract ServiceLbPolicy.LoadBalancingAlgorithm getLoadBalancingAlgorithm()

Optional. The type of load balancing algorithm to be used. The default
behavior is WATERFALL_BY_REGION.

`
.google.cloud.networkservices.v1.ServiceLbPolicy.LoadBalancingAlgorithm load_balancing_algorithm = 6 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-networkservices/latest/com.google.cloud.networkservices.v1.ServiceLbPolicy.LoadBalancingAlgorithm` | The loadBalancingAlgorithm. |

### getLoadBalancingAlgorithmValue()

    public abstract int getLoadBalancingAlgorithmValue()

Optional. The type of load balancing algorithm to be used. The default
behavior is WATERFALL_BY_REGION.

`
.google.cloud.networkservices.v1.ServiceLbPolicy.LoadBalancingAlgorithm load_balancing_algorithm = 6 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for loadBalancingAlgorithm. |

### getName()

    public abstract String getName()

Identifier. Name of the ServiceLbPolicy resource. It matches pattern
`projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.

`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public abstract ByteString getNameBytes()

Identifier. Name of the ServiceLbPolicy resource. It matches pattern
`projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.

`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getUpdateTime()

    public abstract Timestamp getUpdateTime()

Output only. The timestamp when this resource was last updated.

`.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The updateTime. |

### getUpdateTimeOrBuilder()

    public abstract TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The timestamp when this resource was last updated.

`.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### hasAutoCapacityDrain()

    public abstract boolean hasAutoCapacityDrain()

Optional. Configuration to automatically move traffic away for unhealthy
IG/NEG for the associated Backend Service.

`
.google.cloud.networkservices.v1.ServiceLbPolicy.AutoCapacityDrain auto_capacity_drain = 8 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the autoCapacityDrain field is set. |

### hasCreateTime()

    public abstract boolean hasCreateTime()

Output only. The timestamp when this resource was created.

`.google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the createTime field is set. |

### hasFailoverConfig()

    public abstract boolean hasFailoverConfig()

Optional. Configuration related to health based failover.

`
.google.cloud.networkservices.v1.ServiceLbPolicy.FailoverConfig failover_config = 10 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the failoverConfig field is set. |

### hasIsolationConfig()

    public abstract boolean hasIsolationConfig()

Optional. Configuration to provide isolation support for the associated
Backend Service.

`
.google.cloud.networkservices.v1.ServiceLbPolicy.IsolationConfig isolation_config = 11 [(.google.api.field_behavior) = OPTIONAL];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the isolationConfig field is set. |

### hasUpdateTime()

    public abstract boolean hasUpdateTime()

Output only. The timestamp when this resource was last updated.

`.google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the updateTime field is set. |