Class: Samsara::Types::Driver
- Inherits:
-
Object
- Object
- Samsara::Types::Driver
- Defined in:
- lib/samsara_api/types/driver.rb
Overview
A driver object
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#attributes ⇒ Array<Samsara::Types::AttributeTiny>
readonly
A minified attribute.
- #carrier_settings ⇒ Samsara::Types::DriverCarrierSettings readonly
- #created_at_time ⇒ String readonly
- #current_id_card_code ⇒ String readonly
- #driver_activation_status ⇒ Samsara::Types::DriverActivationStatus readonly
- #eld_adverse_weather_exemption_enabled ⇒ Boolean readonly
- #eld_big_day_exemption_enabled ⇒ Boolean readonly
- #eld_day_start_hour ⇒ Integer readonly
- #eld_exempt ⇒ Boolean readonly
- #eld_exempt_reason ⇒ String readonly
- #eld_pc_enabled ⇒ Boolean readonly
- #eld_settings ⇒ Samsara::Types::DriverEldSettings readonly
- #eld_ym_enabled ⇒ Boolean readonly
- #external_ids ⇒ Samsara::Types::DRIVER_EXTERNAL_IDS readonly
- #has_driving_features_hidden ⇒ Boolean readonly
- #id ⇒ String readonly
- #is_deactivated ⇒ Boolean readonly
- #license_number ⇒ String readonly
- #license_state ⇒ String readonly
- #locale ⇒ Samsara::Types::DriverLocale readonly
- #name ⇒ String readonly
- #notes ⇒ String readonly
- #peer_group_tag ⇒ Samsara::Types::TagTinyResponse readonly
- #phone ⇒ String readonly
- #static_assigned_vehicle ⇒ Samsara::Types::DriverStaticAssignedVehicle readonly
- #tachograph_card_number ⇒ String readonly
- #tags ⇒ Samsara::Types::DRIVER_TAGS readonly
- #timezone ⇒ String readonly
- #updated_at_time ⇒ String readonly
- #us_driver_ruleset_override ⇒ Samsara::Types::UsDriverRulesetOverride readonly
- #username ⇒ String readonly
- #vehicle_group_tag ⇒ Samsara::Types::DriverVehicleGroupTag readonly
- #waiting_time_duty_status_enabled ⇒ Boolean readonly
Class Method Summary collapse
Instance Method Summary collapse
- #initialize(attributes: OMIT, carrier_settings: OMIT, created_at_time: OMIT, current_id_card_code: OMIT, driver_activation_status: OMIT, eld_adverse_weather_exemption_enabled: OMIT, eld_big_day_exemption_enabled: OMIT, eld_day_start_hour: OMIT, eld_exempt: OMIT, eld_exempt_reason: OMIT, eld_pc_enabled: OMIT, eld_settings: OMIT, eld_ym_enabled: OMIT, external_ids: OMIT, has_driving_features_hidden: OMIT, id: OMIT, is_deactivated: OMIT, license_number: OMIT, license_state: OMIT, locale: OMIT, name: OMIT, notes: OMIT, peer_group_tag: OMIT, phone: OMIT, static_assigned_vehicle: OMIT, tachograph_card_number: OMIT, tags: OMIT, timezone: OMIT, updated_at_time: OMIT, us_driver_ruleset_override: OMIT, username: OMIT, vehicle_group_tag: OMIT, waiting_time_duty_status_enabled: OMIT, additional_properties: nil) ⇒ Samsara::Types::Driver constructor
- #to_json ⇒ String
Constructor Details
#initialize(attributes: OMIT, carrier_settings: OMIT, created_at_time: OMIT, current_id_card_code: OMIT, driver_activation_status: OMIT, eld_adverse_weather_exemption_enabled: OMIT, eld_big_day_exemption_enabled: OMIT, eld_day_start_hour: OMIT, eld_exempt: OMIT, eld_exempt_reason: OMIT, eld_pc_enabled: OMIT, eld_settings: OMIT, eld_ym_enabled: OMIT, external_ids: OMIT, has_driving_features_hidden: OMIT, id: OMIT, is_deactivated: OMIT, license_number: OMIT, license_state: OMIT, locale: OMIT, name: OMIT, notes: OMIT, peer_group_tag: OMIT, phone: OMIT, static_assigned_vehicle: OMIT, tachograph_card_number: OMIT, tags: OMIT, timezone: OMIT, updated_at_time: OMIT, us_driver_ruleset_override: OMIT, username: OMIT, vehicle_group_tag: OMIT, waiting_time_duty_status_enabled: OMIT, additional_properties: nil) ⇒ Samsara::Types::Driver
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/samsara_api/types/driver.rb', line 129 def initialize(attributes: OMIT, carrier_settings: OMIT, created_at_time: OMIT, current_id_card_code: OMIT, driver_activation_status: OMIT, eld_adverse_weather_exemption_enabled: OMIT, eld_big_day_exemption_enabled: OMIT, eld_day_start_hour: OMIT, eld_exempt: OMIT, eld_exempt_reason: OMIT, eld_pc_enabled: OMIT, eld_settings: OMIT, eld_ym_enabled: OMIT, external_ids: OMIT, has_driving_features_hidden: OMIT, id: OMIT, is_deactivated: OMIT, license_number: OMIT, license_state: OMIT, locale: OMIT, name: OMIT, notes: OMIT, peer_group_tag: OMIT, phone: OMIT, static_assigned_vehicle: OMIT, tachograph_card_number: OMIT, tags: OMIT, timezone: OMIT, updated_at_time: OMIT, us_driver_ruleset_override: OMIT, username: OMIT, vehicle_group_tag: OMIT, waiting_time_duty_status_enabled: OMIT, additional_properties: nil) @attributes = attributes if attributes != OMIT @carrier_settings = carrier_settings if carrier_settings != OMIT @created_at_time = created_at_time if created_at_time != OMIT @current_id_card_code = current_id_card_code if current_id_card_code != OMIT @driver_activation_status = driver_activation_status if driver_activation_status != OMIT @eld_adverse_weather_exemption_enabled = eld_adverse_weather_exemption_enabled if eld_adverse_weather_exemption_enabled != OMIT @eld_big_day_exemption_enabled = eld_big_day_exemption_enabled if eld_big_day_exemption_enabled != OMIT @eld_day_start_hour = eld_day_start_hour if eld_day_start_hour != OMIT @eld_exempt = eld_exempt if eld_exempt != OMIT @eld_exempt_reason = eld_exempt_reason if eld_exempt_reason != OMIT @eld_pc_enabled = eld_pc_enabled if eld_pc_enabled != OMIT @eld_settings = eld_settings if eld_settings != OMIT @eld_ym_enabled = eld_ym_enabled if eld_ym_enabled != OMIT @external_ids = external_ids if external_ids != OMIT @has_driving_features_hidden = has_driving_features_hidden if has_driving_features_hidden != OMIT @id = id if id != OMIT @is_deactivated = is_deactivated if is_deactivated != OMIT @license_number = license_number if license_number != OMIT @license_state = license_state if license_state != OMIT @locale = locale if locale != OMIT @name = name if name != OMIT @notes = notes if notes != OMIT @peer_group_tag = peer_group_tag if peer_group_tag != OMIT @phone = phone if phone != OMIT @static_assigned_vehicle = static_assigned_vehicle if static_assigned_vehicle != OMIT @tachograph_card_number = tachograph_card_number if tachograph_card_number != OMIT @tags = if != OMIT @timezone = timezone if timezone != OMIT @updated_at_time = updated_at_time if updated_at_time != OMIT @us_driver_ruleset_override = us_driver_ruleset_override if us_driver_ruleset_override != OMIT @username = username if username != OMIT @vehicle_group_tag = vehicle_group_tag if vehicle_group_tag != OMIT @waiting_time_duty_status_enabled = waiting_time_duty_status_enabled if waiting_time_duty_status_enabled != OMIT @additional_properties = additional_properties @_field_set = { "attributes": attributes, "carrierSettings": carrier_settings, "createdAtTime": created_at_time, "currentIdCardCode": current_id_card_code, "driverActivationStatus": driver_activation_status, "eldAdverseWeatherExemptionEnabled": eld_adverse_weather_exemption_enabled, "eldBigDayExemptionEnabled": eld_big_day_exemption_enabled, "eldDayStartHour": eld_day_start_hour, "eldExempt": eld_exempt, "eldExemptReason": eld_exempt_reason, "eldPcEnabled": eld_pc_enabled, "eldSettings": eld_settings, "eldYmEnabled": eld_ym_enabled, "externalIds": external_ids, "hasDrivingFeaturesHidden": has_driving_features_hidden, "id": id, "isDeactivated": is_deactivated, "licenseNumber": license_number, "licenseState": license_state, "locale": locale, "name": name, "notes": notes, "peerGroupTag": peer_group_tag, "phone": phone, "staticAssignedVehicle": static_assigned_vehicle, "tachographCardNumber": tachograph_card_number, "tags": , "timezone": timezone, "updatedAtTime": updated_at_time, "usDriverRulesetOverride": us_driver_ruleset_override, "username": username, "vehicleGroupTag": vehicle_group_tag, "waitingTimeDutyStatusEnabled": waiting_time_duty_status_enabled }.reject do | _k, v | v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
87 88 89 |
# File 'lib/samsara_api/types/driver.rb', line 87 def additional_properties @additional_properties end |
#attributes ⇒ Array<Samsara::Types::AttributeTiny> (readonly)
Returns A minified attribute.
21 22 23 |
# File 'lib/samsara_api/types/driver.rb', line 21 def attributes @attributes end |
#carrier_settings ⇒ Samsara::Types::DriverCarrierSettings (readonly)
23 24 25 |
# File 'lib/samsara_api/types/driver.rb', line 23 def carrier_settings @carrier_settings end |
#created_at_time ⇒ String (readonly)
25 26 27 |
# File 'lib/samsara_api/types/driver.rb', line 25 def created_at_time @created_at_time end |
#current_id_card_code ⇒ String (readonly)
27 28 29 |
# File 'lib/samsara_api/types/driver.rb', line 27 def current_id_card_code @current_id_card_code end |
#driver_activation_status ⇒ Samsara::Types::DriverActivationStatus (readonly)
29 30 31 |
# File 'lib/samsara_api/types/driver.rb', line 29 def driver_activation_status @driver_activation_status end |
#eld_adverse_weather_exemption_enabled ⇒ Boolean (readonly)
31 32 33 |
# File 'lib/samsara_api/types/driver.rb', line 31 def eld_adverse_weather_exemption_enabled @eld_adverse_weather_exemption_enabled end |
#eld_big_day_exemption_enabled ⇒ Boolean (readonly)
33 34 35 |
# File 'lib/samsara_api/types/driver.rb', line 33 def eld_big_day_exemption_enabled @eld_big_day_exemption_enabled end |
#eld_day_start_hour ⇒ Integer (readonly)
35 36 37 |
# File 'lib/samsara_api/types/driver.rb', line 35 def eld_day_start_hour @eld_day_start_hour end |
#eld_exempt ⇒ Boolean (readonly)
37 38 39 |
# File 'lib/samsara_api/types/driver.rb', line 37 def eld_exempt @eld_exempt end |
#eld_exempt_reason ⇒ String (readonly)
39 40 41 |
# File 'lib/samsara_api/types/driver.rb', line 39 def eld_exempt_reason @eld_exempt_reason end |
#eld_pc_enabled ⇒ Boolean (readonly)
41 42 43 |
# File 'lib/samsara_api/types/driver.rb', line 41 def eld_pc_enabled @eld_pc_enabled end |
#eld_settings ⇒ Samsara::Types::DriverEldSettings (readonly)
43 44 45 |
# File 'lib/samsara_api/types/driver.rb', line 43 def eld_settings @eld_settings end |
#eld_ym_enabled ⇒ Boolean (readonly)
45 46 47 |
# File 'lib/samsara_api/types/driver.rb', line 45 def eld_ym_enabled @eld_ym_enabled end |
#external_ids ⇒ Samsara::Types::DRIVER_EXTERNAL_IDS (readonly)
47 48 49 |
# File 'lib/samsara_api/types/driver.rb', line 47 def external_ids @external_ids end |
#has_driving_features_hidden ⇒ Boolean (readonly)
49 50 51 |
# File 'lib/samsara_api/types/driver.rb', line 49 def has_driving_features_hidden @has_driving_features_hidden end |
#id ⇒ String (readonly)
51 52 53 |
# File 'lib/samsara_api/types/driver.rb', line 51 def id @id end |
#is_deactivated ⇒ Boolean (readonly)
53 54 55 |
# File 'lib/samsara_api/types/driver.rb', line 53 def is_deactivated @is_deactivated end |
#license_number ⇒ String (readonly)
55 56 57 |
# File 'lib/samsara_api/types/driver.rb', line 55 def license_number @license_number end |
#license_state ⇒ String (readonly)
57 58 59 |
# File 'lib/samsara_api/types/driver.rb', line 57 def license_state @license_state end |
#locale ⇒ Samsara::Types::DriverLocale (readonly)
59 60 61 |
# File 'lib/samsara_api/types/driver.rb', line 59 def locale @locale end |
#name ⇒ String (readonly)
61 62 63 |
# File 'lib/samsara_api/types/driver.rb', line 61 def name @name end |
#notes ⇒ String (readonly)
63 64 65 |
# File 'lib/samsara_api/types/driver.rb', line 63 def notes @notes end |
#peer_group_tag ⇒ Samsara::Types::TagTinyResponse (readonly)
65 66 67 |
# File 'lib/samsara_api/types/driver.rb', line 65 def peer_group_tag @peer_group_tag end |
#phone ⇒ String (readonly)
67 68 69 |
# File 'lib/samsara_api/types/driver.rb', line 67 def phone @phone end |
#static_assigned_vehicle ⇒ Samsara::Types::DriverStaticAssignedVehicle (readonly)
69 70 71 |
# File 'lib/samsara_api/types/driver.rb', line 69 def static_assigned_vehicle @static_assigned_vehicle end |
#tachograph_card_number ⇒ String (readonly)
71 72 73 |
# File 'lib/samsara_api/types/driver.rb', line 71 def tachograph_card_number @tachograph_card_number end |
#tags ⇒ Samsara::Types::DRIVER_TAGS (readonly)
73 74 75 |
# File 'lib/samsara_api/types/driver.rb', line 73 def @tags end |
#timezone ⇒ String (readonly)
75 76 77 |
# File 'lib/samsara_api/types/driver.rb', line 75 def timezone @timezone end |
#updated_at_time ⇒ String (readonly)
77 78 79 |
# File 'lib/samsara_api/types/driver.rb', line 77 def updated_at_time @updated_at_time end |
#us_driver_ruleset_override ⇒ Samsara::Types::UsDriverRulesetOverride (readonly)
79 80 81 |
# File 'lib/samsara_api/types/driver.rb', line 79 def us_driver_ruleset_override @us_driver_ruleset_override end |
#username ⇒ String (readonly)
81 82 83 |
# File 'lib/samsara_api/types/driver.rb', line 81 def username @username end |
#vehicle_group_tag ⇒ Samsara::Types::DriverVehicleGroupTag (readonly)
83 84 85 |
# File 'lib/samsara_api/types/driver.rb', line 83 def vehicle_group_tag @vehicle_group_tag end |
#waiting_time_duty_status_enabled ⇒ Boolean (readonly)
85 86 87 |
# File 'lib/samsara_api/types/driver.rb', line 85 def waiting_time_duty_status_enabled @waiting_time_duty_status_enabled end |
Class Method Details
.from_json(json_object:) ⇒ Samsara::Types::Driver
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 |
# File 'lib/samsara_api/types/driver.rb', line 172 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) attributes = parsed_json["attributes"]&.map do | item | item = item.to_json Samsara::Types::AttributeTiny.from_json(json_object: item) end unless parsed_json["carrierSettings"].nil? carrier_settings = parsed_json["carrierSettings"].to_json carrier_settings = Samsara::Types::DriverCarrierSettings.from_json(json_object: carrier_settings) else carrier_settings = nil end created_at_time = parsed_json["createdAtTime"] current_id_card_code = parsed_json["currentIdCardCode"] driver_activation_status = parsed_json["driverActivationStatus"] eld_adverse_weather_exemption_enabled = parsed_json["eldAdverseWeatherExemptionEnabled"] eld_big_day_exemption_enabled = parsed_json["eldBigDayExemptionEnabled"] eld_day_start_hour = parsed_json["eldDayStartHour"] eld_exempt = parsed_json["eldExempt"] eld_exempt_reason = parsed_json["eldExemptReason"] eld_pc_enabled = parsed_json["eldPcEnabled"] unless parsed_json["eldSettings"].nil? eld_settings = parsed_json["eldSettings"].to_json eld_settings = Samsara::Types::DriverEldSettings.from_json(json_object: eld_settings) else eld_settings = nil end eld_ym_enabled = parsed_json["eldYmEnabled"] external_ids = parsed_json["externalIds"] has_driving_features_hidden = parsed_json["hasDrivingFeaturesHidden"] id = parsed_json["id"] is_deactivated = parsed_json["isDeactivated"] license_number = parsed_json["licenseNumber"] license_state = parsed_json["licenseState"] locale = parsed_json["locale"] name = parsed_json["name"] notes = parsed_json["notes"] unless parsed_json["peerGroupTag"].nil? peer_group_tag = parsed_json["peerGroupTag"].to_json peer_group_tag = Samsara::Types::TagTinyResponse.from_json(json_object: peer_group_tag) else peer_group_tag = nil end phone = parsed_json["phone"] unless parsed_json["staticAssignedVehicle"].nil? static_assigned_vehicle = parsed_json["staticAssignedVehicle"].to_json static_assigned_vehicle = Samsara::Types::DriverStaticAssignedVehicle.from_json(json_object: static_assigned_vehicle) else static_assigned_vehicle = nil end tachograph_card_number = parsed_json["tachographCardNumber"] = parsed_json["tags"]&.map do | item | item = item.to_json Samsara::Types::TagTinyResponse.from_json(json_object: item) end timezone = parsed_json["timezone"] updated_at_time = parsed_json["updatedAtTime"] unless parsed_json["usDriverRulesetOverride"].nil? us_driver_ruleset_override = parsed_json["usDriverRulesetOverride"].to_json us_driver_ruleset_override = Samsara::Types::UsDriverRulesetOverride.from_json(json_object: us_driver_ruleset_override) else us_driver_ruleset_override = nil end username = parsed_json["username"] unless parsed_json["vehicleGroupTag"].nil? vehicle_group_tag = parsed_json["vehicleGroupTag"].to_json vehicle_group_tag = Samsara::Types::DriverVehicleGroupTag.from_json(json_object: vehicle_group_tag) else vehicle_group_tag = nil end waiting_time_duty_status_enabled = parsed_json["waitingTimeDutyStatusEnabled"] new( attributes: attributes, carrier_settings: carrier_settings, created_at_time: created_at_time, current_id_card_code: current_id_card_code, driver_activation_status: driver_activation_status, eld_adverse_weather_exemption_enabled: eld_adverse_weather_exemption_enabled, eld_big_day_exemption_enabled: eld_big_day_exemption_enabled, eld_day_start_hour: eld_day_start_hour, eld_exempt: eld_exempt, eld_exempt_reason: eld_exempt_reason, eld_pc_enabled: eld_pc_enabled, eld_settings: eld_settings, eld_ym_enabled: eld_ym_enabled, external_ids: external_ids, has_driving_features_hidden: has_driving_features_hidden, id: id, is_deactivated: is_deactivated, license_number: license_number, license_state: license_state, locale: locale, name: name, notes: notes, peer_group_tag: peer_group_tag, phone: phone, static_assigned_vehicle: static_assigned_vehicle, tachograph_card_number: tachograph_card_number, tags: , timezone: timezone, updated_at_time: updated_at_time, us_driver_ruleset_override: us_driver_ruleset_override, username: username, vehicle_group_tag: vehicle_group_tag, waiting_time_duty_status_enabled: waiting_time_duty_status_enabled, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
293 294 295 296 297 298 299 300 301 302 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 |
# File 'lib/samsara_api/types/driver.rb', line 293 def self.validate_raw(obj:) obj.attributes&.is_a?(Array) != false || raise("Passed value for field obj.attributes is not the expected type, validation failed.") obj.carrier_settings.nil? || Samsara::Types::DriverCarrierSettings.validate_raw(obj: obj.carrier_settings) obj.created_at_time&.is_a?(String) != false || raise("Passed value for field obj.created_at_time is not the expected type, validation failed.") obj.current_id_card_code&.is_a?(String) != false || raise("Passed value for field obj.current_id_card_code is not the expected type, validation failed.") obj.driver_activation_status&.is_a?(Samsara::Types::DriverActivationStatus) != false || raise("Passed value for field obj.driver_activation_status is not the expected type, validation failed.") obj.eld_adverse_weather_exemption_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.eld_adverse_weather_exemption_enabled is not the expected type, validation failed.") obj.eld_big_day_exemption_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.eld_big_day_exemption_enabled is not the expected type, validation failed.") obj.eld_day_start_hour&.is_a?(Integer) != false || raise("Passed value for field obj.eld_day_start_hour is not the expected type, validation failed.") obj.eld_exempt&.is_a?(Boolean) != false || raise("Passed value for field obj.eld_exempt is not the expected type, validation failed.") obj.eld_exempt_reason&.is_a?(String) != false || raise("Passed value for field obj.eld_exempt_reason is not the expected type, validation failed.") obj.eld_pc_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.eld_pc_enabled is not the expected type, validation failed.") obj.eld_settings.nil? || Samsara::Types::DriverEldSettings.validate_raw(obj: obj.eld_settings) obj.eld_ym_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.eld_ym_enabled 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.has_driving_features_hidden&.is_a?(Boolean) != false || raise("Passed value for field obj.has_driving_features_hidden 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.is_deactivated&.is_a?(Boolean) != false || raise("Passed value for field obj.is_deactivated is not the expected type, validation failed.") obj.license_number&.is_a?(String) != false || raise("Passed value for field obj.license_number is not the expected type, validation failed.") obj.license_state&.is_a?(String) != false || raise("Passed value for field obj.license_state is not the expected type, validation failed.") obj.locale&.is_a?(Samsara::Types::DriverLocale) != false || raise("Passed value for field obj.locale 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.notes&.is_a?(String) != false || raise("Passed value for field obj.notes is not the expected type, validation failed.") obj.peer_group_tag.nil? || Samsara::Types::TagTinyResponse.validate_raw(obj: obj.peer_group_tag) obj.phone&.is_a?(String) != false || raise("Passed value for field obj.phone is not the expected type, validation failed.") obj.static_assigned_vehicle.nil? || Samsara::Types::DriverStaticAssignedVehicle.validate_raw(obj: obj.static_assigned_vehicle) obj.tachograph_card_number&.is_a?(String) != false || raise("Passed value for field obj.tachograph_card_number is not the expected type, validation failed.") obj.&.is_a?(Array) != false || raise("Passed value for field obj.tags is not the expected type, validation failed.") obj.timezone&.is_a?(String) != false || raise("Passed value for field obj.timezone is not the expected type, validation failed.") obj.updated_at_time&.is_a?(String) != false || raise("Passed value for field obj.updated_at_time is not the expected type, validation failed.") obj.us_driver_ruleset_override.nil? || Samsara::Types::UsDriverRulesetOverride.validate_raw(obj: obj.us_driver_ruleset_override) obj.username&.is_a?(String) != false || raise("Passed value for field obj.username is not the expected type, validation failed.") obj.vehicle_group_tag.nil? || Samsara::Types::DriverVehicleGroupTag.validate_raw(obj: obj.vehicle_group_tag) obj.waiting_time_duty_status_enabled&.is_a?(Boolean) != false || raise("Passed value for field obj.waiting_time_duty_status_enabled is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
284 285 286 |
# File 'lib/samsara_api/types/driver.rb', line 284 def to_json @_field_set&.to_json end |