// // AUTO-GENERATED FILE, DO NOT MODIFY! // // @dart=2.18 // ignore_for_file: unused_element, unused_import // ignore_for_file: always_put_required_named_parameters_first // ignore_for_file: constant_identifier_names // ignore_for_file: lines_longer_than_80_chars part of openapi.api; class GuidedStep { /// Returns a new [GuidedStep] instance. GuidedStep({ required this.guidedPathId, this.title = const [], this.id, this.guidedPath, this.order, this.description = const [], this.geometry, this.zoneRadiusMeters, this.imageUrl, this.triggerGeoPointId, this.triggerGeoPoint, this.isHiddenInitially, this.quizQuestions = const [], this.isStepTimer, this.isStepLocked, this.timerSeconds, this.timerExpiredMessage = const [], }); String guidedPathId; List title; String? id; GuidedStepGuidedPath? guidedPath; /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// int? order; List? description; PointAllOfBoundary? geometry; double? zoneRadiusMeters; String? imageUrl; int? triggerGeoPointId; GuidedStepTriggerGeoPoint? triggerGeoPoint; /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// bool? isHiddenInitially; List? quizQuestions; /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// bool? isStepTimer; /// /// Please note: This property should have been non-nullable! Since the specification file /// does not include a default value (using the "default:" property), however, the generated /// source code must fall back to having a nullable type. /// Consider adding a "default:" property in the specification file to hide this note. /// bool? isStepLocked; int? timerSeconds; List? timerExpiredMessage; @override bool operator ==(Object other) => identical(this, other) || other is GuidedStep && other.guidedPathId == guidedPathId && _deepEquality.equals(other.title, title) && other.id == id && other.guidedPath == guidedPath && other.order == order && _deepEquality.equals(other.description, description) && other.geometry == geometry && other.zoneRadiusMeters == zoneRadiusMeters && other.imageUrl == imageUrl && other.triggerGeoPointId == triggerGeoPointId && other.triggerGeoPoint == triggerGeoPoint && other.isHiddenInitially == isHiddenInitially && _deepEquality.equals(other.quizQuestions, quizQuestions) && other.isStepTimer == isStepTimer && other.isStepLocked == isStepLocked && other.timerSeconds == timerSeconds && _deepEquality.equals(other.timerExpiredMessage, timerExpiredMessage); @override int get hashCode => // ignore: unnecessary_parenthesis (guidedPathId.hashCode) + (title.hashCode) + (id == null ? 0 : id!.hashCode) + (guidedPath == null ? 0 : guidedPath!.hashCode) + (order == null ? 0 : order!.hashCode) + (description == null ? 0 : description!.hashCode) + (geometry == null ? 0 : geometry!.hashCode) + (zoneRadiusMeters == null ? 0 : zoneRadiusMeters!.hashCode) + (imageUrl == null ? 0 : imageUrl!.hashCode) + (triggerGeoPointId == null ? 0 : triggerGeoPointId!.hashCode) + (triggerGeoPoint == null ? 0 : triggerGeoPoint!.hashCode) + (isHiddenInitially == null ? 0 : isHiddenInitially!.hashCode) + (quizQuestions == null ? 0 : quizQuestions!.hashCode) + (isStepTimer == null ? 0 : isStepTimer!.hashCode) + (isStepLocked == null ? 0 : isStepLocked!.hashCode) + (timerSeconds == null ? 0 : timerSeconds!.hashCode) + (timerExpiredMessage == null ? 0 : timerExpiredMessage!.hashCode); @override String toString() => 'GuidedStep[guidedPathId=$guidedPathId, title=$title, id=$id, guidedPath=$guidedPath, order=$order, description=$description, geometry=$geometry, zoneRadiusMeters=$zoneRadiusMeters, imageUrl=$imageUrl, triggerGeoPointId=$triggerGeoPointId, triggerGeoPoint=$triggerGeoPoint, isHiddenInitially=$isHiddenInitially, quizQuestions=$quizQuestions, isStepTimer=$isStepTimer, isStepLocked=$isStepLocked, timerSeconds=$timerSeconds, timerExpiredMessage=$timerExpiredMessage]'; Map toJson() { final json = {}; json[r'guidedPathId'] = this.guidedPathId; json[r'title'] = this.title; if (this.id != null) { json[r'id'] = this.id; } else { json[r'id'] = null; } if (this.guidedPath != null) { json[r'guidedPath'] = this.guidedPath; } else { json[r'guidedPath'] = null; } if (this.order != null) { json[r'order'] = this.order; } else { json[r'order'] = null; } if (this.description != null) { json[r'description'] = this.description; } else { json[r'description'] = null; } if (this.geometry != null) { json[r'geometry'] = this.geometry; } else { json[r'geometry'] = null; } if (this.zoneRadiusMeters != null) { json[r'zoneRadiusMeters'] = this.zoneRadiusMeters; } else { json[r'zoneRadiusMeters'] = null; } if (this.imageUrl != null) { json[r'imageUrl'] = this.imageUrl; } else { json[r'imageUrl'] = null; } if (this.triggerGeoPointId != null) { json[r'triggerGeoPointId'] = this.triggerGeoPointId; } else { json[r'triggerGeoPointId'] = null; } if (this.triggerGeoPoint != null) { json[r'triggerGeoPoint'] = this.triggerGeoPoint; } else { json[r'triggerGeoPoint'] = null; } if (this.isHiddenInitially != null) { json[r'isHiddenInitially'] = this.isHiddenInitially; } else { json[r'isHiddenInitially'] = null; } if (this.quizQuestions != null) { json[r'quizQuestions'] = this.quizQuestions; } else { json[r'quizQuestions'] = null; } if (this.isStepTimer != null) { json[r'isStepTimer'] = this.isStepTimer; } else { json[r'isStepTimer'] = null; } if (this.isStepLocked != null) { json[r'isStepLocked'] = this.isStepLocked; } else { json[r'isStepLocked'] = null; } if (this.timerSeconds != null) { json[r'timerSeconds'] = this.timerSeconds; } else { json[r'timerSeconds'] = null; } if (this.timerExpiredMessage != null) { json[r'timerExpiredMessage'] = this.timerExpiredMessage; } else { json[r'timerExpiredMessage'] = null; } return json; } /// Returns a new [GuidedStep] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods static GuidedStep? fromJson(dynamic value) { if (value is Map) { final json = value.cast(); // Ensure that the map contains the required keys. // Note 1: the values aren't checked for validity beyond being non-null. // Note 2: this code is stripped in release mode! assert(() { requiredKeys.forEach((key) { assert(json.containsKey(key), 'Required key "GuidedStep[$key]" is missing from JSON.'); assert(json[key] != null, 'Required key "GuidedStep[$key]" has a null value in JSON.'); }); return true; }()); return GuidedStep( guidedPathId: mapValueOfType(json, r'guidedPathId')!, title: TranslationDTO.listFromJson(json[r'title']), id: mapValueOfType(json, r'id'), guidedPath: GuidedStepGuidedPath.fromJson(json[r'guidedPath']), order: mapValueOfType(json, r'order'), description: TranslationDTO.listFromJson(json[r'description']), geometry: PointAllOfBoundary.fromJson(json[r'geometry']), zoneRadiusMeters: mapValueOfType(json, r'zoneRadiusMeters'), imageUrl: mapValueOfType(json, r'imageUrl'), triggerGeoPointId: mapValueOfType(json, r'triggerGeoPointId'), triggerGeoPoint: GuidedStepTriggerGeoPoint.fromJson(json[r'triggerGeoPoint']), isHiddenInitially: mapValueOfType(json, r'isHiddenInitially'), quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']), isStepTimer: mapValueOfType(json, r'isStepTimer'), isStepLocked: mapValueOfType(json, r'isStepLocked'), timerSeconds: mapValueOfType(json, r'timerSeconds'), timerExpiredMessage: TranslationDTO.listFromJson(json[r'timerExpiredMessage']), ); } return null; } static List listFromJson( dynamic json, { bool growable = false, }) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { final value = GuidedStep.fromJson(row); if (value != null) { result.add(value); } } } return result.toList(growable: growable); } static Map mapFromJson(dynamic json) { final map = {}; if (json is Map && json.isNotEmpty) { json = json.cast(); // ignore: parameter_assignments for (final entry in json.entries) { final value = GuidedStep.fromJson(entry.value); if (value != null) { map[entry.key] = value; } } } return map; } // maps a json object with a list of GuidedStep-objects as value to a dart map static Map> mapListFromJson( dynamic json, { bool growable = false, }) { final map = >{}; if (json is Map && json.isNotEmpty) { // ignore: parameter_assignments json = json.cast(); for (final entry in json.entries) { map[entry.key] = GuidedStep.listFromJson( entry.value, growable: growable, ); } } return map; } /// The list of required keys that must be present in a JSON. static const requiredKeys = { 'guidedPathId', 'title', }; }