// // 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 GuidedStepDTO { /// Returns a new [GuidedStepDTO] instance. GuidedStepDTO({ this.id, this.guidedPathId, this.order, this.title = const [], this.description = const [], this.geometry, this.isGeoTriggered, this.zoneRadiusMeters, this.imageUrl, this.isHiddenInitially, this.isStepTimer, this.isStepLocked, this.timerSeconds, this.timerExpiredMessage = const [], this.audioIds = const [], this.contents = const [], this.factContent = const [], this.quizQuestions = const [], }); String? id; String? guidedPathId; /// /// 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? title; List? description; GeometryDTO? geometry; /// /// 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? isGeoTriggered; double? zoneRadiusMeters; String? imageUrl; /// /// 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; /// /// 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; List? audioIds; List? contents; List? factContent; List? quizQuestions; @override bool operator ==(Object other) => identical(this, other) || other is GuidedStepDTO && other.id == id && other.guidedPathId == guidedPathId && other.order == order && _deepEquality.equals(other.title, title) && _deepEquality.equals(other.description, description) && other.geometry == geometry && other.isGeoTriggered == isGeoTriggered && other.zoneRadiusMeters == zoneRadiusMeters && other.imageUrl == imageUrl && other.isHiddenInitially == isHiddenInitially && other.isStepTimer == isStepTimer && other.isStepLocked == isStepLocked && other.timerSeconds == timerSeconds && _deepEquality.equals( other.timerExpiredMessage, timerExpiredMessage) && _deepEquality.equals(other.audioIds, audioIds) && _deepEquality.equals(other.contents, contents) && _deepEquality.equals(other.factContent, factContent) && _deepEquality.equals(other.quizQuestions, quizQuestions); @override int get hashCode => // ignore: unnecessary_parenthesis (id == null ? 0 : id!.hashCode) + (guidedPathId == null ? 0 : guidedPathId!.hashCode) + (order == null ? 0 : order!.hashCode) + (title == null ? 0 : title!.hashCode) + (description == null ? 0 : description!.hashCode) + (geometry == null ? 0 : geometry!.hashCode) + (isGeoTriggered == null ? 0 : isGeoTriggered!.hashCode) + (zoneRadiusMeters == null ? 0 : zoneRadiusMeters!.hashCode) + (imageUrl == null ? 0 : imageUrl!.hashCode) + (isHiddenInitially == null ? 0 : isHiddenInitially!.hashCode) + (isStepTimer == null ? 0 : isStepTimer!.hashCode) + (isStepLocked == null ? 0 : isStepLocked!.hashCode) + (timerSeconds == null ? 0 : timerSeconds!.hashCode) + (timerExpiredMessage == null ? 0 : timerExpiredMessage!.hashCode) + (audioIds == null ? 0 : audioIds!.hashCode) + (contents == null ? 0 : contents!.hashCode) + (factContent == null ? 0 : factContent!.hashCode) + (quizQuestions == null ? 0 : quizQuestions!.hashCode); @override String toString() => 'GuidedStepDTO[id=$id, guidedPathId=$guidedPathId, order=$order, title=$title, description=$description, geometry=$geometry, isGeoTriggered=$isGeoTriggered, zoneRadiusMeters=$zoneRadiusMeters, imageUrl=$imageUrl, isHiddenInitially=$isHiddenInitially, isStepTimer=$isStepTimer, isStepLocked=$isStepLocked, timerSeconds=$timerSeconds, timerExpiredMessage=$timerExpiredMessage, audioIds=$audioIds, contents=$contents, factContent=$factContent, quizQuestions=$quizQuestions]'; Map toJson() { final json = {}; if (this.id != null) { json[r'id'] = this.id; } else { json[r'id'] = null; } if (this.guidedPathId != null) { json[r'guidedPathId'] = this.guidedPathId; } else { json[r'guidedPathId'] = null; } if (this.order != null) { json[r'order'] = this.order; } else { json[r'order'] = null; } if (this.title != null) { json[r'title'] = this.title!.map((v) => v.toJson()).toList(); } else { json[r'title'] = null; } if (this.description != null) { json[r'description'] = this.description!.map((v) => v.toJson()).toList(); } else { json[r'description'] = null; } if (this.geometry != null) { json[r'geometry'] = this.geometry; } else { json[r'geometry'] = null; } if (this.isGeoTriggered != null) { json[r'isGeoTriggered'] = this.isGeoTriggered; } else { json[r'isGeoTriggered'] = 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.isHiddenInitially != null) { json[r'isHiddenInitially'] = this.isHiddenInitially; } else { json[r'isHiddenInitially'] = 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!.map((v) => v.toJson()).toList(); } else { json[r'timerExpiredMessage'] = null; } if (this.audioIds != null) { json[r'audioIds'] = this.audioIds!.map((v) => v.toJson()).toList(); } else { json[r'audioIds'] = null; } if (this.contents != null) { json[r'contents'] = this.contents!.map((v) => v.toJson()).toList(); } else { json[r'contents'] = null; } if (this.factContent != null) { json[r'factContent'] = this.factContent!.map((v) => v.toJson()).toList(); } else { json[r'factContent'] = null; } if (this.quizQuestions != null) { json[r'quizQuestions'] = this.quizQuestions!.map((v) => v.toJson()).toList(); } else { json[r'quizQuestions'] = null; } return json; } /// Returns a new [GuidedStepDTO] instance and imports its values from /// [value] if it's a [Map], null otherwise. // ignore: prefer_constructors_over_static_methods static GuidedStepDTO? 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 "GuidedStepDTO[$key]" is missing from JSON.'); assert(json[key] != null, 'Required key "GuidedStepDTO[$key]" has a null value in JSON.'); }); return true; }()); return GuidedStepDTO( id: mapValueOfType(json, r'id'), guidedPathId: mapValueOfType(json, r'guidedPathId'), order: mapValueOfType(json, r'order'), title: TranslationDTO.listFromJson(json[r'title']), description: TranslationDTO.listFromJson(json[r'description']), geometry: GeometryDTO.fromJson(json[r'geometry']), isGeoTriggered: mapValueOfType(json, r'isGeoTriggered'), zoneRadiusMeters: mapValueOfType(json, r'zoneRadiusMeters'), imageUrl: mapValueOfType(json, r'imageUrl'), isHiddenInitially: mapValueOfType(json, r'isHiddenInitially'), isStepTimer: mapValueOfType(json, r'isStepTimer'), isStepLocked: mapValueOfType(json, r'isStepLocked'), timerSeconds: mapValueOfType(json, r'timerSeconds'), timerExpiredMessage: TranslationDTO.listFromJson(json[r'timerExpiredMessage']), audioIds: TranslationDTO.listFromJson(json[r'audioIds']), contents: ContentDTO.listFromJson(json[r'contents']), factContent: TranslationDTO.listFromJson(json[r'factContent']), quizQuestions: QuizQuestion.listFromJson(json[r'quizQuestions']), ); } 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 = GuidedStepDTO.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 = GuidedStepDTO.fromJson(entry.value); if (value != null) { map[entry.key] = value; } } } return map; } // maps a json object with a list of GuidedStepDTO-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] = GuidedStepDTO.listFromJson( entry.value, growable: growable, ); } } return map; } /// The list of required keys that must be present in a JSON. static const requiredKeys = {}; }