GMTSVehicle
@interface GMTSVehicle : GMTCImmutableData
Object that contains functional data related to a vehicle. This data can be profile data, such as the max capacity, or tracking data, such as current trips and location.
-
The name of the vehicle.
Declaration
Swift
var vehicleName: String? { get }
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *vehicleName;
-
The vehicle state, see
GMTSVehicleState
for all the options.Declaration
Swift
var vehicleState: GMTSVehicleState { get }
Objective-C
@property (nonatomic, readonly) GMTSVehicleState vehicleState;
-
Supported trip types, see
GMTSVehicleSupportedTripTypes
for all the options.Declaration
Swift
var supportedTripTypes: GMTSVehicleSupportedTripTypes { get }
Objective-C
@property (nonatomic, readonly) GMTSVehicleSupportedTripTypes supportedTripTypes;
-
An array contains all the current trip ID.
Declaration
Swift
var currentTrips: [String]? { get }
Objective-C
@property (nonatomic, copy, readonly, nullable) NSArray<NSString *> *currentTrips;
-
The last location of the vehicle.
Declaration
Swift
@NSCopying var lastLocation: GMTSVehicleLocation? { get }
Objective-C
@property (nonatomic, copy, readonly, nullable) GMTSVehicleLocation *lastLocation;
-
The maximum capacity.
Declaration
Swift
var maximumCapacity: Int32 { get }
Objective-C
@property (nonatomic, readonly) int32_t maximumCapacity;
-
An array contains all the vehicle attributes.
Declaration
Swift
var attributes: [GMTSVehicleAttributeKeyValuePair]? { get }
Objective-C
@property (nonatomic, copy, readonly, nullable) NSArray<GMTSVehicleAttributeKeyValuePair *> *attributes;
-
The vehicle type information.
Declaration
Swift
@NSCopying var vehicleType: GMTSVehicleType { get }
Objective-C
@property (nonatomic, copy, readonly) GMTSVehicleType *_Nonnull vehicleType;
-
-initWithvehicleName:vehicleState:supportedTripTypes:currentTrips:lastLocation:maximumCapacity:attributes:vehicleType:
Initialization of the object.
Declaration
Swift
init(vehicleName: String?, vehicleState: GMTSVehicleState, supportedTripTypes: GMTSVehicleSupportedTripTypes, currentTrips: [String]?, last lastLocation: GMTSVehicleLocation?, maximumCapacity: Int32, attributes: [GMTSVehicleAttributeKeyValuePair]?, vehicleType: GMTSVehicleType)
Objective-C
- (nonnull instancetype) initWithvehicleName:(nullable NSString *)vehicleName vehicleState:(GMTSVehicleState)vehicleState supportedTripTypes:(GMTSVehicleSupportedTripTypes)supportedTripTypes currentTrips:(nullable NSArray<NSString *> *)currentTrips lastLocation:(nullable GMTSVehicleLocation *)lastLocation maximumCapacity:(int32_t)maximumCapacity attributes:(nullable NSArray<GMTSVehicleAttributeKeyValuePair *> *) attributes vehicleType:(nonnull GMTSVehicleType *)vehicleType;
Parameters
vehicleName
The name of the vehicle.
vehicleState
The vehicle state, see
GMTSVehicleState
for all the options.supportedTripTypes
All the supported trip types.
currentTrips
An array contains all the current trip ID.
lastLocation
The last location of the vehicle.
maximumCapacity
The maximum capacity.
attributes
A dictionary contains all the vehicle attributes.
vehicleType
The vehicle type information.
-
Unavailable
Will return nil. Use
-initWithvehicleName:vehicleState:supportedTripTypes:currentTrips:lastLocation: maximumCapacity:attributes:vehicleType:
instead.Declaration
Objective-C
- (nonnull instancetype)init;