# Interface AggregationQuery.Aggregation.CountOrBuilder (3.1.0)

3.1.0 (latest) 2.40.0 2.37.0 2.36.0 2.34.0 2.33.3 2.32.3 2.31.4 2.30.0 2.29.1 2.28.2 2.27.1 2.26.4 2.25.2 2.24.3 2.23.0 2.22.0 2.21.3 2.20.2 2.19.2 2.18.5 2.17.6

    public static interface AggregationQuery.Aggregation.CountOrBuilder extends MessageOrBuilder

## Implements

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

## Methods

### getUpTo()

    public abstract Int64Value getUpTo()

Optional. Optional constraint on the maximum number of entities to
count.

This provides a way to set an upper bound on the number of entities
to scan, limiting latency, and cost.

Unspecified is interpreted as no bound.

If a zero value is provided, a count result of zero should always be
expected.

High-Level Example:

`<code><code>
AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k );
</code></code>`

Requires:

- Must be non-negative when present.

`.google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL];
`

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

### getUpToOrBuilder()

    public abstract Int64ValueOrBuilder getUpToOrBuilder()

Optional. Optional constraint on the maximum number of entities to
count.

This provides a way to set an upper bound on the number of entities
to scan, limiting latency, and cost.

Unspecified is interpreted as no bound.

If a zero value is provided, a count result of zero should always be
expected.

High-Level Example:

`<code><code>
AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k );
</code></code>`

Requires:

- Must be non-negative when present.

`.google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL];
`

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

### hasUpTo()

    public abstract boolean hasUpTo()

Optional. Optional constraint on the maximum number of entities to
count.

This provides a way to set an upper bound on the number of entities
to scan, limiting latency, and cost.

Unspecified is interpreted as no bound.

If a zero value is provided, a count result of zero should always be
expected.

High-Level Example:

`<code><code>
AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k );
</code></code>`

Requires:

- Must be non-negative when present.

`.google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL];
`

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