GoogleRidesharingConsumer Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMTSVehicleMatch
Object that contains the vehicle’s information, ETA, and distance
calculations for a vehicle that matches the SearchVehiclesRequest
.
-
The related vehicle information.
Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) GMTSVehicle *vehicle;
-
The timestamp of the pickup ETA.
Declaration
Swift
var pickupETA: TimeInterval { get }
Objective-C
@property (nonatomic, readonly) NSTimeInterval pickupETA;
-
The distance from current location to the pickup location.
Declaration
Swift
var pickupDistanceInMeters: Int32 { get }
Objective-C
@property (nonatomic, readonly) int32_t pickupDistanceInMeters;
-
The timestamp of the drop off ETA.
Declaration
Swift
var dropoffETA: TimeInterval { get }
Objective-C
@property (nonatomic, readonly) NSTimeInterval dropoffETA;
-
The distance from pickup to drop off.
Declaration
Swift
var pickupToDropoffDistanceInMeters: Int32 { get }
Objective-C
@property (nonatomic, readonly) int32_t pickupToDropoffDistanceInMeters;
-
The trip type of the vehicle.
Declaration
Objective-C
@property (nonatomic, readonly) enum GMTSTripType tripType;
-
Deprecated
GMTSVehicleMatch is deprecated.
Initialization of the object.
Declaration
Swift
init(vehicle: GMTSVehicle?, pickupETA: TimeInterval, pickupDistance: Int32, dropoffETA: TimeInterval, pickupToDropoffDistance: Int32, tripType: GMTSTripType)
Objective-C
- (nonnull instancetype)initWithVehicle:(nullable GMTSVehicle *)vehicle
pickupETA:(NSTimeInterval)pickupETA
pickupDistance:(int32_t)pickupDistance
dropoffETA:(NSTimeInterval)dropoffETA
pickupToDropoffDistance:(int32_t)pickupToDropoffDistance
tripType:(enum GMTSTripType)tripType;
Parameters
vehicle
|
|
pickupETA
|
The timestamp of the pickup ETA.
|
pickupDistance
|
The distance from current location to the pickup point.
|
dropoffETA
|
The timestamp of the drop off ETA.
|
pickupToDropoffDistance
|
The distance from pickup to drop off.
|
tripType
|
|
-
Use initWithVehicle:vehiclePickupETA:vehicleDropoffETA:vehiclePickupToDropoffDistance:tripType:
instead.
Declaration
Objective-C
- (nonnull instancetype)init;
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\u003eGMTSVehicleMatch\u003c/code\u003e provides details about a vehicle matching a \u003ccode\u003eSearchVehiclesRequest\u003c/code\u003e, including vehicle information, ETA, and distance calculations.\u003c/p\u003e\n"],["\u003cp\u003eThe object contains properties for \u003ccode\u003evehicle\u003c/code\u003e details, \u003ccode\u003epickupETA\u003c/code\u003e, \u003ccode\u003epickupDistanceInMeters\u003c/code\u003e, \u003ccode\u003edropoffETA\u003c/code\u003e, \u003ccode\u003epickupToDropoffDistanceInMeters\u003c/code\u003e, and \u003ccode\u003etripType\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt allows for retrieving timestamps for both pickup and drop-off ETAs, which are represented as \u003ccode\u003eTimeInterval\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDistance information is available for the distance from the current location to the pickup point, as well as the distance from pickup to drop-off, represented as \u003ccode\u003eInt32\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003einitWithVehicle:pickupETA:pickupDistance:dropoffETA:pickupToDropoffDistance:tripType:\u003c/code\u003e method is deprecated for initializing \u003ccode\u003eGMTSVehicleMatch\u003c/code\u003e objects, it is recommended to use the \u003ccode\u003einitWithVehicle:vehiclePickupETA:vehicleDropoffETA:vehiclePickupToDropoffDistance:tripType:\u003c/code\u003e method instead.\u003c/p\u003e\n"]]],[],null,["# GoogleRidesharingConsumer Framework Reference\n\nGMTSVehicleMatch\n================\n\n @interface GMTSVehicleMatch : ../Classes/GMTCImmutableData.html\n\nObject that contains the vehicle's information, ETA, and distance\ncalculations for a vehicle that matches the `SearchVehiclesRequest`.\n- `\n ``\n ``\n `\n\n ### [vehicle](#/c:objc(cs)GMTSVehicleMatch(py)vehicle)\n\n `\n ` \n The related vehicle information. \n\n #### Declaration\n\n Swift \n\n @NSCopying var vehicle: ../Classes/GMTSVehicle.html? { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly, nullable) ../Classes/GMTSVehicle.html *vehicle;\n\n- `\n ``\n ``\n `\n\n ### [pickupETA](#/c:objc(cs)GMTSVehicleMatch(py)pickupETA)\n\n `\n ` \n The timestamp of the pickup ETA. \n\n #### Declaration\n\n Swift \n\n var pickupETA: TimeInterval { get }\n\n Objective-C \n\n @property (nonatomic, readonly) NSTimeInterval pickupETA;\n\n- `\n ``\n ``\n `\n\n ### [pickupDistanceInMeters](#/c:objc(cs)GMTSVehicleMatch(py)pickupDistanceInMeters)\n\n `\n ` \n The distance from current location to the pickup location. \n\n #### Declaration\n\n Swift \n\n var pickupDistanceInMeters: Int32 { get }\n\n Objective-C \n\n @property (nonatomic, readonly) int32_t pickupDistanceInMeters;\n\n- `\n ``\n ``\n `\n\n ### [dropoffETA](#/c:objc(cs)GMTSVehicleMatch(py)dropoffETA)\n\n `\n ` \n The timestamp of the drop off ETA. \n\n #### Declaration\n\n Swift \n\n var dropoffETA: TimeInterval { get }\n\n Objective-C \n\n @property (nonatomic, readonly) NSTimeInterval dropoffETA;\n\n- `\n ``\n ``\n `\n\n ### [pickupToDropoffDistanceInMeters](#/c:objc(cs)GMTSVehicleMatch(py)pickupToDropoffDistanceInMeters)\n\n `\n ` \n The distance from pickup to drop off. \n\n #### Declaration\n\n Swift \n\n var pickupToDropoffDistanceInMeters: Int32 { get }\n\n Objective-C \n\n @property (nonatomic, readonly) int32_t pickupToDropoffDistanceInMeters;\n\n- `\n ``\n ``\n `\n\n ### [tripType](#/c:objc(cs)GMTSVehicleMatch(py)tripType)\n\n `\n ` \n The trip type of the vehicle. \n\n #### Declaration\n\n Swift \n\n var tripType: ../Enums/GMTSTripType.html { get }\n\n Objective-C \n\n @property (nonatomic, readonly) enum ../Enums/GMTSTripType.html tripType;\n\n- `\n ``\n ``\n `\n\n ### [-initWithVehicle:pickupETA:pickupDistance:dropoffETA:pickupToDropoffDistance:tripType:](#/c:objc(cs)GMTSVehicleMatch(im)initWithVehicle:pickupETA:pickupDistance:dropoffETA:pickupToDropoffDistance:tripType:)\n\n `\n ` \n Deprecated\n\n GMTSVehicleMatch is deprecated. \n Initialization of the object. \n\n #### Declaration\n\n Swift \n\n init(vehicle: ../Classes/GMTSVehicle.html?, pickupETA: TimeInterval, pickupDistance: Int32, dropoffETA: TimeInterval, pickupToDropoffDistance: Int32, tripType: ../Enums/GMTSTripType.html)\n\n Objective-C \n\n - (nonnull instancetype)initWithVehicle:(nullable ../Classes/GMTSVehicle.html *)vehicle\n pickupETA:(NSTimeInterval)pickupETA\n pickupDistance:(int32_t)pickupDistance\n dropoffETA:(NSTimeInterval)dropoffETA\n pickupToDropoffDistance:(int32_t)pickupToDropoffDistance\n tripType:(enum ../Enums/GMTSTripType.html)tripType;\n\n #### Parameters\n\n |---------------------------------|---------------------------------------------------------|\n | ` `*vehicle*` ` | The vehicle data. |\n | ` `*pickupETA*` ` | The timestamp of the pickup ETA. |\n | ` `*pickupDistance*` ` | The distance from current location to the pickup point. |\n | ` `*dropoffETA*` ` | The timestamp of the drop off ETA. |\n | ` `*pickupToDropoffDistance*` ` | The distance from pickup to drop off. |\n | ` `*tripType*` ` | The trip type. |\n\n- `\n ``\n ``\n `\n\n ### [-init](#/c:objc(cs)GMTSVehicleMatch(im)init)\n\n `\n ` \n Unavailable \n Use `initWithVehicle:vehiclePickupETA:vehicleDropoffETA:vehiclePickupToDropoffDistance:tripType:`\n instead. \n\n #### Declaration\n\n Objective-C \n\n - (nonnull instancetype)init;"]]