Class: Samsara::Types::VehicleStatsListResponseData
- Inherits:
-
Object
- Object
- Samsara::Types::VehicleStatsListResponseData
- Defined in:
- lib/samsara_api/types/vehicle_stats_list_response_data.rb
Overview
A vehicle and its list of stat events.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#ambient_air_temperature_milli_c ⇒ Object
readonly
vehicle.
-
#aux_input_1 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration>
readonly
A list of auxiliary equipment states.
-
#aux_input_10 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration>
readonly
A list of auxiliary equipment states.
-
#aux_input_11 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration>
readonly
A list of auxiliary equipment states.
-
#aux_input_12 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration>
readonly
A list of auxiliary equipment states.
-
#aux_input_13 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration>
readonly
A list of auxiliary equipment states.
-
#aux_input_2 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration>
readonly
A list of auxiliary equipment states.
-
#aux_input_3 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration>
readonly
A list of auxiliary equipment states.
-
#aux_input_4 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration>
readonly
A list of auxiliary equipment states.
-
#aux_input_5 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration>
readonly
A list of auxiliary equipment states.
-
#aux_input_6 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration>
readonly
A list of auxiliary equipment states.
-
#aux_input_7 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration>
readonly
A list of auxiliary equipment states.
-
#aux_input_8 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration>
readonly
A list of auxiliary equipment states.
-
#aux_input_9 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration>
readonly
A list of auxiliary equipment states.
-
#barometric_pressure_pa ⇒ Array<Samsara::Types::VehicleStatsBarometricPressurePaWithDecoration>
readonly
A list of barometric pressure readings in pascals for the given vehicle.
-
#battery_milli_volts ⇒ Array<Samsara::Types::VehicleStatsBatteryVoltageWithDecoration>
readonly
A list of battery levels in milliVolts for the given vehicle.
-
#def_level_milli_percent ⇒ Array<Samsara::Types::VehicleStatsDefLevelMilliPercentWithDecoration>
readonly
A list of DEF level milli percentage readings for the given vehicle.
-
#ecu_speed_mph ⇒ Array<Samsara::Types::VehicleStatsEcuSpeedMphWithDecoration>
readonly
A list of the speeds of the vehicle in miles per hour, as reported by the ECU.
-
#engine_coolant_temperature_milli_c ⇒ Object
readonly
given vehicle.
-
#engine_immobilizer ⇒ Array<Samsara::Types::VehicleStatsEngineImmobilizerWithDecoration>
readonly
A list of engine immobilizer data for the given vehicle.
-
#engine_load_percent ⇒ Array<Samsara::Types::VehicleStatsEngineLoadPercentWithDecoration>
readonly
A list of engine load percentage readings for the given vehicle.
-
#engine_oil_pressure_k_pa ⇒ Array<Samsara::Types::VehicleStatsEngineOilPressureKPaWithDecoration>
readonly
A list of engine oil pressure readings in kilopascals for the given vehicle.
-
#engine_rpm ⇒ Array<Samsara::Types::VehicleStatsEngineRpmWithDecoration>
readonly
A list engine RPM values for the given vehicle.
-
#engine_states ⇒ Array<Samsara::Types::VehicleStatsEngineStateWithDecoration>
readonly
A list of engine state events for the given vehicle.
-
#ev_average_battery_temperature_milli_celsius ⇒ Object
readonly
EV and HEVs may report this field.
-
#ev_battery_current_milli_amp ⇒ Object
readonly
HEVs may report this field.
-
#ev_battery_state_of_health_milli_percent ⇒ Object
readonly
EV and HEVs may report this field.
-
#ev_battery_voltage_milli_volt ⇒ Object
readonly
HEVs may report this field.
-
#ev_charging_current_milli_amp ⇒ Object
readonly
HEVs may report this field.
-
#ev_charging_energy_micro_wh ⇒ Object
readonly
and HEVs may report this field.
-
#ev_charging_status ⇒ Object
readonly
this field.
-
#ev_charging_voltage_milli_volt ⇒ Object
readonly
and HEVs may report this field.
-
#ev_consumed_energy_micro_wh ⇒ Object
readonly
microwatt hours.
-
#ev_distance_driven_meters ⇒ Object
readonly
and HEVs may report this field.
-
#ev_regenerated_energy_micro_wh ⇒ Object
readonly
EV and HEVs may report this field.
-
#ev_state_of_charge_milli_percent ⇒ Object
readonly
this field.
- #external_ids ⇒ Samsara::Types::VEHICLE_EXTERNAL_IDS readonly
-
#fault_codes ⇒ Array<Samsara::Types::VehicleStatsFaultCodesWithDecoration>
readonly
A list of engine fault codes.
-
#fuel_percents ⇒ Array<Samsara::Types::VehicleStatsFuelPercentWithDecoration>
readonly
A list of fuel percentage readings for the given vehicle.
-
#gps ⇒ Array<Samsara::Types::VehicleStatsListGps>
readonly
A list of GPS location events for the given vehicles.
-
#gps_distance_meters ⇒ Array<Samsara::Types::VehicleStatsGpsDistanceMetersWithDecoration>
readonly
A list of GPS distance events for the given vehicle.
-
#gps_odometer_meters ⇒ Array<Samsara::Types::VehicleStatsGpsOdometerMetersWithDecoration>
readonly
A list of GPS odometer events for the given vehicle.
- #id ⇒ String readonly
-
#intake_manifold_temperature_milli_c ⇒ Object
readonly
given vehicle.
- #name ⇒ String readonly
-
#nfc_card_scans ⇒ Array<Samsara::Types::VehicleStatsNfcCardScanWithDecoration>
readonly
A list of NFC cards that were scanned for the given vehicles.
-
#obd_engine_seconds ⇒ Array<Samsara::Types::VehicleStatsObdEngineSecondsWithDecoration>
readonly
A list of OBD engine seconds readings for the given vehicle.
-
#obd_odometer_meters ⇒ Array<Samsara::Types::VehicleStatsObdOdometerMetersWithDecoration>
readonly
A list of OBD odometer readings for the given vehicle.
-
#seatbelt_driver ⇒ Array<Samsara::Types::VehicleStatsSeatbeltDriver>
readonly
Seatbelt Driver Status as read from the vehicle.
-
#spreader_active ⇒ Array<Samsara::Types::VehicleStatsSpreaderActive>
readonly
Whether vehicle is actively spreading any material.
-
#spreader_air_temp ⇒ Array<Samsara::Types::VehicleStatsSpreaderAirTemp>
readonly
Air (ambient) temperature in milli celsius reading from material spreader.
-
#spreader_blast_state ⇒ Array<Samsara::Types::VehicleStatsSpreaderBlastState>
readonly
Whether vehicle is actively spreading material in ‘blast mode’.
-
#spreader_granular_name ⇒ Object
readonly
spreader.
-
#spreader_granular_rate ⇒ Object
readonly
unit.
-
#spreader_liquid_name ⇒ Object
readonly
spreader.
-
#spreader_liquid_rate ⇒ Object
readonly
unit.
-
#spreader_on_state ⇒ Array<Samsara::Types::VehicleStatsSpreaderOnState>
readonly
Whether vehicle spreader is enabled.
-
#spreader_plow_status ⇒ Object
readonly
this is separate from plow status defined via auxInput.
-
#spreader_prewet_name ⇒ Object
readonly
spreader.
-
#spreader_prewet_rate ⇒ Object
readonly
unit.
-
#spreader_road_temp ⇒ Array<Samsara::Types::VehicleStatsSpreaderRoadTemp>
readonly
Road temperature reading in milli celsius from material spreader.
-
#synthetic_engine_seconds ⇒ Array<Samsara::Types::VehicleStatsListSyntheticEngineSeconds>
readonly
A list of synthetic engine seconds values.
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(ambient_air_temperature_milli_c: OMIT, aux_input_1: OMIT, aux_input_10: OMIT, aux_input_11: OMIT, aux_input_12: OMIT, aux_input_13: OMIT, aux_input_2: OMIT, aux_input_3: OMIT, aux_input_4: OMIT, aux_input_5: OMIT, aux_input_6: OMIT, aux_input_7: OMIT, aux_input_8: OMIT, aux_input_9: OMIT, barometric_pressure_pa: OMIT, battery_milli_volts: OMIT, def_level_milli_percent: OMIT, ecu_speed_mph: OMIT, engine_coolant_temperature_milli_c: OMIT, engine_immobilizer: OMIT, engine_load_percent: OMIT, engine_oil_pressure_k_pa: OMIT, engine_rpm: OMIT, engine_states: OMIT, ev_average_battery_temperature_milli_celsius: OMIT, ev_battery_current_milli_amp: OMIT, ev_battery_state_of_health_milli_percent: OMIT, ev_battery_voltage_milli_volt: OMIT, ev_charging_current_milli_amp: OMIT, ev_charging_energy_micro_wh: OMIT, ev_charging_status: OMIT, ev_charging_voltage_milli_volt: OMIT, ev_consumed_energy_micro_wh: OMIT, ev_distance_driven_meters: OMIT, ev_regenerated_energy_micro_wh: OMIT, ev_state_of_charge_milli_percent: OMIT, external_ids: OMIT, fault_codes: OMIT, fuel_percents: OMIT, gps: OMIT, gps_distance_meters: OMIT, gps_odometer_meters: OMIT, id: OMIT, intake_manifold_temperature_milli_c: OMIT, name: OMIT, nfc_card_scans: OMIT, obd_engine_seconds: OMIT, obd_odometer_meters: OMIT, seatbelt_driver: OMIT, spreader_active: OMIT, spreader_air_temp: OMIT, spreader_blast_state: OMIT, spreader_granular_name: OMIT, spreader_granular_rate: OMIT, spreader_liquid_name: OMIT, spreader_liquid_rate: OMIT, spreader_on_state: OMIT, spreader_plow_status: OMIT, spreader_prewet_name: OMIT, spreader_prewet_rate: OMIT, spreader_road_temp: OMIT, synthetic_engine_seconds: OMIT, additional_properties: nil) ⇒ Samsara::Types::VehicleStatsListResponseData constructor
- #to_json ⇒ String
Constructor Details
#initialize(ambient_air_temperature_milli_c: OMIT, aux_input_1: OMIT, aux_input_10: OMIT, aux_input_11: OMIT, aux_input_12: OMIT, aux_input_13: OMIT, aux_input_2: OMIT, aux_input_3: OMIT, aux_input_4: OMIT, aux_input_5: OMIT, aux_input_6: OMIT, aux_input_7: OMIT, aux_input_8: OMIT, aux_input_9: OMIT, barometric_pressure_pa: OMIT, battery_milli_volts: OMIT, def_level_milli_percent: OMIT, ecu_speed_mph: OMIT, engine_coolant_temperature_milli_c: OMIT, engine_immobilizer: OMIT, engine_load_percent: OMIT, engine_oil_pressure_k_pa: OMIT, engine_rpm: OMIT, engine_states: OMIT, ev_average_battery_temperature_milli_celsius: OMIT, ev_battery_current_milli_amp: OMIT, ev_battery_state_of_health_milli_percent: OMIT, ev_battery_voltage_milli_volt: OMIT, ev_charging_current_milli_amp: OMIT, ev_charging_energy_micro_wh: OMIT, ev_charging_status: OMIT, ev_charging_voltage_milli_volt: OMIT, ev_consumed_energy_micro_wh: OMIT, ev_distance_driven_meters: OMIT, ev_regenerated_energy_micro_wh: OMIT, ev_state_of_charge_milli_percent: OMIT, external_ids: OMIT, fault_codes: OMIT, fuel_percents: OMIT, gps: OMIT, gps_distance_meters: OMIT, gps_odometer_meters: OMIT, id: OMIT, intake_manifold_temperature_milli_c: OMIT, name: OMIT, nfc_card_scans: OMIT, obd_engine_seconds: OMIT, obd_odometer_meters: OMIT, seatbelt_driver: OMIT, spreader_active: OMIT, spreader_air_temp: OMIT, spreader_blast_state: OMIT, spreader_granular_name: OMIT, spreader_granular_rate: OMIT, spreader_liquid_name: OMIT, spreader_liquid_rate: OMIT, spreader_on_state: OMIT, spreader_plow_status: OMIT, spreader_prewet_name: OMIT, spreader_prewet_rate: OMIT, spreader_road_temp: OMIT, synthetic_engine_seconds: OMIT, additional_properties: nil) ⇒ Samsara::Types::VehicleStatsListResponseData
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 303 def initialize(ambient_air_temperature_milli_c: OMIT, aux_input_1: OMIT, aux_input_10: OMIT, aux_input_11: OMIT, aux_input_12: OMIT, aux_input_13: OMIT, aux_input_2: OMIT, aux_input_3: OMIT, aux_input_4: OMIT, aux_input_5: OMIT, aux_input_6: OMIT, aux_input_7: OMIT, aux_input_8: OMIT, aux_input_9: OMIT, barometric_pressure_pa: OMIT, battery_milli_volts: OMIT, def_level_milli_percent: OMIT, ecu_speed_mph: OMIT, engine_coolant_temperature_milli_c: OMIT, engine_immobilizer: OMIT, engine_load_percent: OMIT, engine_oil_pressure_k_pa: OMIT, engine_rpm: OMIT, engine_states: OMIT, ev_average_battery_temperature_milli_celsius: OMIT, ev_battery_current_milli_amp: OMIT, ev_battery_state_of_health_milli_percent: OMIT, ev_battery_voltage_milli_volt: OMIT, ev_charging_current_milli_amp: OMIT, ev_charging_energy_micro_wh: OMIT, ev_charging_status: OMIT, ev_charging_voltage_milli_volt: OMIT, ev_consumed_energy_micro_wh: OMIT, ev_distance_driven_meters: OMIT, ev_regenerated_energy_micro_wh: OMIT, ev_state_of_charge_milli_percent: OMIT, external_ids: OMIT, fault_codes: OMIT, fuel_percents: OMIT, gps: OMIT, gps_distance_meters: OMIT, gps_odometer_meters: OMIT, id: OMIT, intake_manifold_temperature_milli_c: OMIT, name: OMIT, nfc_card_scans: OMIT, obd_engine_seconds: OMIT, obd_odometer_meters: OMIT, seatbelt_driver: OMIT, spreader_active: OMIT, spreader_air_temp: OMIT, spreader_blast_state: OMIT, spreader_granular_name: OMIT, spreader_granular_rate: OMIT, spreader_liquid_name: OMIT, spreader_liquid_rate: OMIT, spreader_on_state: OMIT, spreader_plow_status: OMIT, spreader_prewet_name: OMIT, spreader_prewet_rate: OMIT, spreader_road_temp: OMIT, synthetic_engine_seconds: OMIT, additional_properties: nil) @ambient_air_temperature_milli_c = ambient_air_temperature_milli_c if ambient_air_temperature_milli_c != OMIT @aux_input_1 = aux_input_1 if aux_input_1 != OMIT @aux_input_10 = aux_input_10 if aux_input_10 != OMIT @aux_input_11 = aux_input_11 if aux_input_11 != OMIT @aux_input_12 = aux_input_12 if aux_input_12 != OMIT @aux_input_13 = aux_input_13 if aux_input_13 != OMIT @aux_input_2 = aux_input_2 if aux_input_2 != OMIT @aux_input_3 = aux_input_3 if aux_input_3 != OMIT @aux_input_4 = aux_input_4 if aux_input_4 != OMIT @aux_input_5 = aux_input_5 if aux_input_5 != OMIT @aux_input_6 = aux_input_6 if aux_input_6 != OMIT @aux_input_7 = aux_input_7 if aux_input_7 != OMIT @aux_input_8 = aux_input_8 if aux_input_8 != OMIT @aux_input_9 = aux_input_9 if aux_input_9 != OMIT = if != OMIT @battery_milli_volts = battery_milli_volts if battery_milli_volts != OMIT @def_level_milli_percent = def_level_milli_percent if def_level_milli_percent != OMIT @ecu_speed_mph = ecu_speed_mph if ecu_speed_mph != OMIT @engine_coolant_temperature_milli_c = engine_coolant_temperature_milli_c if engine_coolant_temperature_milli_c != OMIT @engine_immobilizer = engine_immobilizer if engine_immobilizer != OMIT @engine_load_percent = engine_load_percent if engine_load_percent != OMIT @engine_oil_pressure_k_pa = engine_oil_pressure_k_pa if engine_oil_pressure_k_pa != OMIT @engine_rpm = engine_rpm if engine_rpm != OMIT @engine_states = engine_states if engine_states != OMIT @ev_average_battery_temperature_milli_celsius = ev_average_battery_temperature_milli_celsius if ev_average_battery_temperature_milli_celsius != OMIT @ev_battery_current_milli_amp = ev_battery_current_milli_amp if ev_battery_current_milli_amp != OMIT @ev_battery_state_of_health_milli_percent = ev_battery_state_of_health_milli_percent if ev_battery_state_of_health_milli_percent != OMIT @ev_battery_voltage_milli_volt = ev_battery_voltage_milli_volt if ev_battery_voltage_milli_volt != OMIT @ev_charging_current_milli_amp = ev_charging_current_milli_amp if ev_charging_current_milli_amp != OMIT @ev_charging_energy_micro_wh = ev_charging_energy_micro_wh if ev_charging_energy_micro_wh != OMIT @ev_charging_status = ev_charging_status if ev_charging_status != OMIT @ev_charging_voltage_milli_volt = ev_charging_voltage_milli_volt if ev_charging_voltage_milli_volt != OMIT @ev_consumed_energy_micro_wh = ev_consumed_energy_micro_wh if ev_consumed_energy_micro_wh != OMIT @ev_distance_driven_meters = ev_distance_driven_meters if ev_distance_driven_meters != OMIT @ev_regenerated_energy_micro_wh = ev_regenerated_energy_micro_wh if ev_regenerated_energy_micro_wh != OMIT @ev_state_of_charge_milli_percent = ev_state_of_charge_milli_percent if ev_state_of_charge_milli_percent != OMIT @external_ids = external_ids if external_ids != OMIT @fault_codes = fault_codes if fault_codes != OMIT @fuel_percents = fuel_percents if fuel_percents != OMIT @gps = gps if gps != OMIT @gps_distance_meters = gps_distance_meters if gps_distance_meters != OMIT @gps_odometer_meters = gps_odometer_meters if gps_odometer_meters != OMIT @id = id if id != OMIT @intake_manifold_temperature_milli_c = intake_manifold_temperature_milli_c if intake_manifold_temperature_milli_c != OMIT @name = name if name != OMIT @nfc_card_scans = nfc_card_scans if nfc_card_scans != OMIT @obd_engine_seconds = obd_engine_seconds if obd_engine_seconds != OMIT @obd_odometer_meters = obd_odometer_meters if obd_odometer_meters != OMIT @seatbelt_driver = seatbelt_driver if seatbelt_driver != OMIT @spreader_active = spreader_active if spreader_active != OMIT @spreader_air_temp = spreader_air_temp if spreader_air_temp != OMIT @spreader_blast_state = spreader_blast_state if spreader_blast_state != OMIT @spreader_granular_name = spreader_granular_name if spreader_granular_name != OMIT @spreader_granular_rate = spreader_granular_rate if spreader_granular_rate != OMIT @spreader_liquid_name = spreader_liquid_name if spreader_liquid_name != OMIT @spreader_liquid_rate = spreader_liquid_rate if spreader_liquid_rate != OMIT @spreader_on_state = spreader_on_state if spreader_on_state != OMIT @spreader_plow_status = spreader_plow_status if spreader_plow_status != OMIT @spreader_prewet_name = spreader_prewet_name if spreader_prewet_name != OMIT @spreader_prewet_rate = spreader_prewet_rate if spreader_prewet_rate != OMIT @spreader_road_temp = spreader_road_temp if spreader_road_temp != OMIT @synthetic_engine_seconds = synthetic_engine_seconds if synthetic_engine_seconds != OMIT @additional_properties = additional_properties @_field_set = { "ambientAirTemperatureMilliC": ambient_air_temperature_milli_c, "auxInput1": aux_input_1, "auxInput10": aux_input_10, "auxInput11": aux_input_11, "auxInput12": aux_input_12, "auxInput13": aux_input_13, "auxInput2": aux_input_2, "auxInput3": aux_input_3, "auxInput4": aux_input_4, "auxInput5": aux_input_5, "auxInput6": aux_input_6, "auxInput7": aux_input_7, "auxInput8": aux_input_8, "auxInput9": aux_input_9, "barometricPressurePa": , "batteryMilliVolts": battery_milli_volts, "defLevelMilliPercent": def_level_milli_percent, "ecuSpeedMph": ecu_speed_mph, "engineCoolantTemperatureMilliC": engine_coolant_temperature_milli_c, "engineImmobilizer": engine_immobilizer, "engineLoadPercent": engine_load_percent, "engineOilPressureKPa": engine_oil_pressure_k_pa, "engineRpm": engine_rpm, "engineStates": engine_states, "evAverageBatteryTemperatureMilliCelsius": ev_average_battery_temperature_milli_celsius, "evBatteryCurrentMilliAmp": ev_battery_current_milli_amp, "evBatteryStateOfHealthMilliPercent": ev_battery_state_of_health_milli_percent, "evBatteryVoltageMilliVolt": ev_battery_voltage_milli_volt, "evChargingCurrentMilliAmp": ev_charging_current_milli_amp, "evChargingEnergyMicroWh": ev_charging_energy_micro_wh, "evChargingStatus": ev_charging_status, "evChargingVoltageMilliVolt": ev_charging_voltage_milli_volt, "evConsumedEnergyMicroWh": ev_consumed_energy_micro_wh, "evDistanceDrivenMeters": ev_distance_driven_meters, "evRegeneratedEnergyMicroWh": ev_regenerated_energy_micro_wh, "evStateOfChargeMilliPercent": ev_state_of_charge_milli_percent, "externalIds": external_ids, "faultCodes": fault_codes, "fuelPercents": fuel_percents, "gps": gps, "gpsDistanceMeters": gps_distance_meters, "gpsOdometerMeters": gps_odometer_meters, "id": id, "intakeManifoldTemperatureMilliC": intake_manifold_temperature_milli_c, "name": name, "nfcCardScans": nfc_card_scans, "obdEngineSeconds": obd_engine_seconds, "obdOdometerMeters": obd_odometer_meters, "seatbeltDriver": seatbelt_driver, "spreaderActive": spreader_active, "spreaderAirTemp": spreader_air_temp, "spreaderBlastState": spreader_blast_state, "spreaderGranularName": spreader_granular_name, "spreaderGranularRate": spreader_granular_rate, "spreaderLiquidName": spreader_liquid_name, "spreaderLiquidRate": spreader_liquid_rate, "spreaderOnState": spreader_on_state, "spreaderPlowStatus": spreader_plow_status, "spreaderPrewetName": spreader_prewet_name, "spreaderPrewetRate": spreader_prewet_rate, "spreaderRoadTemp": spreader_road_temp, "syntheticEngineSeconds": synthetic_engine_seconds }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
207 208 209 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 207 def additional_properties @additional_properties end |
#ambient_air_temperature_milli_c ⇒ Object (readonly)
vehicle.
59 60 61 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 59 def ambient_air_temperature_milli_c @ambient_air_temperature_milli_c end |
#aux_input_1 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration> (readonly)
Returns A list of auxiliary equipment states.
61 62 63 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 61 def aux_input_1 @aux_input_1 end |
#aux_input_10 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration> (readonly)
Returns A list of auxiliary equipment states.
63 64 65 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 63 def aux_input_10 @aux_input_10 end |
#aux_input_11 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration> (readonly)
Returns A list of auxiliary equipment states.
65 66 67 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 65 def aux_input_11 @aux_input_11 end |
#aux_input_12 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration> (readonly)
Returns A list of auxiliary equipment states.
67 68 69 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 67 def aux_input_12 @aux_input_12 end |
#aux_input_13 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration> (readonly)
Returns A list of auxiliary equipment states.
69 70 71 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 69 def aux_input_13 @aux_input_13 end |
#aux_input_2 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration> (readonly)
Returns A list of auxiliary equipment states.
71 72 73 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 71 def aux_input_2 @aux_input_2 end |
#aux_input_3 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration> (readonly)
Returns A list of auxiliary equipment states.
73 74 75 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 73 def aux_input_3 @aux_input_3 end |
#aux_input_4 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration> (readonly)
Returns A list of auxiliary equipment states.
75 76 77 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 75 def aux_input_4 @aux_input_4 end |
#aux_input_5 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration> (readonly)
Returns A list of auxiliary equipment states.
77 78 79 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 77 def aux_input_5 @aux_input_5 end |
#aux_input_6 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration> (readonly)
Returns A list of auxiliary equipment states.
79 80 81 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 79 def aux_input_6 @aux_input_6 end |
#aux_input_7 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration> (readonly)
Returns A list of auxiliary equipment states.
81 82 83 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 81 def aux_input_7 @aux_input_7 end |
#aux_input_8 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration> (readonly)
Returns A list of auxiliary equipment states.
83 84 85 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 83 def aux_input_8 @aux_input_8 end |
#aux_input_9 ⇒ Array<Samsara::Types::VehicleStatsAuxInputWithDecoration> (readonly)
Returns A list of auxiliary equipment states.
85 86 87 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 85 def aux_input_9 @aux_input_9 end |
#barometric_pressure_pa ⇒ Array<Samsara::Types::VehicleStatsBarometricPressurePaWithDecoration> (readonly)
Returns A list of barometric pressure readings in pascals for the given vehicle.
87 88 89 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 87 def end |
#battery_milli_volts ⇒ Array<Samsara::Types::VehicleStatsBatteryVoltageWithDecoration> (readonly)
Returns A list of battery levels in milliVolts for the given vehicle.
89 90 91 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 89 def battery_milli_volts @battery_milli_volts end |
#def_level_milli_percent ⇒ Array<Samsara::Types::VehicleStatsDefLevelMilliPercentWithDecoration> (readonly)
Returns A list of DEF level milli percentage readings for the given vehicle.
91 92 93 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 91 def def_level_milli_percent @def_level_milli_percent end |
#ecu_speed_mph ⇒ Array<Samsara::Types::VehicleStatsEcuSpeedMphWithDecoration> (readonly)
Returns A list of the speeds of the vehicle in miles per hour, as reported by the ECU.
93 94 95 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 93 def ecu_speed_mph @ecu_speed_mph end |
#engine_coolant_temperature_milli_c ⇒ Object (readonly)
given vehicle.
96 97 98 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 96 def engine_coolant_temperature_milli_c @engine_coolant_temperature_milli_c end |
#engine_immobilizer ⇒ Array<Samsara::Types::VehicleStatsEngineImmobilizerWithDecoration> (readonly)
Returns A list of engine immobilizer data for the given vehicle.
98 99 100 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 98 def engine_immobilizer @engine_immobilizer end |
#engine_load_percent ⇒ Array<Samsara::Types::VehicleStatsEngineLoadPercentWithDecoration> (readonly)
Returns A list of engine load percentage readings for the given vehicle.
100 101 102 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 100 def engine_load_percent @engine_load_percent end |
#engine_oil_pressure_k_pa ⇒ Array<Samsara::Types::VehicleStatsEngineOilPressureKPaWithDecoration> (readonly)
Returns A list of engine oil pressure readings in kilopascals for the given vehicle.
102 103 104 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 102 def engine_oil_pressure_k_pa @engine_oil_pressure_k_pa end |
#engine_rpm ⇒ Array<Samsara::Types::VehicleStatsEngineRpmWithDecoration> (readonly)
Returns A list engine RPM values for the given vehicle.
104 105 106 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 104 def engine_rpm @engine_rpm end |
#engine_states ⇒ Array<Samsara::Types::VehicleStatsEngineStateWithDecoration> (readonly)
Returns A list of engine state events for the given vehicle.
106 107 108 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 106 def engine_states @engine_states end |
#ev_average_battery_temperature_milli_celsius ⇒ Object (readonly)
EV and HEVs may report this field.
109 110 111 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 109 def ev_average_battery_temperature_milli_celsius @ev_average_battery_temperature_milli_celsius end |
#ev_battery_current_milli_amp ⇒ Object (readonly)
HEVs may report this field.
112 113 114 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 112 def ev_battery_current_milli_amp @ev_battery_current_milli_amp end |
#ev_battery_state_of_health_milli_percent ⇒ Object (readonly)
EV and HEVs may report this field.
115 116 117 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 115 def ev_battery_state_of_health_milli_percent @ev_battery_state_of_health_milli_percent end |
#ev_battery_voltage_milli_volt ⇒ Object (readonly)
HEVs may report this field.
118 119 120 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 118 def ev_battery_voltage_milli_volt @ev_battery_voltage_milli_volt end |
#ev_charging_current_milli_amp ⇒ Object (readonly)
HEVs may report this field.
121 122 123 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 121 def ev_charging_current_milli_amp @ev_charging_current_milli_amp end |
#ev_charging_energy_micro_wh ⇒ Object (readonly)
and HEVs may report this field.
124 125 126 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 124 def ev_charging_energy_micro_wh @ev_charging_energy_micro_wh end |
#ev_charging_status ⇒ Object (readonly)
this field.
127 128 129 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 127 def ev_charging_status @ev_charging_status end |
#ev_charging_voltage_milli_volt ⇒ Object (readonly)
and HEVs may report this field.
130 131 132 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 130 def ev_charging_voltage_milli_volt @ev_charging_voltage_milli_volt end |
#ev_consumed_energy_micro_wh ⇒ Object (readonly)
microwatt hours. Not all EV and HEVs may report this field.
133 134 135 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 133 def ev_consumed_energy_micro_wh @ev_consumed_energy_micro_wh end |
#ev_distance_driven_meters ⇒ Object (readonly)
and HEVs may report this field.
136 137 138 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 136 def ev_distance_driven_meters @ev_distance_driven_meters end |
#ev_regenerated_energy_micro_wh ⇒ Object (readonly)
EV and HEVs may report this field.
139 140 141 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 139 def ev_regenerated_energy_micro_wh @ev_regenerated_energy_micro_wh end |
#ev_state_of_charge_milli_percent ⇒ Object (readonly)
this field.
142 143 144 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 142 def ev_state_of_charge_milli_percent @ev_state_of_charge_milli_percent end |
#external_ids ⇒ Samsara::Types::VEHICLE_EXTERNAL_IDS (readonly)
144 145 146 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 144 def external_ids @external_ids end |
#fault_codes ⇒ Array<Samsara::Types::VehicleStatsFaultCodesWithDecoration> (readonly)
Returns A list of engine fault codes.
146 147 148 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 146 def fault_codes @fault_codes end |
#fuel_percents ⇒ Array<Samsara::Types::VehicleStatsFuelPercentWithDecoration> (readonly)
Returns A list of fuel percentage readings for the given vehicle.
148 149 150 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 148 def fuel_percents @fuel_percents end |
#gps ⇒ Array<Samsara::Types::VehicleStatsListGps> (readonly)
Returns A list of GPS location events for the given vehicles.
150 151 152 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 150 def gps @gps end |
#gps_distance_meters ⇒ Array<Samsara::Types::VehicleStatsGpsDistanceMetersWithDecoration> (readonly)
Returns A list of GPS distance events for the given vehicle.
152 153 154 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 152 def gps_distance_meters @gps_distance_meters end |
#gps_odometer_meters ⇒ Array<Samsara::Types::VehicleStatsGpsOdometerMetersWithDecoration> (readonly)
Returns A list of GPS odometer events for the given vehicle.
154 155 156 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 154 def gps_odometer_meters @gps_odometer_meters end |
#id ⇒ String (readonly)
156 157 158 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 156 def id @id end |
#intake_manifold_temperature_milli_c ⇒ Object (readonly)
given vehicle.
159 160 161 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 159 def intake_manifold_temperature_milli_c @intake_manifold_temperature_milli_c end |
#name ⇒ String (readonly)
161 162 163 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 161 def name @name end |
#nfc_card_scans ⇒ Array<Samsara::Types::VehicleStatsNfcCardScanWithDecoration> (readonly)
Returns A list of NFC cards that were scanned for the given vehicles.
163 164 165 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 163 def nfc_card_scans @nfc_card_scans end |
#obd_engine_seconds ⇒ Array<Samsara::Types::VehicleStatsObdEngineSecondsWithDecoration> (readonly)
Returns A list of OBD engine seconds readings for the given vehicle.
165 166 167 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 165 def obd_engine_seconds @obd_engine_seconds end |
#obd_odometer_meters ⇒ Array<Samsara::Types::VehicleStatsObdOdometerMetersWithDecoration> (readonly)
Returns A list of OBD odometer readings for the given vehicle.
167 168 169 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 167 def obd_odometer_meters @obd_odometer_meters end |
#seatbelt_driver ⇒ Array<Samsara::Types::VehicleStatsSeatbeltDriver> (readonly)
Returns Seatbelt Driver Status as read from the vehicle. Buckled or Unbuckled.
169 170 171 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 169 def seatbelt_driver @seatbelt_driver end |
#spreader_active ⇒ Array<Samsara::Types::VehicleStatsSpreaderActive> (readonly)
Returns Whether vehicle is actively spreading any material.
171 172 173 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 171 def spreader_active @spreader_active end |
#spreader_air_temp ⇒ Array<Samsara::Types::VehicleStatsSpreaderAirTemp> (readonly)
Returns Air (ambient) temperature in milli celsius reading from material spreader.
173 174 175 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 173 def spreader_air_temp @spreader_air_temp end |
#spreader_blast_state ⇒ Array<Samsara::Types::VehicleStatsSpreaderBlastState> (readonly)
Returns Whether vehicle is actively spreading material in ‘blast mode’.
175 176 177 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 175 def spreader_blast_state @spreader_blast_state end |
#spreader_granular_name ⇒ Object (readonly)
spreader.
178 179 180 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 178 def spreader_granular_name @spreader_granular_name end |
#spreader_granular_rate ⇒ Object (readonly)
unit. Readings do not consider total spread rate(s) over time or distance.
182 183 184 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 182 def spreader_granular_rate @spreader_granular_rate end |
#spreader_liquid_name ⇒ Object (readonly)
spreader.
185 186 187 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 185 def spreader_liquid_name @spreader_liquid_name end |
#spreader_liquid_rate ⇒ Object (readonly)
unit. Readings do not consider total spread rate(s) over time or distance.
189 190 191 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 189 def spreader_liquid_rate @spreader_liquid_rate end |
#spreader_on_state ⇒ Array<Samsara::Types::VehicleStatsSpreaderOnState> (readonly)
Returns Whether vehicle spreader is enabled.
191 192 193 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 191 def spreader_on_state @spreader_on_state end |
#spreader_plow_status ⇒ Object (readonly)
this is separate from plow status defined via auxInput.
194 195 196 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 194 def spreader_plow_status @spreader_plow_status end |
#spreader_prewet_name ⇒ Object (readonly)
spreader.
197 198 199 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 197 def spreader_prewet_name @spreader_prewet_name end |
#spreader_prewet_rate ⇒ Object (readonly)
unit. Readings do not consider total spread rate(s) over time or distance.
201 202 203 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 201 def spreader_prewet_rate @spreader_prewet_rate end |
#spreader_road_temp ⇒ Array<Samsara::Types::VehicleStatsSpreaderRoadTemp> (readonly)
Returns Road temperature reading in milli celsius from material spreader.
203 204 205 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 203 def spreader_road_temp @spreader_road_temp end |
#synthetic_engine_seconds ⇒ Array<Samsara::Types::VehicleStatsListSyntheticEngineSeconds> (readonly)
Returns A list of synthetic engine seconds values.
205 206 207 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 205 def synthetic_engine_seconds @synthetic_engine_seconds end |
Class Method Details
.from_json(json_object:) ⇒ Samsara::Types::VehicleStatsListResponseData
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 375 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) ambient_air_temperature_milli_c = parsed_json["ambientAirTemperatureMilliC"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsAmbientAirTempMilliCWithDecoration.from_json(json_object: item) end aux_input_1 = parsed_json["auxInput1"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsAuxInputWithDecoration.from_json(json_object: item) end aux_input_10 = parsed_json["auxInput10"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsAuxInputWithDecoration.from_json(json_object: item) end aux_input_11 = parsed_json["auxInput11"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsAuxInputWithDecoration.from_json(json_object: item) end aux_input_12 = parsed_json["auxInput12"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsAuxInputWithDecoration.from_json(json_object: item) end aux_input_13 = parsed_json["auxInput13"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsAuxInputWithDecoration.from_json(json_object: item) end aux_input_2 = parsed_json["auxInput2"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsAuxInputWithDecoration.from_json(json_object: item) end aux_input_3 = parsed_json["auxInput3"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsAuxInputWithDecoration.from_json(json_object: item) end aux_input_4 = parsed_json["auxInput4"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsAuxInputWithDecoration.from_json(json_object: item) end aux_input_5 = parsed_json["auxInput5"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsAuxInputWithDecoration.from_json(json_object: item) end aux_input_6 = parsed_json["auxInput6"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsAuxInputWithDecoration.from_json(json_object: item) end aux_input_7 = parsed_json["auxInput7"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsAuxInputWithDecoration.from_json(json_object: item) end aux_input_8 = parsed_json["auxInput8"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsAuxInputWithDecoration.from_json(json_object: item) end aux_input_9 = parsed_json["auxInput9"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsAuxInputWithDecoration.from_json(json_object: item) end = parsed_json["barometricPressurePa"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsBarometricPressurePaWithDecoration.from_json(json_object: item) end battery_milli_volts = parsed_json["batteryMilliVolts"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsBatteryVoltageWithDecoration.from_json(json_object: item) end def_level_milli_percent = parsed_json["defLevelMilliPercent"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsDefLevelMilliPercentWithDecoration.from_json(json_object: item) end ecu_speed_mph = parsed_json["ecuSpeedMph"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEcuSpeedMphWithDecoration.from_json(json_object: item) end engine_coolant_temperature_milli_c = parsed_json["engineCoolantTemperatureMilliC"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEngineCoolantTempMilliCWithDecoration.from_json(json_object: item) end engine_immobilizer = parsed_json["engineImmobilizer"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEngineImmobilizerWithDecoration.from_json(json_object: item) end engine_load_percent = parsed_json["engineLoadPercent"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEngineLoadPercentWithDecoration.from_json(json_object: item) end engine_oil_pressure_k_pa = parsed_json["engineOilPressureKPa"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEngineOilPressureKPaWithDecoration.from_json(json_object: item) end engine_rpm = parsed_json["engineRpm"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEngineRpmWithDecoration.from_json(json_object: item) end engine_states = parsed_json["engineStates"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEngineStateWithDecoration.from_json(json_object: item) end ev_average_battery_temperature_milli_celsius = parsed_json["evAverageBatteryTemperatureMilliCelsius"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEvAverageBatteryTemperatureMilliCelsius.from_json(json_object: item) end ev_battery_current_milli_amp = parsed_json["evBatteryCurrentMilliAmp"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEvBatteryCurrentMilliAmp.from_json(json_object: item) end ev_battery_state_of_health_milli_percent = parsed_json["evBatteryStateOfHealthMilliPercent"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEvBatteryStateOfHealthMilliPercent.from_json(json_object: item) end ev_battery_voltage_milli_volt = parsed_json["evBatteryVoltageMilliVolt"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEvBatteryVoltageMilliVolt.from_json(json_object: item) end ev_charging_current_milli_amp = parsed_json["evChargingCurrentMilliAmp"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEvChargingCurrentMilliAmp.from_json(json_object: item) end ev_charging_energy_micro_wh = parsed_json["evChargingEnergyMicroWh"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEvChargingEnergyMicroWh.from_json(json_object: item) end ev_charging_status = parsed_json["evChargingStatus"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEvChargingStatus.from_json(json_object: item) end ev_charging_voltage_milli_volt = parsed_json["evChargingVoltageMilliVolt"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEvChargingVoltageMilliVolt.from_json(json_object: item) end ev_consumed_energy_micro_wh = parsed_json["evConsumedEnergyMicroWh"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEvConsumedEnergyMicroWh.from_json(json_object: item) end ev_distance_driven_meters = parsed_json["evDistanceDrivenMeters"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEvDistanceDrivenMeters.from_json(json_object: item) end ev_regenerated_energy_micro_wh = parsed_json["evRegeneratedEnergyMicroWh"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEvRegeneratedEnergyMicroWh.from_json(json_object: item) end ev_state_of_charge_milli_percent = parsed_json["evStateOfChargeMilliPercent"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsEvStateOfChargeMilliPercent.from_json(json_object: item) end external_ids = parsed_json["externalIds"] fault_codes = parsed_json["faultCodes"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsFaultCodesWithDecoration.from_json(json_object: item) end fuel_percents = parsed_json["fuelPercents"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsFuelPercentWithDecoration.from_json(json_object: item) end gps = parsed_json["gps"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsListGps.from_json(json_object: item) end gps_distance_meters = parsed_json["gpsDistanceMeters"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsGpsDistanceMetersWithDecoration.from_json(json_object: item) end gps_odometer_meters = parsed_json["gpsOdometerMeters"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsGpsOdometerMetersWithDecoration.from_json(json_object: item) end id = parsed_json["id"] intake_manifold_temperature_milli_c = parsed_json["intakeManifoldTemperatureMilliC"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsIntakeManifoldTempMilliCWithDecoration.from_json(json_object: item) end name = parsed_json["name"] nfc_card_scans = parsed_json["nfcCardScans"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsNfcCardScanWithDecoration.from_json(json_object: item) end obd_engine_seconds = parsed_json["obdEngineSeconds"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsObdEngineSecondsWithDecoration.from_json(json_object: item) end obd_odometer_meters = parsed_json["obdOdometerMeters"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsObdOdometerMetersWithDecoration.from_json(json_object: item) end seatbelt_driver = parsed_json["seatbeltDriver"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsSeatbeltDriver.from_json(json_object: item) end spreader_active = parsed_json["spreaderActive"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsSpreaderActive.from_json(json_object: item) end spreader_air_temp = parsed_json["spreaderAirTemp"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsSpreaderAirTemp.from_json(json_object: item) end spreader_blast_state = parsed_json["spreaderBlastState"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsSpreaderBlastState.from_json(json_object: item) end spreader_granular_name = parsed_json["spreaderGranularName"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsSpreaderGranularName.from_json(json_object: item) end spreader_granular_rate = parsed_json["spreaderGranularRate"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsSpreaderGranularRate.from_json(json_object: item) end spreader_liquid_name = parsed_json["spreaderLiquidName"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsSpreaderLiquidName.from_json(json_object: item) end spreader_liquid_rate = parsed_json["spreaderLiquidRate"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsSpreaderLiquidRate.from_json(json_object: item) end spreader_on_state = parsed_json["spreaderOnState"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsSpreaderOnState.from_json(json_object: item) end spreader_plow_status = parsed_json["spreaderPlowStatus"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsSpreaderPlowStatus.from_json(json_object: item) end spreader_prewet_name = parsed_json["spreaderPrewetName"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsSpreaderPrewetName.from_json(json_object: item) end spreader_prewet_rate = parsed_json["spreaderPrewetRate"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsSpreaderPrewetRate.from_json(json_object: item) end spreader_road_temp = parsed_json["spreaderRoadTemp"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsSpreaderRoadTemp.from_json(json_object: item) end synthetic_engine_seconds = parsed_json["syntheticEngineSeconds"]&.map do | item | item = item.to_json Samsara::Types::VehicleStatsListSyntheticEngineSeconds.from_json(json_object: item) end new( ambient_air_temperature_milli_c: ambient_air_temperature_milli_c, aux_input_1: aux_input_1, aux_input_10: aux_input_10, aux_input_11: aux_input_11, aux_input_12: aux_input_12, aux_input_13: aux_input_13, aux_input_2: aux_input_2, aux_input_3: aux_input_3, aux_input_4: aux_input_4, aux_input_5: aux_input_5, aux_input_6: aux_input_6, aux_input_7: aux_input_7, aux_input_8: aux_input_8, aux_input_9: aux_input_9, barometric_pressure_pa: , battery_milli_volts: battery_milli_volts, def_level_milli_percent: def_level_milli_percent, ecu_speed_mph: ecu_speed_mph, engine_coolant_temperature_milli_c: engine_coolant_temperature_milli_c, engine_immobilizer: engine_immobilizer, engine_load_percent: engine_load_percent, engine_oil_pressure_k_pa: engine_oil_pressure_k_pa, engine_rpm: engine_rpm, engine_states: engine_states, ev_average_battery_temperature_milli_celsius: ev_average_battery_temperature_milli_celsius, ev_battery_current_milli_amp: ev_battery_current_milli_amp, ev_battery_state_of_health_milli_percent: ev_battery_state_of_health_milli_percent, ev_battery_voltage_milli_volt: ev_battery_voltage_milli_volt, ev_charging_current_milli_amp: ev_charging_current_milli_amp, ev_charging_energy_micro_wh: ev_charging_energy_micro_wh, ev_charging_status: ev_charging_status, ev_charging_voltage_milli_volt: ev_charging_voltage_milli_volt, ev_consumed_energy_micro_wh: ev_consumed_energy_micro_wh, ev_distance_driven_meters: ev_distance_driven_meters, ev_regenerated_energy_micro_wh: ev_regenerated_energy_micro_wh, ev_state_of_charge_milli_percent: ev_state_of_charge_milli_percent, external_ids: external_ids, fault_codes: fault_codes, fuel_percents: fuel_percents, gps: gps, gps_distance_meters: gps_distance_meters, gps_odometer_meters: gps_odometer_meters, id: id, intake_manifold_temperature_milli_c: intake_manifold_temperature_milli_c, name: name, nfc_card_scans: nfc_card_scans, obd_engine_seconds: obd_engine_seconds, obd_odometer_meters: obd_odometer_meters, seatbelt_driver: seatbelt_driver, spreader_active: spreader_active, spreader_air_temp: spreader_air_temp, spreader_blast_state: spreader_blast_state, spreader_granular_name: spreader_granular_name, spreader_granular_rate: spreader_granular_rate, spreader_liquid_name: spreader_liquid_name, spreader_liquid_rate: spreader_liquid_rate, spreader_on_state: spreader_on_state, spreader_plow_status: spreader_plow_status, spreader_prewet_name: spreader_prewet_name, spreader_prewet_rate: spreader_prewet_rate, spreader_road_temp: spreader_road_temp, synthetic_engine_seconds: synthetic_engine_seconds, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 695 def self.validate_raw(obj:) obj.ambient_air_temperature_milli_c&.is_a?(Array) != false || raise("Passed value for field obj.ambient_air_temperature_milli_c is not the expected type, validation failed.") obj.aux_input_1&.is_a?(Array) != false || raise("Passed value for field obj.aux_input_1 is not the expected type, validation failed.") obj.aux_input_10&.is_a?(Array) != false || raise("Passed value for field obj.aux_input_10 is not the expected type, validation failed.") obj.aux_input_11&.is_a?(Array) != false || raise("Passed value for field obj.aux_input_11 is not the expected type, validation failed.") obj.aux_input_12&.is_a?(Array) != false || raise("Passed value for field obj.aux_input_12 is not the expected type, validation failed.") obj.aux_input_13&.is_a?(Array) != false || raise("Passed value for field obj.aux_input_13 is not the expected type, validation failed.") obj.aux_input_2&.is_a?(Array) != false || raise("Passed value for field obj.aux_input_2 is not the expected type, validation failed.") obj.aux_input_3&.is_a?(Array) != false || raise("Passed value for field obj.aux_input_3 is not the expected type, validation failed.") obj.aux_input_4&.is_a?(Array) != false || raise("Passed value for field obj.aux_input_4 is not the expected type, validation failed.") obj.aux_input_5&.is_a?(Array) != false || raise("Passed value for field obj.aux_input_5 is not the expected type, validation failed.") obj.aux_input_6&.is_a?(Array) != false || raise("Passed value for field obj.aux_input_6 is not the expected type, validation failed.") obj.aux_input_7&.is_a?(Array) != false || raise("Passed value for field obj.aux_input_7 is not the expected type, validation failed.") obj.aux_input_8&.is_a?(Array) != false || raise("Passed value for field obj.aux_input_8 is not the expected type, validation failed.") obj.aux_input_9&.is_a?(Array) != false || raise("Passed value for field obj.aux_input_9 is not the expected type, validation failed.") obj.&.is_a?(Array) != false || raise("Passed value for field obj.barometric_pressure_pa is not the expected type, validation failed.") obj.battery_milli_volts&.is_a?(Array) != false || raise("Passed value for field obj.battery_milli_volts is not the expected type, validation failed.") obj.def_level_milli_percent&.is_a?(Array) != false || raise("Passed value for field obj.def_level_milli_percent is not the expected type, validation failed.") obj.ecu_speed_mph&.is_a?(Array) != false || raise("Passed value for field obj.ecu_speed_mph is not the expected type, validation failed.") obj.engine_coolant_temperature_milli_c&.is_a?(Array) != false || raise("Passed value for field obj.engine_coolant_temperature_milli_c is not the expected type, validation failed.") obj.engine_immobilizer&.is_a?(Array) != false || raise("Passed value for field obj.engine_immobilizer is not the expected type, validation failed.") obj.engine_load_percent&.is_a?(Array) != false || raise("Passed value for field obj.engine_load_percent is not the expected type, validation failed.") obj.engine_oil_pressure_k_pa&.is_a?(Array) != false || raise("Passed value for field obj.engine_oil_pressure_k_pa is not the expected type, validation failed.") obj.engine_rpm&.is_a?(Array) != false || raise("Passed value for field obj.engine_rpm is not the expected type, validation failed.") obj.engine_states&.is_a?(Array) != false || raise("Passed value for field obj.engine_states is not the expected type, validation failed.") obj.ev_average_battery_temperature_milli_celsius&.is_a?(Array) != false || raise("Passed value for field obj.ev_average_battery_temperature_milli_celsius is not the expected type, validation failed.") obj.ev_battery_current_milli_amp&.is_a?(Array) != false || raise("Passed value for field obj.ev_battery_current_milli_amp is not the expected type, validation failed.") obj.ev_battery_state_of_health_milli_percent&.is_a?(Array) != false || raise("Passed value for field obj.ev_battery_state_of_health_milli_percent is not the expected type, validation failed.") obj.ev_battery_voltage_milli_volt&.is_a?(Array) != false || raise("Passed value for field obj.ev_battery_voltage_milli_volt is not the expected type, validation failed.") obj.ev_charging_current_milli_amp&.is_a?(Array) != false || raise("Passed value for field obj.ev_charging_current_milli_amp is not the expected type, validation failed.") obj.ev_charging_energy_micro_wh&.is_a?(Array) != false || raise("Passed value for field obj.ev_charging_energy_micro_wh is not the expected type, validation failed.") obj.ev_charging_status&.is_a?(Array) != false || raise("Passed value for field obj.ev_charging_status is not the expected type, validation failed.") obj.ev_charging_voltage_milli_volt&.is_a?(Array) != false || raise("Passed value for field obj.ev_charging_voltage_milli_volt is not the expected type, validation failed.") obj.ev_consumed_energy_micro_wh&.is_a?(Array) != false || raise("Passed value for field obj.ev_consumed_energy_micro_wh is not the expected type, validation failed.") obj.ev_distance_driven_meters&.is_a?(Array) != false || raise("Passed value for field obj.ev_distance_driven_meters is not the expected type, validation failed.") obj.ev_regenerated_energy_micro_wh&.is_a?(Array) != false || raise("Passed value for field obj.ev_regenerated_energy_micro_wh is not the expected type, validation failed.") obj.ev_state_of_charge_milli_percent&.is_a?(Array) != false || raise("Passed value for field obj.ev_state_of_charge_milli_percent is not the expected type, validation failed.") obj.external_ids&.is_a?(Hash) != false || raise("Passed value for field obj.external_ids is not the expected type, validation failed.") obj.fault_codes&.is_a?(Array) != false || raise("Passed value for field obj.fault_codes is not the expected type, validation failed.") obj.fuel_percents&.is_a?(Array) != false || raise("Passed value for field obj.fuel_percents is not the expected type, validation failed.") obj.gps&.is_a?(Array) != false || raise("Passed value for field obj.gps is not the expected type, validation failed.") obj.gps_distance_meters&.is_a?(Array) != false || raise("Passed value for field obj.gps_distance_meters is not the expected type, validation failed.") obj.gps_odometer_meters&.is_a?(Array) != false || raise("Passed value for field obj.gps_odometer_meters is not the expected type, validation failed.") obj.id&.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.") obj.intake_manifold_temperature_milli_c&.is_a?(Array) != false || raise("Passed value for field obj.intake_manifold_temperature_milli_c is not the expected type, validation failed.") obj.name&.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.") obj.nfc_card_scans&.is_a?(Array) != false || raise("Passed value for field obj.nfc_card_scans is not the expected type, validation failed.") obj.obd_engine_seconds&.is_a?(Array) != false || raise("Passed value for field obj.obd_engine_seconds is not the expected type, validation failed.") obj.obd_odometer_meters&.is_a?(Array) != false || raise("Passed value for field obj.obd_odometer_meters is not the expected type, validation failed.") obj.seatbelt_driver&.is_a?(Array) != false || raise("Passed value for field obj.seatbelt_driver is not the expected type, validation failed.") obj.spreader_active&.is_a?(Array) != false || raise("Passed value for field obj.spreader_active is not the expected type, validation failed.") obj.spreader_air_temp&.is_a?(Array) != false || raise("Passed value for field obj.spreader_air_temp is not the expected type, validation failed.") obj.spreader_blast_state&.is_a?(Array) != false || raise("Passed value for field obj.spreader_blast_state is not the expected type, validation failed.") obj.spreader_granular_name&.is_a?(Array) != false || raise("Passed value for field obj.spreader_granular_name is not the expected type, validation failed.") obj.spreader_granular_rate&.is_a?(Array) != false || raise("Passed value for field obj.spreader_granular_rate is not the expected type, validation failed.") obj.spreader_liquid_name&.is_a?(Array) != false || raise("Passed value for field obj.spreader_liquid_name is not the expected type, validation failed.") obj.spreader_liquid_rate&.is_a?(Array) != false || raise("Passed value for field obj.spreader_liquid_rate is not the expected type, validation failed.") obj.spreader_on_state&.is_a?(Array) != false || raise("Passed value for field obj.spreader_on_state is not the expected type, validation failed.") obj.spreader_plow_status&.is_a?(Array) != false || raise("Passed value for field obj.spreader_plow_status is not the expected type, validation failed.") obj.spreader_prewet_name&.is_a?(Array) != false || raise("Passed value for field obj.spreader_prewet_name is not the expected type, validation failed.") obj.spreader_prewet_rate&.is_a?(Array) != false || raise("Passed value for field obj.spreader_prewet_rate is not the expected type, validation failed.") obj.spreader_road_temp&.is_a?(Array) != false || raise("Passed value for field obj.spreader_road_temp is not the expected type, validation failed.") obj.synthetic_engine_seconds&.is_a?(Array) != false || raise("Passed value for field obj.synthetic_engine_seconds is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
686 687 688 |
# File 'lib/samsara_api/types/vehicle_stats_list_response_data.rb', line 686 def to_json @_field_set&.to_json end |