# Interface Key.PathElementOrBuilder (0.16.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [0.16.0 (latest)](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastore.v1.Key.PathElementOrBuilder)
- [0.15.0](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.datastore.v1.Key.PathElementOrBuilder)
- [0.14.1](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.datastore.v1.Key.PathElementOrBuilder)

    public static interface Key.PathElementOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### getId()

    public abstract long getId()

The auto-allocated ID of the entity.
Never equal to zero. Values less than zero are discouraged and may not
be supported in the future.

`int64 id = 2;`

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

### getIdTypeCase()

    public abstract Key.PathElement.IdTypeCase getIdTypeCase()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastore.v1.Key.PathElement.IdTypeCase` |   |

### getKind()

    public abstract String getKind()

The kind of the entity.
A kind matching regex `.\*` is reserved/read-only.
A kind must not contain more than 1500 bytes when UTF-8 encoded.
Cannot be `""`.
Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
encoded as `bytes\<X\>` where `<X>` is the base-64 encoding of the
bytes.

`string kind = 1;`

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

### getKindBytes()

    public abstract ByteString getKindBytes()

The kind of the entity.
A kind matching regex `.\*` is reserved/read-only.
A kind must not contain more than 1500 bytes when UTF-8 encoded.
Cannot be `""`.
Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
encoded as `bytes\<X\>` where `<X>` is the base-64 encoding of the
bytes.

`string kind = 1;`

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

### getName()

    public abstract String getName()

The name of the entity.
A name matching regex `.\*` is reserved/read-only.
A name must not be more than 1500 bytes when UTF-8 encoded.
Cannot be `""`.
Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
encoded as `bytes\<X\>` where `<X>` is the base-64 encoding of the
bytes.

`string name = 3;`

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

### getNameBytes()

    public abstract ByteString getNameBytes()

The name of the entity.
A name matching regex `.\*` is reserved/read-only.
A name must not be more than 1500 bytes when UTF-8 encoded.
Cannot be `""`.
Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
encoded as `bytes\<X\>` where `<X>` is the base-64 encoding of the
bytes.

`string name = 3;`

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

### hasId()

    public abstract boolean hasId()

The auto-allocated ID of the entity.
Never equal to zero. Values less than zero are discouraged and may not
be supported in the future.

`int64 id = 2;`

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

### hasName()

    public abstract boolean hasName()

The name of the entity.
A name matching regex `.\*` is reserved/read-only.
A name must not be more than 1500 bytes when UTF-8 encoded.
Cannot be `""`.
Must be valid UTF-8 bytes. Legacy values that are not valid UTF-8 are
encoded as `bytes\<X\>` where `<X>` is the base-64 encoding of the
bytes.

`string name = 3;`

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