# Class Exclusion.Builder (3.34.0)

3.34.0 (latest) 3.32.0 3.29.0 3.28.0 3.26.0 3.24.0 3.23.10 3.22.6 3.21.4 3.20.7 3.19.0 3.18.0 3.17.2 3.16.2 3.15.17 3.14.9 3.13.7 3.12.1 3.11.10 3.10.7 3.9.0 3.8.0 3.7.6 3.6.4 3.5.3

    public static class Exclusion.Builder

A builder for `Exclusion` objects.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> Exclusion.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-)

## Methods

### build()

    public Exclusion build()

Creates a `Exclusion` object.

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

### setCreateTime(Timestamp createTime)

    public Exclusion.Builder setCreateTime(Timestamp createTime)

\[Output only\] The creation timestamp of the exclusion.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `createTime` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` |

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

### setDescription(String description)

    public Exclusion.Builder setDescription(String description)

\[Optional\] A description of this exclusion.

| **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-logging/latest/com.google.cloud.logging.Exclusion.Builder` |   |

### setDisabled(boolean disabled)

    public Exclusion.Builder setDisabled(boolean disabled)

\[Optional\] If set to True, then this exclusion is disabled and it does not exclude any log
entries.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `disabled` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

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

### setFilter(String filter)

    public Exclusion.Builder setFilter(String filter)

\[Required\] An advanced logs filter that matches the log entries to be excluded. By using the
sample function, you can exclude less than 100% of the matching log entries.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `filter` | `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-logging/latest/com.google.cloud.logging.Exclusion.Builder` |   |

### setName(String name)

    public Exclusion.Builder setName(String name)

\[Required\] A client-assigned identifier, such as "load-balancer-exclusion". Identifiers are
limited to 100 characters and can include only letters, digits, underscores, hyphens, and
periods. First character has to be alphanumeric.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `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-logging/latest/com.google.cloud.logging.Exclusion.Builder` |   |

### setUpdateTime(Timestamp updateTime)

    public Exclusion.Builder setUpdateTime(Timestamp updateTime)

\[Output only\] The last update timestamp of the exclusion.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `updateTime` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` |

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