TripUpdateError
Stay organized with collections
Save and categorize content based on your preferences.
Contains metadata of a failed trip update.
Public Constructor Summary
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Constants
public static final long
DEFAULT_EVENT_DURATION
Public Constructors
public TripUpdateError ()
Public Methods
public abstract long getDurationMillis ()
Gets elapsed time from the start of the update event to the error.
public abstract String getMessage ()
public abstract Status.Code
getStatusCode ()
Gets gRPC call status code.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eTripUpdateError\u003c/code\u003e is an abstract class that holds metadata about a failed trip update.\u003c/p\u003e\n"],["\u003cp\u003eIt provides access to the error message, gRPC status code, and the duration of the update event leading to the error.\u003c/p\u003e\n"],["\u003cp\u003eA builder class (\u003ccode\u003eTripUpdateError.Builder\u003c/code\u003e) is available for creating instances of \u003ccode\u003eTripUpdateError\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIf the duration of the update event isn't recorded, \u003ccode\u003egetDurationMillis()\u003c/code\u003e will return 0, represented by the constant \u003ccode\u003eDEFAULT_EVENT_DURATION\u003c/code\u003e.\u003c/p\u003e\n"]]],["`TripUpdateError` provides metadata for failed trip updates. It offers methods to retrieve the error's message (`getMessage`), the gRPC status code (`getStatusCode`), and the duration in milliseconds from the update's start to the error (`getDurationMillis`). A `builder()` method creates `TripUpdateError.Builder` instances, while `toBuilder()` generates a builder from an existing `TripUpdateError`. `DEFAULT_EVENT_DURATION` constant represents that, if not recorded the duration will be `0`.\n"],null,["# TripUpdateError\n\npublic abstract class **TripUpdateError** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nContains metadata of a failed trip update. \n\n### Nested Class Summary\n\n|-------|---|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| class | [TripUpdateError.Builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripUpdateError.Builder) || Builds [TripUpdateError](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripUpdateError) instance. |\n\n### Constant Summary\n\n|------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| long | [DEFAULT_EVENT_DURATION](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripUpdateError#DEFAULT_EVENT_DURATION) | If update event duration wasn't recorded, `0` will be returned when calling [getDurationMillis()](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripUpdateError#getDurationMillis()). |\n\n### Public Constructor Summary\n\n|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [TripUpdateError](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripUpdateError#TripUpdateError())() |\n\n### Public Method Summary\n\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| static [TripUpdateError.Builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripUpdateError.Builder) | [builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripUpdateError#builder())() |\n| abstract long | [getDurationMillis](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripUpdateError#getDurationMillis())() Gets elapsed time from the start of the update event to the error. |\n| abstract [String](//developer.android.com/reference/java/lang/String.html) | [getMessage](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripUpdateError#getMessage())() Gets error message. |\n| abstract Status.Code | [getStatusCode](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripUpdateError#getStatusCode())() Gets gRPC call status code. |\n| abstract [TripUpdateError.Builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripUpdateError.Builder) | [toBuilder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripUpdateError#toBuilder())() |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nConstants\n---------\n\n#### public static final long\n**DEFAULT_EVENT_DURATION**\n\nIf update event duration wasn't recorded, `0` will be returned when\ncalling [getDurationMillis()](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripUpdateError#getDurationMillis()). \nConstant Value: 0\n\nPublic Constructors\n-------------------\n\n#### public **TripUpdateError** ()\n\nPublic Methods\n--------------\n\n#### public static [TripUpdateError.Builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripUpdateError.Builder) **builder**\n()\n\n#### public abstract long **getDurationMillis** ()\n\nGets elapsed time from the start of the update event to the error. \n\n#### public abstract [String](//developer.android.com/reference/java/lang/String.html) **getMessage** ()\n\nGets error message. \n\n#### public abstract Status.Code\n**getStatusCode** ()\n\nGets gRPC call status code. \n\n#### public abstract [TripUpdateError.Builder](/maps/documentation/mobility/journey-sharing/on-demand/reference/consumer_2/android/reference/com/google/android/libraries/mapsplatform/transportation/consumer/model/TripUpdateError.Builder) **toBuilder**\n()"]]