# AvailabilityTimeWindow.Builder

# AvailabilityTimeWindow.Builder

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder "View this page in Kotlin")\|Java  

<br />

```
public final class AvailabilityTimeWindow.Builder
```

<br />

*** ** * ** ***

Builder class for[AvailabilityTimeWindow](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow).

## Summary

|                                                          ### Public constructors                                                           |
|--------------------------------------------------------------------------------------------------------------------------------------------|
| [Builder](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#Builder())`()` |

|                                                                 ### Public methods                                                                  |
|-----------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AvailabilityTimeWindow](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow)                 | [build](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#build())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| [AvailabilityTimeWindow.Builder](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder) | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) ~~[setEndTimestampMillis](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setEndTimestampMillis(long))~~`(long endTimestampMillis)` **This method is deprecated.** Use[setLocalizedEndTimestamp](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setLocalizedEndTimestamp(com.google.android.engage.common.datamodel.LocalizedTimestamp))instead. <br />           |
| [AvailabilityTimeWindow.Builder](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder) | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setLocalizedEndTimestamp](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setLocalizedEndTimestamp(com.google.android.engage.common.datamodel.LocalizedTimestamp))`(`[LocalizedTimestamp](https://developer.android.com/reference/com/google/android/engage/common/datamodel/LocalizedTimestamp)` localizedEndTimestamp)` Sets the localized end timestamp for the availability time window.                                        |
| [AvailabilityTimeWindow.Builder](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder) | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) [setLocalizedStartTimestamp](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setLocalizedStartTimestamp(com.google.android.engage.common.datamodel.LocalizedTimestamp))`(`[LocalizedTimestamp](https://developer.android.com/reference/com/google/android/engage/common/datamodel/LocalizedTimestamp)` localizedStartTimestamp)` Sets the localized start timestamp for the availability time window.                                |
| [AvailabilityTimeWindow.Builder](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder) | `@`[CanIgnoreReturnValue](https://errorprone.info/api/latest/com/google/errorprone/annotations/CanIgnoreReturnValue.html) ~~[setStartTimestampMillis](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setStartTimestampMillis(long))~~`(long startTimestampMillis)` **This method is deprecated.** Use[setLocalizedStartTimestamp](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setLocalizedStartTimestamp(com.google.android.engage.common.datamodel.LocalizedTimestamp))instead. <br /> |

## Public constructors

### Builder

```
public Builder()
```  

## Public methods

### build

```
public AvailabilityTimeWindow build()
```  

### setEndTimestampMillis

```
@CanIgnoreReturnValue
public AvailabilityTimeWindow.Builder [setEndTimestampMillis](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setEndTimestampMillis(long))(long endTimestampMillis)
```
| **This method is deprecated.**   
|
| Use[setLocalizedEndTimestamp](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setLocalizedEndTimestamp(com.google.android.engage.common.datamodel.LocalizedTimestamp))instead.

Sets the end timestamp for the availability time window in epoch milliseconds.

Required.  

### setLocalizedEndTimestamp

```
@CanIgnoreReturnValue
public AvailabilityTimeWindow.Builder setLocalizedEndTimestamp(LocalizedTimestamp localizedEndTimestamp)
```

Sets the localized end timestamp for the availability time window.

Required.  

### setLocalizedStartTimestamp

```
@CanIgnoreReturnValue
public AvailabilityTimeWindow.Builder setLocalizedStartTimestamp(LocalizedTimestamp localizedStartTimestamp)
```

Sets the localized start timestamp for the availability time window.

Required.  

### setStartTimestampMillis

```
@CanIgnoreReturnValue
public AvailabilityTimeWindow.Builder [setStartTimestampMillis](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setStartTimestampMillis(long))(long startTimestampMillis)
```
| **This method is deprecated.**   
|
| Use[setLocalizedStartTimestamp](https://developer.android.com/reference/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setLocalizedStartTimestamp(com.google.android.engage.common.datamodel.LocalizedTimestamp))instead.

Sets the start timestamp for the availability time window in epoch milliseconds.

Required.