AI-generated Key Takeaways
-
GMTSVehicle is an object containing both profile data, like maximum capacity, and tracking data, such as current trips and location, related to a vehicle.
-
The vehicle's state, supported trip types, current trip IDs, last known location, maximum capacity, attributes, and type information are all accessible through this object.
-
The object can be initialized with details such as vehicle name, state, supported trip types, current trips, last location, maximum capacity, attributes, and vehicle type.
-
The
initmethod is unavailable and will return nil; the designated initializer is-initWithvehicleName:vehicleState:supportedTripTypes:currentTrips:lastLocation:maximumCapacity:attributes:vehicleType:instead.
GMTSVehicle
@interface GMTSVehicle : GMTCImmutableDataObject 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
GMTSVehicleStatefor all the options.Declaration
Swift
var vehicleState: GMTSVehicleState { get }Objective-C
@property (nonatomic, readonly) GMTSVehicleState vehicleState; -
Supported trip types, see
GMTSVehicleSupportedTripTypesfor 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
vehicleNameThe name of the vehicle.
vehicleStateThe vehicle state, see
GMTSVehicleStatefor all the options.supportedTripTypesAll the supported trip types.
currentTripsAn array contains all the current trip ID.
lastLocationThe last location of the vehicle.
maximumCapacityThe maximum capacity.
attributesA dictionary contains all the vehicle attributes.
vehicleTypeThe vehicle type information.
-
Unavailable
Will return nil. Use
-initWithvehicleName:vehicleState:supportedTripTypes:currentTrips:lastLocation: maximumCapacity:attributes:vehicleType:instead.Declaration
Objective-C
- (nonnull instancetype)init;