# Interface ValueOrBuilder (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.ValueOrBuilder)
- [0.15.0](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.datastore.v1.ValueOrBuilder)
- [0.14.1](https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.datastore.v1.ValueOrBuilder)

    public interface ValueOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### getArrayValue()

    public abstract ArrayValue getArrayValue()

An array value.
Cannot contain another array value.
A `Value` instance that sets field `array_value` must not set fields
`meaning` or `exclude_from_indexes`.

`.google.events.cloud.datastore.v1.ArrayValue array_value = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastore.v1.ArrayValue` | The arrayValue. |

### getArrayValueOrBuilder()

    public abstract ArrayValueOrBuilder getArrayValueOrBuilder()

An array value.
Cannot contain another array value.
A `Value` instance that sets field `array_value` must not set fields
`meaning` or `exclude_from_indexes`.

`.google.events.cloud.datastore.v1.ArrayValue array_value = 9;`

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

### getBlobValue()

    public abstract ByteString getBlobValue()

A blob value.
May have at most 1,000,000 bytes.
When `exclude_from_indexes` is false, may have at most 1500 bytes.
In JSON requests, must be base64-encoded.

`bytes blob_value = 18;`

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

### getBooleanValue()

    public abstract boolean getBooleanValue()

A boolean value.

`bool boolean_value = 1;`

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

### getDoubleValue()

    public abstract double getDoubleValue()

A double value.

`double double_value = 3;`

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

### getEntityValue()

    public abstract Entity getEntityValue()

An entity value.

- May have no key.
- May have a key with an incomplete key path.
- May have a reserved/read-only key.

`.google.events.cloud.datastore.v1.Entity entity_value = 6;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.datastore.v1.Entity` | The entityValue. |

### getEntityValueOrBuilder()

    public abstract EntityOrBuilder getEntityValueOrBuilder()

An entity value.

- May have no key.
- May have a key with an incomplete key path.
- May have a reserved/read-only key.

`.google.events.cloud.datastore.v1.Entity entity_value = 6;`

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

### getExcludeFromIndexes()

    public abstract boolean getExcludeFromIndexes()

If the value should be excluded from all indexes including those defined
explicitly.

`bool exclude_from_indexes = 19;`

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

### getGeoPointValue()

    public abstract LatLng getGeoPointValue()

A geo point value representing a point on the surface of Earth.

`.google.type.LatLng geo_point_value = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.type.LatLng` | The geoPointValue. |

### getGeoPointValueOrBuilder()

    public abstract LatLngOrBuilder getGeoPointValueOrBuilder()

A geo point value representing a point on the surface of Earth.

`.google.type.LatLng geo_point_value = 8;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.type.LatLngOrBuilder` |   |

### getIntegerValue()

    public abstract long getIntegerValue()

An integer value.

`int64 integer_value = 2;`

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

### getKeyValue()

    public abstract Key getKeyValue()

A key value.

`.google.events.cloud.datastore.v1.Key key_value = 5;`

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

### getKeyValueOrBuilder()

    public abstract KeyOrBuilder getKeyValueOrBuilder()

A key value.

`.google.events.cloud.datastore.v1.Key key_value = 5;`

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

### getMeaning()

    public abstract int getMeaning()

The `meaning` field should only be populated for backwards compatibility.

`int32 meaning = 14;`

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

### getNullValue()

    public abstract NullValue getNullValue()

A null value.

`.google.protobuf.NullValue null_value = 11;`

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

### getNullValueValue()

    public abstract int getNullValueValue()

A null value.

`.google.protobuf.NullValue null_value = 11;`

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

### getStringValue()

    public abstract String getStringValue()

A UTF-8 encoded string value.
When `exclude_from_indexes` is false (it is indexed) , may have at most
1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.

`string string_value = 17;`

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

### getStringValueBytes()

    public abstract ByteString getStringValueBytes()

A UTF-8 encoded string value.
When `exclude_from_indexes` is false (it is indexed) , may have at most
1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.

`string string_value = 17;`

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

### getTimestampValue()

    public abstract Timestamp getTimestampValue()

A timestamp value.
When stored in the Datastore, precise only to microseconds;
any additional precision is rounded down.

`.google.protobuf.Timestamp timestamp_value = 10;`

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

### getTimestampValueOrBuilder()

    public abstract TimestampOrBuilder getTimestampValueOrBuilder()

A timestamp value.
When stored in the Datastore, precise only to microseconds;
any additional precision is rounded down.

`.google.protobuf.Timestamp timestamp_value = 10;`

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

### getValueTypeCase()

    public abstract Value.ValueTypeCase getValueTypeCase()

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

### hasArrayValue()

    public abstract boolean hasArrayValue()

An array value.
Cannot contain another array value.
A `Value` instance that sets field `array_value` must not set fields
`meaning` or `exclude_from_indexes`.

`.google.events.cloud.datastore.v1.ArrayValue array_value = 9;`

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

### hasBlobValue()

    public abstract boolean hasBlobValue()

A blob value.
May have at most 1,000,000 bytes.
When `exclude_from_indexes` is false, may have at most 1500 bytes.
In JSON requests, must be base64-encoded.

`bytes blob_value = 18;`

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

### hasBooleanValue()

    public abstract boolean hasBooleanValue()

A boolean value.

`bool boolean_value = 1;`

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

### hasDoubleValue()

    public abstract boolean hasDoubleValue()

A double value.

`double double_value = 3;`

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

### hasEntityValue()

    public abstract boolean hasEntityValue()

An entity value.

- May have no key.
- May have a key with an incomplete key path.
- May have a reserved/read-only key.

`.google.events.cloud.datastore.v1.Entity entity_value = 6;`

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

### hasGeoPointValue()

    public abstract boolean hasGeoPointValue()

A geo point value representing a point on the surface of Earth.

`.google.type.LatLng geo_point_value = 8;`

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

### hasIntegerValue()

    public abstract boolean hasIntegerValue()

An integer value.

`int64 integer_value = 2;`

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

### hasKeyValue()

    public abstract boolean hasKeyValue()

A key value.

`.google.events.cloud.datastore.v1.Key key_value = 5;`

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

### hasNullValue()

    public abstract boolean hasNullValue()

A null value.

`.google.protobuf.NullValue null_value = 11;`

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

### hasStringValue()

    public abstract boolean hasStringValue()

A UTF-8 encoded string value.
When `exclude_from_indexes` is false (it is indexed) , may have at most
1500 bytes. Otherwise, may be set to at most 1,000,000 bytes.

`string string_value = 17;`

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

### hasTimestampValue()

    public abstract boolean hasTimestampValue()

A timestamp value.
When stored in the Datastore, precise only to microseconds;
any additional precision is rounded down.

`.google.protobuf.Timestamp timestamp_value = 10;`

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