283 lines
9.3 KiB
Dart
283 lines
9.3 KiB
Dart
//
|
|
// 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 GuidedPath {
|
|
/// Returns a new [GuidedPath] instance.
|
|
GuidedPath({
|
|
required this.instanceId,
|
|
this.title = const [],
|
|
this.id,
|
|
this.description = const [],
|
|
this.sectionMapId,
|
|
this.sectionMap,
|
|
this.sectionEventId,
|
|
this.sectionEvent,
|
|
this.isLinear,
|
|
this.requireSuccessToAdvance,
|
|
this.hideNextStepsUntilComplete,
|
|
this.order,
|
|
this.steps = const [],
|
|
});
|
|
|
|
String instanceId;
|
|
|
|
List<TranslationDTO> title;
|
|
|
|
String? id;
|
|
|
|
List<TranslationDTO>? description;
|
|
|
|
String? sectionMapId;
|
|
|
|
GuidedPathSectionMap? sectionMap;
|
|
|
|
String? sectionEventId;
|
|
|
|
ApplicationInstanceSectionEvent? sectionEvent;
|
|
|
|
///
|
|
/// 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? isLinear;
|
|
|
|
///
|
|
/// 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? requireSuccessToAdvance;
|
|
|
|
///
|
|
/// 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? hideNextStepsUntilComplete;
|
|
|
|
///
|
|
/// 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<GuidedStep>? steps;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is GuidedPath &&
|
|
other.instanceId == instanceId &&
|
|
_deepEquality.equals(other.title, title) &&
|
|
other.id == id &&
|
|
_deepEquality.equals(other.description, description) &&
|
|
other.sectionMapId == sectionMapId &&
|
|
other.sectionMap == sectionMap &&
|
|
other.sectionEventId == sectionEventId &&
|
|
other.sectionEvent == sectionEvent &&
|
|
other.isLinear == isLinear &&
|
|
other.requireSuccessToAdvance == requireSuccessToAdvance &&
|
|
other.hideNextStepsUntilComplete == hideNextStepsUntilComplete &&
|
|
other.order == order &&
|
|
_deepEquality.equals(other.steps, steps);
|
|
|
|
@override
|
|
int get hashCode =>
|
|
// ignore: unnecessary_parenthesis
|
|
(instanceId.hashCode) +
|
|
(title.hashCode) +
|
|
(id == null ? 0 : id!.hashCode) +
|
|
(description == null ? 0 : description!.hashCode) +
|
|
(sectionMapId == null ? 0 : sectionMapId!.hashCode) +
|
|
(sectionMap == null ? 0 : sectionMap!.hashCode) +
|
|
(sectionEventId == null ? 0 : sectionEventId!.hashCode) +
|
|
(sectionEvent == null ? 0 : sectionEvent!.hashCode) +
|
|
(isLinear == null ? 0 : isLinear!.hashCode) +
|
|
(requireSuccessToAdvance == null
|
|
? 0
|
|
: requireSuccessToAdvance!.hashCode) +
|
|
(hideNextStepsUntilComplete == null
|
|
? 0
|
|
: hideNextStepsUntilComplete!.hashCode) +
|
|
(order == null ? 0 : order!.hashCode) +
|
|
(steps == null ? 0 : steps!.hashCode);
|
|
|
|
@override
|
|
String toString() =>
|
|
'GuidedPath[instanceId=$instanceId, title=$title, id=$id, description=$description, sectionMapId=$sectionMapId, sectionMap=$sectionMap, sectionEventId=$sectionEventId, sectionEvent=$sectionEvent, isLinear=$isLinear, requireSuccessToAdvance=$requireSuccessToAdvance, hideNextStepsUntilComplete=$hideNextStepsUntilComplete, order=$order, steps=$steps]';
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final json = <String, dynamic>{};
|
|
json[r'instanceId'] = this.instanceId;
|
|
json[r'title'] = this.title;
|
|
if (this.id != null) {
|
|
json[r'id'] = this.id;
|
|
} else {
|
|
json[r'id'] = null;
|
|
}
|
|
if (this.description != null) {
|
|
json[r'description'] = this.description;
|
|
} else {
|
|
json[r'description'] = null;
|
|
}
|
|
if (this.sectionMapId != null) {
|
|
json[r'sectionMapId'] = this.sectionMapId;
|
|
} else {
|
|
json[r'sectionMapId'] = null;
|
|
}
|
|
if (this.sectionMap != null) {
|
|
json[r'sectionMap'] = this.sectionMap;
|
|
} else {
|
|
json[r'sectionMap'] = null;
|
|
}
|
|
if (this.sectionEventId != null) {
|
|
json[r'sectionEventId'] = this.sectionEventId;
|
|
} else {
|
|
json[r'sectionEventId'] = null;
|
|
}
|
|
if (this.sectionEvent != null) {
|
|
json[r'sectionEvent'] = this.sectionEvent;
|
|
} else {
|
|
json[r'sectionEvent'] = null;
|
|
}
|
|
if (this.isLinear != null) {
|
|
json[r'isLinear'] = this.isLinear;
|
|
} else {
|
|
json[r'isLinear'] = null;
|
|
}
|
|
if (this.requireSuccessToAdvance != null) {
|
|
json[r'requireSuccessToAdvance'] = this.requireSuccessToAdvance;
|
|
} else {
|
|
json[r'requireSuccessToAdvance'] = null;
|
|
}
|
|
if (this.hideNextStepsUntilComplete != null) {
|
|
json[r'hideNextStepsUntilComplete'] = this.hideNextStepsUntilComplete;
|
|
} else {
|
|
json[r'hideNextStepsUntilComplete'] = null;
|
|
}
|
|
if (this.order != null) {
|
|
json[r'order'] = this.order;
|
|
} else {
|
|
json[r'order'] = null;
|
|
}
|
|
if (this.steps != null) {
|
|
json[r'steps'] = this.steps;
|
|
} else {
|
|
json[r'steps'] = null;
|
|
}
|
|
return json;
|
|
}
|
|
|
|
/// Returns a new [GuidedPath] instance and imports its values from
|
|
/// [value] if it's a [Map], null otherwise.
|
|
// ignore: prefer_constructors_over_static_methods
|
|
static GuidedPath? fromJson(dynamic value) {
|
|
if (value is Map) {
|
|
final json = value.cast<String, dynamic>();
|
|
|
|
// 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 "GuidedPath[$key]" is missing from JSON.');
|
|
assert(json[key] != null,
|
|
'Required key "GuidedPath[$key]" has a null value in JSON.');
|
|
});
|
|
return true;
|
|
}());
|
|
|
|
return GuidedPath(
|
|
instanceId: mapValueOfType<String>(json, r'instanceId')!,
|
|
title: TranslationDTO.listFromJson(json[r'title']),
|
|
id: mapValueOfType<String>(json, r'id'),
|
|
description: TranslationDTO.listFromJson(json[r'description']),
|
|
sectionMapId: mapValueOfType<String>(json, r'sectionMapId'),
|
|
sectionMap: GuidedPathSectionMap.fromJson(json[r'sectionMap']),
|
|
sectionEventId: mapValueOfType<String>(json, r'sectionEventId'),
|
|
sectionEvent:
|
|
ApplicationInstanceSectionEvent.fromJson(json[r'sectionEvent']),
|
|
isLinear: mapValueOfType<bool>(json, r'isLinear'),
|
|
requireSuccessToAdvance:
|
|
mapValueOfType<bool>(json, r'requireSuccessToAdvance'),
|
|
hideNextStepsUntilComplete:
|
|
mapValueOfType<bool>(json, r'hideNextStepsUntilComplete'),
|
|
order: mapValueOfType<int>(json, r'order'),
|
|
steps: GuidedStep.listFromJson(json[r'steps']),
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
static List<GuidedPath> listFromJson(
|
|
dynamic json, {
|
|
bool growable = false,
|
|
}) {
|
|
final result = <GuidedPath>[];
|
|
if (json is List && json.isNotEmpty) {
|
|
for (final row in json) {
|
|
final value = GuidedPath.fromJson(row);
|
|
if (value != null) {
|
|
result.add(value);
|
|
}
|
|
}
|
|
}
|
|
return result.toList(growable: growable);
|
|
}
|
|
|
|
static Map<String, GuidedPath> mapFromJson(dynamic json) {
|
|
final map = <String, GuidedPath>{};
|
|
if (json is Map && json.isNotEmpty) {
|
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
for (final entry in json.entries) {
|
|
final value = GuidedPath.fromJson(entry.value);
|
|
if (value != null) {
|
|
map[entry.key] = value;
|
|
}
|
|
}
|
|
}
|
|
return map;
|
|
}
|
|
|
|
// maps a json object with a list of GuidedPath-objects as value to a dart map
|
|
static Map<String, List<GuidedPath>> mapListFromJson(
|
|
dynamic json, {
|
|
bool growable = false,
|
|
}) {
|
|
final map = <String, List<GuidedPath>>{};
|
|
if (json is Map && json.isNotEmpty) {
|
|
// ignore: parameter_assignments
|
|
json = json.cast<String, dynamic>();
|
|
for (final entry in json.entries) {
|
|
map[entry.key] = GuidedPath.listFromJson(
|
|
entry.value,
|
|
growable: growable,
|
|
);
|
|
}
|
|
}
|
|
return map;
|
|
}
|
|
|
|
/// The list of required keys that must be present in a JSON.
|
|
static const requiredKeys = <String>{
|
|
'instanceId',
|
|
'title',
|
|
};
|
|
}
|