# Interface FieldOrBuilder (3.19.4)

    public interface FieldOrBuilder extends MessageLiteOrBuilder

## Implements

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

## Methods

### getCardinality()

    public abstract Field.Cardinality getCardinality()

The field cardinality.

`.google.protobuf.Field.Cardinality cardinality = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Field.Cardinality` | The cardinality. |

### getCardinalityValue()

    public abstract int getCardinalityValue()

The field cardinality.

`.google.protobuf.Field.Cardinality cardinality = 2;`

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

### getDefaultValue()

    public abstract String getDefaultValue()

The string value of the default value of this field. Proto2 syntax only.

`string default_value = 11;`

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

### getDefaultValueBytes()

    public abstract ByteString getDefaultValueBytes()

The string value of the default value of this field. Proto2 syntax only.

`string default_value = 11;`

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

### getJsonName()

    public abstract String getJsonName()

The field JSON name.

`string json_name = 10;`

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

### getJsonNameBytes()

    public abstract ByteString getJsonNameBytes()

The field JSON name.

`string json_name = 10;`

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

### getKind()

    public abstract Field.Kind getKind()

The field type.

`.google.protobuf.Field.Kind kind = 1;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Field.Kind` | The kind. |

### getKindValue()

    public abstract int getKindValue()

The field type.

`.google.protobuf.Field.Kind kind = 1;`

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

### getName()

    public abstract String getName()

The field name.

`string name = 4;`

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

### getNameBytes()

    public abstract ByteString getNameBytes()

The field name.

`string name = 4;`

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

### getNumber()

    public abstract int getNumber()

The field number.

`int32 number = 3;`

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

### getOneofIndex()

    public abstract int getOneofIndex()

The index of the field type in `Type.oneofs`, for message or enumeration
types. The first type has index 1; zero means the type is not in the list.

`int32 oneof_index = 7;`

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

### getOptions(int index)

    public abstract Option getOptions(int index)

The protocol buffer options.

`repeated .google.protobuf.Option options = 9;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

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

### getOptionsCount()

    public abstract int getOptionsCount()

The protocol buffer options.

`repeated .google.protobuf.Option options = 9;`

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

### getOptionsList()

    public abstract List<Option> getOptionsList()

The protocol buffer options.

`repeated .google.protobuf.Option options = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Option>` |   |

### getPacked()

    public abstract boolean getPacked()

Whether to use alternative packed wire representation.

`bool packed = 8;`

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

### getTypeUrl()

    public abstract String getTypeUrl()

The field type URL, without the scheme, for message or enumeration
types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.

`string type_url = 6;`

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

### getTypeUrlBytes()

    public abstract ByteString getTypeUrlBytes()

The field type URL, without the scheme, for message or enumeration
types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.

`string type_url = 6;`

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