Class: Samsara::Types::HarshTurnSensitivityV2SettingsObjectResponseBody
- Inherits:
-
Object
- Object
- Samsara::Types::HarshTurnSensitivityV2SettingsObjectResponseBody
- Defined in:
- lib/samsara_api/types/harsh_turn_sensitivity_v_2_settings_object_response_body.rb
Overview
The harsh turn sensitivity settings.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#heavy_duty ⇒ Object
readonly
‘unknown`, `invalid`, `off`, `veryLow`, `low`, `normal`, `high`.
-
#light_duty ⇒ Object
readonly
‘unknown`, `invalid`, `off`, `veryLow`, `low`, `normal`, `high`.
-
#passenger ⇒ Object
readonly
‘invalid`, `off`, `veryLow`, `low`, `normal`, `high`.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Samsara::Types::HarshTurnSensitivityV2SettingsObjectResponseBody
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(heavy_duty: OMIT, light_duty: OMIT, passenger: OMIT, additional_properties: nil) ⇒ Samsara::Types::HarshTurnSensitivityV2SettingsObjectResponseBody constructor
- #to_json ⇒ String
Constructor Details
#initialize(heavy_duty: OMIT, light_duty: OMIT, passenger: OMIT, additional_properties: nil) ⇒ Samsara::Types::HarshTurnSensitivityV2SettingsObjectResponseBody
37 38 39 40 41 42 43 44 45 |
# File 'lib/samsara_api/types/harsh_turn_sensitivity_v_2_settings_object_response_body.rb', line 37 def initialize(heavy_duty: OMIT, light_duty: OMIT, passenger: OMIT, additional_properties: nil) @heavy_duty = heavy_duty if heavy_duty != OMIT @light_duty = light_duty if light_duty != OMIT @passenger = passenger if passenger != OMIT @additional_properties = additional_properties @_field_set = { "heavyDuty": heavy_duty, "lightDuty": light_duty, "passenger": passenger }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
22 23 24 |
# File 'lib/samsara_api/types/harsh_turn_sensitivity_v_2_settings_object_response_body.rb', line 22 def additional_properties @additional_properties end |
#heavy_duty ⇒ Object (readonly)
‘unknown`, `invalid`, `off`, `veryLow`, `low`, `normal`, `high`
14 15 16 |
# File 'lib/samsara_api/types/harsh_turn_sensitivity_v_2_settings_object_response_body.rb', line 14 def heavy_duty @heavy_duty end |
#light_duty ⇒ Object (readonly)
‘unknown`, `invalid`, `off`, `veryLow`, `low`, `normal`, `high`
17 18 19 |
# File 'lib/samsara_api/types/harsh_turn_sensitivity_v_2_settings_object_response_body.rb', line 17 def light_duty @light_duty end |
#passenger ⇒ Object (readonly)
‘invalid`, `off`, `veryLow`, `low`, `normal`, `high`
20 21 22 |
# File 'lib/samsara_api/types/harsh_turn_sensitivity_v_2_settings_object_response_body.rb', line 20 def passenger @passenger end |
Class Method Details
.from_json(json_object:) ⇒ Samsara::Types::HarshTurnSensitivityV2SettingsObjectResponseBody
51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/samsara_api/types/harsh_turn_sensitivity_v_2_settings_object_response_body.rb', line 51 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) heavy_duty = parsed_json["heavyDuty"] light_duty = parsed_json["lightDuty"] passenger = parsed_json["passenger"] new( heavy_duty: heavy_duty, light_duty: light_duty, passenger: passenger, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
77 78 79 80 81 |
# File 'lib/samsara_api/types/harsh_turn_sensitivity_v_2_settings_object_response_body.rb', line 77 def self.validate_raw(obj:) obj.heavy_duty&.is_a?(Samsara::Types::HarshTurnSensitivityV2SettingsObjectResponseBodyHeavyDuty) != false || raise("Passed value for field obj.heavy_duty is not the expected type, validation failed.") obj.light_duty&.is_a?(Samsara::Types::HarshTurnSensitivityV2SettingsObjectResponseBodyLightDuty) != false || raise("Passed value for field obj.light_duty is not the expected type, validation failed.") obj.passenger&.is_a?(Samsara::Types::HarshTurnSensitivityV2SettingsObjectResponseBodyPassenger) != false || raise("Passed value for field obj.passenger is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
68 69 70 |
# File 'lib/samsara_api/types/harsh_turn_sensitivity_v_2_settings_object_response_body.rb', line 68 def to_json @_field_set&.to_json end |