# Interface TypeOrBuilder (3.19.4)

    public interface TypeOrBuilder extends MessageLiteOrBuilder

## Implements

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

## Methods

### getFields(int index)

    public abstract Field getFields(int index)

The list of fields.

`repeated .google.protobuf.Field fields = 2;`

| **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.Field` |   |

### getFieldsCount()

    public abstract int getFieldsCount()

The list of fields.

`repeated .google.protobuf.Field fields = 2;`

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

### getFieldsList()

    public abstract List<Field> getFieldsList()

The list of fields.

`repeated .google.protobuf.Field fields = 2;`

| **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.Field>` |   |

### getName()

    public abstract String getName()

The fully qualified message name.

`string name = 1;`

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

### getNameBytes()

    public abstract ByteString getNameBytes()

The fully qualified message name.

`string name = 1;`

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

### getOneofs(int index)

    public abstract String getOneofs(int index)

The list of types appearing in `oneof` definitions in this type.

`repeated string oneofs = 3;`

| **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 oneofs at the given index. |

### getOneofsBytes(int index)

    public abstract ByteString getOneofsBytes(int index)

The list of types appearing in `oneof` definitions in this type.

`repeated string oneofs = 3;`

| **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.cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString` | The oneofs at the given index. |

### getOneofsCount()

    public abstract int getOneofsCount()

The list of types appearing in `oneof` definitions in this type.

`repeated string oneofs = 3;`

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

### getOneofsList()

    public abstract List<String> getOneofsList()

The list of types appearing in `oneof` definitions in this type.

`repeated string oneofs = 3;`

| **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 oneofs. |

### getOptions(int index)

    public abstract Option getOptions(int index)

The protocol buffer options.

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

| **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 = 4;`

| **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 = 4;`

| **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>` |   |

### getSourceContext()

    public abstract SourceContext getSourceContext()

The source context.

`.google.protobuf.SourceContext source_context = 5;`

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

### getSyntax()

    public abstract Syntax getSyntax()

The source syntax.

`.google.protobuf.Syntax syntax = 6;`

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

### getSyntaxValue()

    public abstract int getSyntaxValue()

The source syntax.

`.google.protobuf.Syntax syntax = 6;`

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

### hasSourceContext()

    public abstract boolean hasSourceContext()

The source context.

`.google.protobuf.SourceContext source_context = 5;`

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