# TransportationReservationEntity

# TransportationReservationEntity

*** ** * ** ***

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

<br />

```
public final class TransportationReservationEntity extends Entity
```

<br />

|---|---|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)                                                                                                                      |||
| ↳ | [com.google.android.engage.common.datamodel.Entity](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Entity)                                                      ||
|   | ↳ | [com.google.android.engage.travel.datamodel.TransportationReservationEntity](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity) |

*** ** * ** ***

An object representing a transportation reservation entity.

## Summary

|                                                                                                                                                                          ### Nested types                                                                                                                                                                          |
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `public final class `[TransportationReservationEntity.Builder](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity.Builder) Builder class for[TransportationReservationEntity](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity). |

|                                                                                                               ### Public fields                                                                                                               |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `final `[Long](https://developer.android.com/reference/java/lang/Long.html)                                                                                                                                                                   | [arrivalTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#arrivalTime()) **This field is deprecated.** Use[localizedArrivalTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#localizedArrivalTime())instead. <br />         |
| `final `[Long](https://developer.android.com/reference/java/lang/Long.html)                                                                                                                                                                   | [departureTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#departureTime()) **This field is deprecated.** Use[localizedDepartureTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#localizedDepartureTime())instead. <br /> |
| `final `[ImmutableList](https://guava.dev/releases/21.0/api/docs/com/google/common/collect/ImmutableList.html)`<`[DisplayTimeWindow](https://developer.android.com/reference/com/google/android/engage/common/datamodel/DisplayTimeWindow)`>` | [displayTimeWindows](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#displayTimeWindows())                                                                                                                                                                                                             |
| `final `[LocalizedTimestamp](https://developer.android.com/reference/com/google/android/engage/common/datamodel/LocalizedTimestamp)                                                                                                           | [localizedArrivalTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#localizedArrivalTime())                                                                                                                                                                                                         |
| `final `[LocalizedTimestamp](https://developer.android.com/reference/com/google/android/engage/common/datamodel/LocalizedTimestamp)                                                                                                           | [localizedDepartureTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#localizedDepartureTime())                                                                                                                                                                                                     |
| `final int`                                                                                                                                                                                                                                   | `@`[TransportationType](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationType) [transportationType](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#transportationType())                                                                              |

|                                                                                                          ### Public methods                                                                                                           |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Uri](https://developer.android.com/reference/android/net/Uri.html)                                                                                                                                                                   | [getActionUri](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getActionUri())`()` Returns the action uri of the entity.                                                                                                                                                                                                                               |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Address](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Address)`>`                                  | [getArrivalLocation](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getArrivalLocation())`()` Returns the arrival location of the transportation reservation entity.                                                                                                                                                                                  |
| [Long](https://developer.android.com/reference/java/lang/Long.html)                                                                                                                                                                   | ~~[getArrivalTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getArrivalTime())~~`()` **This method is deprecated.** Use[getLocalizedArrivalTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getLocalizedArrivalTime())instead. <br />                                    |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Long](https://developer.android.com/reference/java/lang/Long.html)`>`                                                                    | ~~[getBoardingTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getBoardingTime())~~`()` **This method is deprecated.** Use[getLocalizedBoardingTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getLocalizedBoardingTime())instead. <br />                                |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Address](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Address)`>`                                  | [getDepartureLocation](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getDepartureLocation())`()` Returns the departure location of the transportation reservation entity.                                                                                                                                                                            |
| [Long](https://developer.android.com/reference/java/lang/Long.html)                                                                                                                                                                   | ~~[getDepartureTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getDepartureTime())~~`()` **This method is deprecated.** Use[getLocalizedDepartureTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getLocalizedDepartureTime())instead. <br />                            |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[String](https://developer.android.com/reference/java/lang/String.html)`>`                                                                | [getDescription](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getDescription())`()` Returns the description (typically a single paragraph of text) for the transportation reservation entity.                                                                                                                                                       |
| [ImmutableList](https://guava.dev/releases/21.0/api/docs/com/google/common/collect/ImmutableList.html)`<`[DisplayTimeWindow](https://developer.android.com/reference/com/google/android/engage/common/datamodel/DisplayTimeWindow)`>` | [getDisplayTimeWindows](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getDisplayTimeWindows())`()` Returns the display time windows associated with the transportation reservation entity.                                                                                                                                                           |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[String](https://developer.android.com/reference/java/lang/String.html)`>`                                                                | [getEntityId](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getEntityId())`()` Returns the reservation id of the entity.                                                                                                                                                                                                                             |
| [LocalizedTimestamp](https://developer.android.com/reference/com/google/android/engage/common/datamodel/LocalizedTimestamp)                                                                                                           | [getLocalizedArrivalTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getLocalizedArrivalTime())`()` Returns the localized timestamp of arrival time for the transportation reservation entity.                                                                                                                                                    |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[LocalizedTimestamp](https://developer.android.com/reference/com/google/android/engage/common/datamodel/LocalizedTimestamp)`>`            | [getLocalizedBoardingTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getLocalizedBoardingTime())`()` Returns the localized timestamp of the boarding time for the transportation reservation entity.                                                                                                                                             |
| [LocalizedTimestamp](https://developer.android.com/reference/com/google/android/engage/common/datamodel/LocalizedTimestamp)                                                                                                           | [getLocalizedDepartureTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getLocalizedDepartureTime())`()` Returns the localized timestamp of departure time for the transportation reservation entity.                                                                                                                                              |
| [List](https://developer.android.com/reference/java/util/List.html)`<`[Image](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Image)`>`                                                            | [getPosterImages](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getPosterImages())`()` Returns the poster image of the entity.                                                                                                                                                                                                                       |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[Price](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Price)`>`                                      | [getPrice](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getPrice())`()` Returns the price of the transportation reservation entity.                                                                                                                                                                                                                 |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[String](https://developer.android.com/reference/java/lang/String.html)`>`                                                                | [getPriceCallout](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getPriceCallout())`()` Returns the price callout text for the transportation reservation entity.                                                                                                                                                                                     |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[String](https://developer.android.com/reference/java/lang/String.html)`>`                                                                | [getReservationId](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getReservationId())`()` Returns the reservation ID of the entity.                                                                                                                                                                                                                   |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[ServiceProvider](https://developer.android.com/reference/com/google/android/engage/common/datamodel/ServiceProvider)`>`                  | [getServiceProvider](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getServiceProvider())`()` Returns the service provider of the transportation reservation entity.                                                                                                                                                                                  |
| [List](https://developer.android.com/reference/java/util/List.html)`<`[String](https://developer.android.com/reference/java/lang/String.html)`>`                                                                                      | [getSubtitleList](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getSubtitleList())`()` Returns the list of subtitles for the Reservation entity.                                                                                                                                                                                                     |
| [String](https://developer.android.com/reference/java/lang/String.html)                                                                                                                                                               | [getTitle](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getTitle())`()` Returns the name/title of the transportation reservation Entity.                                                                                                                                                                                                            |
| [Optional](https://guava.dev/releases/21.0/api/docs/com/google/common/base/Optional.html)`<`[String](https://developer.android.com/reference/java/lang/String.html)`>`                                                                | [getTransportationNumber](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getTransportationNumber())`()` Returns the transportation number (e.g. flight number, bus number, train number, ferry name/number) of the transportation reservation entity.                                                                                                 |
| `int`                                                                                                                                                                                                                                 | `@`[TransportationType](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationType) [getTransportationType](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getTransportationType())`()` Returns the type of the transportation (flight, bus, train, ferry etc.) for the transportation reservation entity. |

|                                                                                                                                                                                                          ### Inherited methods                                                                                                                                                                                                           |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[com.google.android.engage.common.datamodel.Entity](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Entity) |-------|--------------------------------------------------------------------------------------------------------------------------------| | `int` | [getEntityType](https://developer.android.com/reference/com/google/android/engage/common/datamodel/Entity#getEntityType())`()` | |

## Public fields

### arrivalTime

```
public final Long arrivalTime
```
| **This field is deprecated.**   
|
Use[localizedArrivalTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#localizedArrivalTime())instead.  

### departureTime

```
public final Long departureTime
```
| **This field is deprecated.**   
|
Use[localizedDepartureTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#localizedDepartureTime())instead.  

### displayTimeWindows

```
public final ImmutableList<DisplayTimeWindow> displayTimeWindows
```  

### localizedArrivalTime

```
public final LocalizedTimestamp localizedArrivalTime
```  

### localizedDepartureTime

```
public final LocalizedTimestamp localizedDepartureTime
```  

### transportationType

```
@TransportationType
public final int transportationType
```  

## Public methods

### getActionUri

```
public Uri getActionUri()
```

Returns the action uri of the entity.  

### getArrivalLocation

```
public Optional<Address> getArrivalLocation()
```

Returns the arrival location of the transportation reservation entity.  

### getArrivalTime

```
public Long [getArrivalTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getArrivalTime())()
```
| **This method is deprecated.**   
|
| Use[getLocalizedArrivalTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getLocalizedArrivalTime())instead.

Returns the epoch timestamp (in milliseconds) of arrival time for the transportation reservation entity.  

### getBoardingTime

```
public Optional<Long> [getBoardingTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getBoardingTime())()
```
| **This method is deprecated.**   
|
| Use[getLocalizedBoardingTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getLocalizedBoardingTime())instead.

Returns the epoch timestamp (in milliseconds) of boarding time for the transportation reservation entity.  

### getDepartureLocation

```
public Optional<Address> getDepartureLocation()
```

Returns the departure location of the transportation reservation entity.  

### getDepartureTime

```
public Long [getDepartureTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getDepartureTime())()
```
| **This method is deprecated.**   
|
| Use[getLocalizedDepartureTime](https://developer.android.com/reference/com/google/android/engage/travel/datamodel/TransportationReservationEntity#getLocalizedDepartureTime())instead.

Returns the epoch timestamp (in milliseconds) of departure time for the transportation reservation entity.  

### getDescription

```
public Optional<String> getDescription()
```

Returns the description (typically a single paragraph of text) for the transportation reservation entity.  

### getDisplayTimeWindows

```
public ImmutableList<DisplayTimeWindow> getDisplayTimeWindows()
```

Returns the display time windows associated with the transportation reservation entity.  

### getEntityId

```
public Optional<String> getEntityId()
```

Returns the reservation id of the entity.  

### getLocalizedArrivalTime

```
public LocalizedTimestamp getLocalizedArrivalTime()
```

Returns the localized timestamp of arrival time for the transportation reservation entity.  

### getLocalizedBoardingTime

```
public Optional<LocalizedTimestamp> getLocalizedBoardingTime()
```

Returns the localized timestamp of the boarding time for the transportation reservation entity.  

### getLocalizedDepartureTime

```
public LocalizedTimestamp getLocalizedDepartureTime()
```

Returns the localized timestamp of departure time for the transportation reservation entity.  

### getPosterImages

```
public List<Image> getPosterImages()
```

Returns the poster image of the entity.  

### getPrice

```
public Optional<Price> getPrice()
```

Returns the price of the transportation reservation entity.  

### getPriceCallout

```
public Optional<String> getPriceCallout()
```

Returns the price callout text for the transportation reservation entity.  

### getReservationId

```
public Optional<String> getReservationId()
```

Returns the reservation ID of the entity.  

### getServiceProvider

```
public Optional<ServiceProvider> getServiceProvider()
```

Returns the service provider of the transportation reservation entity.  

### getSubtitleList

```
public List<String> getSubtitleList()
```

Returns the list of subtitles for the Reservation entity.  

### getTitle

```
public String getTitle()
```

Returns the name/title of the transportation reservation Entity.  

### getTransportationNumber

```
public Optional<String> getTransportationNumber()
```

Returns the transportation number (e.g. flight number, bus number, train number, ferry name/number) of the transportation reservation entity.  

### getTransportationType

```
@TransportationType
public int getTransportationType()
```

Returns the type of the transportation (flight, bus, train, ferry etc.) for the transportation reservation entity.