public final class TransitObject
extends com.google.api.client.json.GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Google Wallet API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
com.google.api.client.util.GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
TransitObject() |
| Modifier and Type | Method and Description |
|---|---|
TransitObject |
clone() |
ActivationStatus |
getActivationStatus()
The activation status for the object.
|
AppLinkData |
getAppLinkData()
Optional app or website link that will be displayed as a button on the front of the pass.
|
Barcode |
getBarcode()
The barcode type and value.
|
String |
getClassId()
Required.
|
TransitClass |
getClassReference()
A copy of the inherited fields of the parent class.
|
String |
getConcessionCategory()
The concession category for the ticket.
|
LocalizedString |
getCustomConcessionCategory()
A custom concession category to use when `concessionCategory` does not provide the right
option.
|
LocalizedString |
getCustomTicketStatus()
A custom status to use for the ticket status value when `ticketStatus` does not provide the
right option.
|
DeviceContext |
getDeviceContext()
Device context associated with the object.
|
Boolean |
getDisableExpirationNotification()
Indicates if notifications should explicitly be suppressed.
|
GroupingInfo |
getGroupingInfo()
Information that controls how passes are grouped together.
|
Boolean |
getHasLinkedDevice()
Whether this object is currently linked to a single device.
|
Boolean |
getHasUsers()
Indicates if the object has users.
|
Image |
getHeroImage()
Optional banner image displayed on the front of the card.
|
String |
getHexBackgroundColor()
The background color for the card.
|
String |
getId()
Required.
|
List<ImageModuleData> |
getImageModulesData()
Image module data.
|
InfoModuleData |
getInfoModuleData()
Deprecated.
|
List<String> |
getLinkedObjectIds()
linked_object_ids are a list of other objects such as event ticket, loyalty, offer, generic,
giftcard, transit and boarding pass that should be automatically attached to this transit
object.
|
LinksModuleData |
getLinksModuleData()
Links module data.
|
List<LatLongPoint> |
getLocations()
Note: This field is currently not supported to trigger geo notifications.
|
List<MerchantLocation> |
getMerchantLocations()
Merchant locations.
|
List<Message> |
getMessages()
An array of messages displayed in the app.
|
String |
getNotifyPreference()
Whether or not field updates to this object should trigger notifications.
|
PassConstraints |
getPassConstraints()
Pass constraints for the object.
|
String |
getPassengerNames()
The name(s) of the passengers the ticket is assigned to.
|
String |
getPassengerType()
The number of passengers.
|
PurchaseDetails |
getPurchaseDetails()
Purchase details for this ticket.
|
RotatingBarcode |
getRotatingBarcode()
The rotating barcode type and value.
|
SaveRestrictions |
getSaveRestrictions()
Restrictions on the object that needs to be verified before the user tries to save the pass.
|
String |
getSmartTapRedemptionValue()
The value that will be transmitted to a Smart Tap certified terminal over NFC for this object.
|
String |
getState()
Required.
|
List<TextModuleData> |
getTextModulesData()
Text module data.
|
TicketLeg |
getTicketLeg()
A single ticket leg contains departure and arrival information along with boarding and seating
information.
|
List<TicketLeg> |
getTicketLegs()
Each ticket may contain one or more legs.
|
String |
getTicketNumber()
The number of the ticket.
|
TicketRestrictions |
getTicketRestrictions()
Information about what kind of restrictions there are on using this ticket.
|
String |
getTicketStatus()
The status of the ticket.
|
String |
getTripId()
This id is used to group tickets together if the user has saved multiple tickets for the same
trip.
|
String |
getTripType()
Required.
|
TimeInterval |
getValidTimeInterval()
The time period this object will be `active` and object can be used.
|
List<ValueAddedModuleData> |
getValueAddedModuleData()
Optional value added module data.
|
Long |
getVersion()
Deprecated
|
TransitObject |
set(String fieldName,
Object value) |
TransitObject |
setActivationStatus(ActivationStatus activationStatus)
The activation status for the object.
|
TransitObject |
setAppLinkData(AppLinkData appLinkData)
Optional app or website link that will be displayed as a button on the front of the pass.
|
TransitObject |
setBarcode(Barcode barcode)
The barcode type and value.
|
TransitObject |
setClassId(String classId)
Required.
|
TransitObject |
setClassReference(TransitClass classReference)
A copy of the inherited fields of the parent class.
|
TransitObject |
setConcessionCategory(String concessionCategory)
The concession category for the ticket.
|
TransitObject |
setCustomConcessionCategory(LocalizedString customConcessionCategory)
A custom concession category to use when `concessionCategory` does not provide the right
option.
|
TransitObject |
setCustomTicketStatus(LocalizedString customTicketStatus)
A custom status to use for the ticket status value when `ticketStatus` does not provide the
right option.
|
TransitObject |
setDeviceContext(DeviceContext deviceContext)
Device context associated with the object.
|
TransitObject |
setDisableExpirationNotification(Boolean disableExpirationNotification)
Indicates if notifications should explicitly be suppressed.
|
TransitObject |
setGroupingInfo(GroupingInfo groupingInfo)
Information that controls how passes are grouped together.
|
TransitObject |
setHasLinkedDevice(Boolean hasLinkedDevice)
Whether this object is currently linked to a single device.
|
TransitObject |
setHasUsers(Boolean hasUsers)
Indicates if the object has users.
|
TransitObject |
setHeroImage(Image heroImage)
Optional banner image displayed on the front of the card.
|
TransitObject |
setHexBackgroundColor(String hexBackgroundColor)
The background color for the card.
|
TransitObject |
setId(String id)
Required.
|
TransitObject |
setImageModulesData(List<ImageModuleData> imageModulesData)
Image module data.
|
TransitObject |
setInfoModuleData(InfoModuleData infoModuleData)
Deprecated.
|
TransitObject |
setLinkedObjectIds(List<String> linkedObjectIds)
linked_object_ids are a list of other objects such as event ticket, loyalty, offer, generic,
giftcard, transit and boarding pass that should be automatically attached to this transit
object.
|
TransitObject |
setLinksModuleData(LinksModuleData linksModuleData)
Links module data.
|
TransitObject |
setLocations(List<LatLongPoint> locations)
Note: This field is currently not supported to trigger geo notifications.
|
TransitObject |
setMerchantLocations(List<MerchantLocation> merchantLocations)
Merchant locations.
|
TransitObject |
setMessages(List<Message> messages)
An array of messages displayed in the app.
|
TransitObject |
setNotifyPreference(String notifyPreference)
Whether or not field updates to this object should trigger notifications.
|
TransitObject |
setPassConstraints(PassConstraints passConstraints)
Pass constraints for the object.
|
TransitObject |
setPassengerNames(String passengerNames)
The name(s) of the passengers the ticket is assigned to.
|
TransitObject |
setPassengerType(String passengerType)
The number of passengers.
|
TransitObject |
setPurchaseDetails(PurchaseDetails purchaseDetails)
Purchase details for this ticket.
|
TransitObject |
setRotatingBarcode(RotatingBarcode rotatingBarcode)
The rotating barcode type and value.
|
TransitObject |
setSaveRestrictions(SaveRestrictions saveRestrictions)
Restrictions on the object that needs to be verified before the user tries to save the pass.
|
TransitObject |
setSmartTapRedemptionValue(String smartTapRedemptionValue)
The value that will be transmitted to a Smart Tap certified terminal over NFC for this object.
|
TransitObject |
setState(String state)
Required.
|
TransitObject |
setTextModulesData(List<TextModuleData> textModulesData)
Text module data.
|
TransitObject |
setTicketLeg(TicketLeg ticketLeg)
A single ticket leg contains departure and arrival information along with boarding and seating
information.
|
TransitObject |
setTicketLegs(List<TicketLeg> ticketLegs)
Each ticket may contain one or more legs.
|
TransitObject |
setTicketNumber(String ticketNumber)
The number of the ticket.
|
TransitObject |
setTicketRestrictions(TicketRestrictions ticketRestrictions)
Information about what kind of restrictions there are on using this ticket.
|
TransitObject |
setTicketStatus(String ticketStatus)
The status of the ticket.
|
TransitObject |
setTripId(String tripId)
This id is used to group tickets together if the user has saved multiple tickets for the same
trip.
|
TransitObject |
setTripType(String tripType)
Required.
|
TransitObject |
setValidTimeInterval(TimeInterval validTimeInterval)
The time period this object will be `active` and object can be used.
|
TransitObject |
setValueAddedModuleData(List<ValueAddedModuleData> valueAddedModuleData)
Optional value added module data.
|
TransitObject |
setVersion(Long version)
Deprecated
|
getFactory, setFactory, toPrettyString, toStringentrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic ActivationStatus getActivationStatus()
null for nonepublic TransitObject setActivationStatus(ActivationStatus activationStatus)
activationStatus - activationStatus or null for nonepublic AppLinkData getAppLinkData()
null for nonepublic TransitObject setAppLinkData(AppLinkData appLinkData)
appLinkData - appLinkData or null for nonepublic Barcode getBarcode()
null for nonepublic TransitObject setBarcode(Barcode barcode)
barcode - barcode or null for nonepublic String getClassId()
null for nonepublic TransitObject setClassId(String classId)
classId - classId or null for nonepublic TransitClass getClassReference()
null for nonepublic TransitObject setClassReference(TransitClass classReference)
classReference - classReference or null for nonepublic String getConcessionCategory()
null for nonepublic TransitObject setConcessionCategory(String concessionCategory)
concessionCategory - concessionCategory or null for nonepublic LocalizedString getCustomConcessionCategory()
null for nonepublic TransitObject setCustomConcessionCategory(LocalizedString customConcessionCategory)
customConcessionCategory - customConcessionCategory or null for nonepublic LocalizedString getCustomTicketStatus()
null for nonepublic TransitObject setCustomTicketStatus(LocalizedString customTicketStatus)
customTicketStatus - customTicketStatus or null for nonepublic DeviceContext getDeviceContext()
null for nonepublic TransitObject setDeviceContext(DeviceContext deviceContext)
deviceContext - deviceContext or null for nonepublic Boolean getDisableExpirationNotification()
null for nonepublic TransitObject setDisableExpirationNotification(Boolean disableExpirationNotification)
disableExpirationNotification - disableExpirationNotification or null for nonepublic GroupingInfo getGroupingInfo()
null for nonepublic TransitObject setGroupingInfo(GroupingInfo groupingInfo)
groupingInfo - groupingInfo or null for nonepublic Boolean getHasLinkedDevice()
null for nonepublic TransitObject setHasLinkedDevice(Boolean hasLinkedDevice)
hasLinkedDevice - hasLinkedDevice or null for nonepublic Boolean getHasUsers()
null for nonepublic TransitObject setHasUsers(Boolean hasUsers)
hasUsers - hasUsers or null for nonepublic Image getHeroImage()
null for nonepublic TransitObject setHeroImage(Image heroImage)
heroImage - heroImage or null for nonepublic String getHexBackgroundColor()
null for nonepublic TransitObject setHexBackgroundColor(String hexBackgroundColor)
hexBackgroundColor - hexBackgroundColor or null for nonepublic String getId()
null for nonepublic TransitObject setId(String id)
id - id or null for nonepublic List<ImageModuleData> getImageModulesData()
null for nonepublic TransitObject setImageModulesData(List<ImageModuleData> imageModulesData)
imageModulesData - imageModulesData or null for nonepublic InfoModuleData getInfoModuleData()
null for nonepublic TransitObject setInfoModuleData(InfoModuleData infoModuleData)
infoModuleData - infoModuleData or null for nonepublic List<String> getLinkedObjectIds()
null for nonepublic TransitObject setLinkedObjectIds(List<String> linkedObjectIds)
linkedObjectIds - linkedObjectIds or null for nonepublic LinksModuleData getLinksModuleData()
null for nonepublic TransitObject setLinksModuleData(LinksModuleData linksModuleData)
linksModuleData - linksModuleData or null for nonepublic List<LatLongPoint> getLocations()
null for nonepublic TransitObject setLocations(List<LatLongPoint> locations)
locations - locations or null for nonepublic List<MerchantLocation> getMerchantLocations()
null for nonepublic TransitObject setMerchantLocations(List<MerchantLocation> merchantLocations)
merchantLocations - merchantLocations or null for nonepublic List<Message> getMessages()
null for nonepublic TransitObject setMessages(List<Message> messages)
messages - messages or null for nonepublic String getNotifyPreference()
null for nonepublic TransitObject setNotifyPreference(String notifyPreference)
notifyPreference - notifyPreference or null for nonepublic PassConstraints getPassConstraints()
null for nonepublic TransitObject setPassConstraints(PassConstraints passConstraints)
passConstraints - passConstraints or null for nonepublic String getPassengerNames()
null for nonepublic TransitObject setPassengerNames(String passengerNames)
passengerNames - passengerNames or null for nonepublic String getPassengerType()
null for nonepublic TransitObject setPassengerType(String passengerType)
passengerType - passengerType or null for nonepublic PurchaseDetails getPurchaseDetails()
null for nonepublic TransitObject setPurchaseDetails(PurchaseDetails purchaseDetails)
purchaseDetails - purchaseDetails or null for nonepublic RotatingBarcode getRotatingBarcode()
null for nonepublic TransitObject setRotatingBarcode(RotatingBarcode rotatingBarcode)
rotatingBarcode - rotatingBarcode or null for nonepublic SaveRestrictions getSaveRestrictions()
null for nonepublic TransitObject setSaveRestrictions(SaveRestrictions saveRestrictions)
saveRestrictions - saveRestrictions or null for nonepublic String getSmartTapRedemptionValue()
null for nonepublic TransitObject setSmartTapRedemptionValue(String smartTapRedemptionValue)
smartTapRedemptionValue - smartTapRedemptionValue or null for nonepublic String getState()
null for nonepublic TransitObject setState(String state)
state - state or null for nonepublic List<TextModuleData> getTextModulesData()
null for nonepublic TransitObject setTextModulesData(List<TextModuleData> textModulesData)
textModulesData - textModulesData or null for nonepublic TicketLeg getTicketLeg()
null for nonepublic TransitObject setTicketLeg(TicketLeg ticketLeg)
ticketLeg - ticketLeg or null for nonepublic List<TicketLeg> getTicketLegs()
null for nonepublic TransitObject setTicketLegs(List<TicketLeg> ticketLegs)
ticketLegs - ticketLegs or null for nonepublic String getTicketNumber()
null for nonepublic TransitObject setTicketNumber(String ticketNumber)
ticketNumber - ticketNumber or null for nonepublic TicketRestrictions getTicketRestrictions()
null for nonepublic TransitObject setTicketRestrictions(TicketRestrictions ticketRestrictions)
ticketRestrictions - ticketRestrictions or null for nonepublic String getTicketStatus()
null for nonepublic TransitObject setTicketStatus(String ticketStatus)
ticketStatus - ticketStatus or null for nonepublic String getTripId()
null for nonepublic TransitObject setTripId(String tripId)
tripId - tripId or null for nonepublic String getTripType()
null for nonepublic TransitObject setTripType(String tripType)
tripType - tripType or null for nonepublic TimeInterval getValidTimeInterval()
null for nonepublic TransitObject setValidTimeInterval(TimeInterval validTimeInterval)
validTimeInterval - validTimeInterval or null for nonepublic List<ValueAddedModuleData> getValueAddedModuleData()
null for nonepublic TransitObject setValueAddedModuleData(List<ValueAddedModuleData> valueAddedModuleData)
valueAddedModuleData - valueAddedModuleData or null for nonepublic Long getVersion()
null for nonepublic TransitObject setVersion(Long version)
version - version or null for nonepublic TransitObject set(String fieldName, Object value)
set in class com.google.api.client.json.GenericJsonpublic TransitObject clone()
clone in class com.google.api.client.json.GenericJsonCopyright © 2011–2025 Google. All rights reserved.