# Interface MethodConfigOrBuilder (1.11.0)

    public interface MethodConfigOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### getAffinity()

    public abstract AffinityConfig getAffinity()

The channel affinity configurations.

`.grpc.gcp.AffinityConfig affinity = 1001;`

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

### getAffinityOrBuilder()

    public abstract AffinityConfigOrBuilder getAffinityOrBuilder()

The channel affinity configurations.

`.grpc.gcp.AffinityConfig affinity = 1001;`

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

### getName(int index)

    public abstract String getName(int index)

A fully qualified name of a gRPC method, or a wildcard pattern ending
with .*, such as foo.bar.A, foo.bar.*. Method configs are evaluated
sequentially, and the first one takes precedence.

`repeated string name = 1;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

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

### getNameBytes(int index)

    public abstract ByteString getNameBytes(int index)

A fully qualified name of a gRPC method, or a wildcard pattern ending
with .*, such as foo.bar.A, foo.bar.*. Method configs are evaluated
sequentially, and the first one takes precedence.

`repeated string name = 1;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

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

### getNameCount()

    public abstract int getNameCount()

A fully qualified name of a gRPC method, or a wildcard pattern ending
with .*, such as foo.bar.A, foo.bar.*. Method configs are evaluated
sequentially, and the first one takes precedence.

`repeated string name = 1;`

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

### getNameList()

    public abstract List<String> getNameList()

A fully qualified name of a gRPC method, or a wildcard pattern ending
with .*, such as foo.bar.A, foo.bar.*. Method configs are evaluated
sequentially, and the first one takes precedence.

`repeated string name = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the name. |

### hasAffinity()

    public abstract boolean hasAffinity()

The channel affinity configurations.

`.grpc.gcp.AffinityConfig affinity = 1001;`

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