# AvailabilityTimeWindow.Builder

# AvailabilityTimeWindow.Builder

*** ** * ** ***

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

<br />

```
class AvailabilityTimeWindow.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

|                                                                     ### Public functions                                                                      |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [AvailabilityTimeWindow](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/AvailabilityTimeWindow)`!`                 | [build](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#build())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| [AvailabilityTimeWindow.Builder](https://developer.android.com/reference/kotlin/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/kotlin/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setEndTimestampMillis(long))~~`(endTimestampMillis: `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` **This function is deprecated.** Use[setLocalizedEndTimestamp](https://developer.android.com/reference/kotlin/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/kotlin/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/kotlin/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setLocalizedEndTimestamp(com.google.android.engage.common.datamodel.LocalizedTimestamp))`(localizedEndTimestamp: `[LocalizedTimestamp](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/LocalizedTimestamp)`!)` Sets the localized end timestamp for the availability time window.                                                                                                                   |
| [AvailabilityTimeWindow.Builder](https://developer.android.com/reference/kotlin/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/kotlin/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setLocalizedStartTimestamp(com.google.android.engage.common.datamodel.LocalizedTimestamp))`(localizedStartTimestamp: `[LocalizedTimestamp](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/LocalizedTimestamp)`!)` Sets the localized start timestamp for the availability time window.                                                                                                           |
| [AvailabilityTimeWindow.Builder](https://developer.android.com/reference/kotlin/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/kotlin/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setStartTimestampMillis(long))~~`(startTimestampMillis: `[Long](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html)`)` **This function is deprecated.** Use[setLocalizedStartTimestamp](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setLocalizedStartTimestamp(com.google.android.engage.common.datamodel.LocalizedTimestamp))instead. <br /> |

## Public constructors

### Builder

```
Builder()
```  

## Public functions

### build

```
fun build(): AvailabilityTimeWindow!
```  

### setEndTimestampMillis

```
@CanIgnoreReturnValue
fun [setEndTimestampMillis](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setEndTimestampMillis(long))(endTimestampMillis: Long): AvailabilityTimeWindow.Builder!
```
| **This function is deprecated.**   
|
| Use[setLocalizedEndTimestamp](https://developer.android.com/reference/kotlin/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
fun setLocalizedEndTimestamp(localizedEndTimestamp: LocalizedTimestamp!): AvailabilityTimeWindow.Builder!
```

Sets the localized end timestamp for the availability time window.

Required.  

### setLocalizedStartTimestamp

```
@CanIgnoreReturnValue
fun setLocalizedStartTimestamp(localizedStartTimestamp: LocalizedTimestamp!): AvailabilityTimeWindow.Builder!
```

Sets the localized start timestamp for the availability time window.

Required.  

### setStartTimestampMillis

```
@CanIgnoreReturnValue
fun [setStartTimestampMillis](https://developer.android.com/reference/kotlin/com/google/android/engage/common/datamodel/AvailabilityTimeWindow.Builder#setStartTimestampMillis(long))(startTimestampMillis: Long): AvailabilityTimeWindow.Builder!
```
| **This function is deprecated.**   
|
| Use[setLocalizedStartTimestamp](https://developer.android.com/reference/kotlin/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.