# Class TableInfo.Builder (2.65.0)

2.65.0 (latest) 2.62.0 2.61.0 2.60.0 2.59.0 2.58.0 2.57.2 2.56.0 2.55.3 2.54.2 2.53.0 2.52.0 2.51.0 2.50.1 2.49.0 2.48.1 2.47.0 2.46.0 2.45.0 2.44.0 2.43.3 2.42.3 2.41.0 2.40.3 2.39.1 2.38.2 2.37.2 2.36.0 2.35.0 2.34.2 2.33.2

    public abstract static class TableInfo.Builder

A builder for `TableInfo` objects.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> TableInfo.Builder

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Constructors

### Builder()

    public Builder()

## Methods

### build()

    public abstract TableInfo build()

Creates a `TableInfo` object.

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

### setCloneDefinition(CloneDefinition cloneDefinition)

    public abstract TableInfo.Builder setCloneDefinition(CloneDefinition cloneDefinition)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cloneDefinition` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.CloneDefinition` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo.Builder` |   |

### setDefaultCollation(String defaultCollation)

    public abstract TableInfo.Builder setDefaultCollation(String defaultCollation)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `defaultCollation` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo.Builder` |   |

### setDefinition(TableDefinition definition)

    public abstract TableInfo.Builder setDefinition(TableDefinition definition)

Sets the table definition. Use [StandardTableDefinition](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.StandardTableDefinition) to create simple BigQuery
table. Use [ViewDefinition](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.ViewDefinition) to create a BigQuery view. Use [ExternalTableDefinition](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.ExternalTableDefinition) to create a BigQuery a table backed by external data.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `definition` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableDefinition` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo.Builder` |   |

### setDescription(String description)

    public abstract TableInfo.Builder setDescription(String description)

Sets a user-friendly description for the table.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `description` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo.Builder` |   |

### setEncryptionConfiguration(EncryptionConfiguration configuration)

    public abstract TableInfo.Builder setEncryptionConfiguration(EncryptionConfiguration configuration)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.EncryptionConfiguration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo.Builder` |   |

### setExpirationTime(Long expirationTime)

    public abstract TableInfo.Builder setExpirationTime(Long expirationTime)

Sets the time when this table expires, in milliseconds since the epoch. If not present, the
table will persist indefinitely. Expired tables will be deleted and their storage reclaimed.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `expirationTime` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Long.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo.Builder` |   |

### setFriendlyName(String friendlyName)

    public abstract TableInfo.Builder setFriendlyName(String friendlyName)

Sets a user-friendly name for the table.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `friendlyName` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo.Builder` |   |

### setLabels(Map\<String,String\> labels)

    public abstract TableInfo.Builder setLabels(Map<String,String> labels)

> [!WARNING]
> **Beta**
>
> This feature is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1) of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.

Sets the labels applied to this table.

Unstable, because labels are [experimental](https://cloud.google.com/bigquery/docs/reference/rest/v2/tables).

When used with [BigQuery#update(TableInfo, TableOption...)](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.BigQuery#com_google_cloud_bigquery_BigQuery_update_), setting `labels`
to `null` removes all labels; otherwise all keys that are mapped to `null` values
are removed and other keys are updated to their respective values.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `labels` | `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo.Builder` |   |

### setRequirePartitionFilter(Boolean requirePartitionFilter)

    public TableInfo.Builder setRequirePartitionFilter(Boolean requirePartitionFilter)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `requirePartitionFilter` | `https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo.Builder` |   |

### setResourceTags(Map\<String,String\> resourceTags)

    public abstract TableInfo.Builder setResourceTags(Map<String,String> resourceTags)

Sets the resource tags applied to this table.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `resourceTags` | `https://docs.oracle.com/javase/8/docs/api/java/util/Map.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html,https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo.Builder` |   |

### setTableConstraints(TableConstraints tableConstraints)

    public abstract TableInfo.Builder setTableConstraints(TableConstraints tableConstraints)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `tableConstraints` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableConstraints` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo.Builder` |   |

### setTableId(TableId tableId)

    public abstract TableInfo.Builder setTableId(TableId tableId)

Sets the table identity.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `tableId` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableId` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigquery/latest/com.google.cloud.bigquery.TableInfo.Builder` |   |