# Interface AffinityConfigOrBuilder (1.11.0)

    public interface AffinityConfigOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### getAffinityKey()

    public abstract String getAffinityKey()

The field path of the affinity key in the request/response message.
For example: "f.a", "f.b.d", etc.

`string affinity_key = 3;`

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

### getAffinityKeyBytes()

    public abstract ByteString getAffinityKeyBytes()

The field path of the affinity key in the request/response message.
For example: "f.a", "f.b.d", etc.

`string affinity_key = 3;`

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

### getCommand()

    public abstract AffinityConfig.Command getCommand()

The affinity command applies on the selected gRPC methods.

`.grpc.gcp.AffinityConfig.Command command = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/grpc-gcp/latest/com.google.cloud.grpc.proto.AffinityConfig.Command` | The command. |

### getCommandValue()

    public abstract int getCommandValue()

The affinity command applies on the selected gRPC methods.

`.grpc.gcp.AffinityConfig.Command command = 2;`

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