# GoogleRidesharingConsumer Framework Reference

# GMTSVehicle

    @interface GMTSVehicle : https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTCImmutableData.html

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.
- `


  ### [vehicleName](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicle#/c:objc(cs)GMTSVehicle(py)vehicleName)


  ` The name of the vehicle.

  #### Declaration

  Swift

      var vehicleName: String? { get }

  Objective-C

      @property (nonatomic, copy, readonly, nullable) NSString *vehicleName;

- `


  ### [vehicleState](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicle#/c:objc(cs)GMTSVehicle(py)vehicleState)


  ` The vehicle state, see `https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSVehicleState.html` for all the options.

  #### Declaration

  Swift

      var vehicleState: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSVehicleState.html { get }

  Objective-C

      @property (nonatomic, readonly) https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSVehicleState.html vehicleState;

- `


  ### [supportedTripTypes](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicle#/c:objc(cs)GMTSVehicle(py)supportedTripTypes)


  ` Supported trip types, see `https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSVehicleSupportedTripTypes.html` for all the options.

  #### Declaration

  Swift

      var supportedTripTypes: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSVehicleSupportedTripTypes.html { get }

  Objective-C

      @property (nonatomic, readonly) https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSVehicleSupportedTripTypes.html supportedTripTypes;

- `


  ### [currentTrips](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicle#/c:objc(cs)GMTSVehicle(py)currentTrips)


  ` An array contains all the current trip ID.

  #### Declaration

  Swift

      var currentTrips: [String]? { get }

  Objective-C

      @property (nonatomic, copy, readonly, nullable) NSArray<NSString *> *currentTrips;

- `


  ### [lastLocation](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicle#/c:objc(cs)GMTSVehicle(py)lastLocation)


  ` The last location of the vehicle.

  #### Declaration

  Swift

      @NSCopying var lastLocation: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleLocation.html? { get }

  Objective-C

      @property (nonatomic, copy, readonly, nullable) https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleLocation.html *lastLocation;

- `


  ### [maximumCapacity](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicle#/c:objc(cs)GMTSVehicle(py)maximumCapacity)


  ` The maximum capacity.

  #### Declaration

  Swift

      var maximumCapacity: Int32 { get }

  Objective-C

      @property (nonatomic, readonly) int32_t maximumCapacity;

- `


  ### [attributes](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicle#/c:objc(cs)GMTSVehicle(py)attributes)


  ` An array contains all the vehicle attributes.

  #### Declaration

  Swift

      var attributes: [https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleAttributeKeyValuePair.html]? { get }

  Objective-C

      @property (nonatomic, copy, readonly, nullable) NSArray<https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleAttributeKeyValuePair.html *> *attributes;

- `


  ### [vehicleType](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicle#/c:objc(cs)GMTSVehicle(py)vehicleType)


  ` The vehicle type information.

  #### Declaration

  Swift

      @NSCopying var vehicleType: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleType.html { get }

  Objective-C

      @property (nonatomic, copy, readonly) https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleType.html *_Nonnull vehicleType;

- `


  ### [-initWithvehicleName:vehicleState:supportedTripTypes:currentTrips:lastLocation:maximumCapacity:attributes:vehicleType:](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicle#/c:objc(cs)GMTSVehicle(im)initWithvehicleName:vehicleState:supportedTripTypes:currentTrips:lastLocation:maximumCapacity:attributes:vehicleType:)


  ` Initialization of the object.

  #### Declaration

  Swift

      init(vehicleName: String?, vehicleState: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSVehicleState.html, supportedTripTypes: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSVehicleSupportedTripTypes.html, currentTrips: [String]?, last lastLocation: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleLocation.html?, maximumCapacity: Int32, attributes: [https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleAttributeKeyValuePair.html]?, vehicleType: https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleType.html)

  Objective-C

      - (nonnull instancetype)
          initWithvehicleName:(nullable NSString *)vehicleName
                 vehicleState:(https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSVehicleState.html)vehicleState
           supportedTripTypes:(https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSVehicleSupportedTripTypes.html)supportedTripTypes
                 currentTrips:(nullable NSArray<NSString *> *)currentTrips
                 lastLocation:(nullable https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleLocation.html *)lastLocation
              maximumCapacity:(int32_t)maximumCapacity
                   attributes:(nullable NSArray<https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleAttributeKeyValuePair.html *> *)
                                  https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicle.html#/c:objc(cs)GMTSVehicle(py)attributes
                  https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicle.html#/c:objc(cs)GMTSVehicle(py)vehicleType:(nonnull https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicleType.html *)https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicle.html#/c:objc(cs)GMTSVehicle(py)vehicleType;

  #### Parameters

  |---|---|
  | ` vehicleName ` | The name of the vehicle. |
  | ` vehicleState ` | The vehicle state, see `https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Enums/GMTSVehicleState.html` 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. |

- `


  ### [-init](https://developers.google.com/maps/documentation/mobility/journey-sharing/on-demand/reference/ios/Classes/GMTSVehicle#/c:objc(cs)GMTSVehicle(im)init)


  ` Unavailable
  Will return nil.
  Use `-initWithvehicleName:vehicleState:supportedTripTypes:currentTrips:lastLocation:
  maximumCapacity:attributes:vehicleType:` instead.

  #### Declaration

  Objective-C

      - (nonnull instancetype)init;