2023-08-29 15:58:00 +02:00
|
|
|
//
|
|
|
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
|
|
|
//
|
2024-05-15 23:52:52 +02:00
|
|
|
// @dart=2.18
|
2023-08-29 15:58:00 +02:00
|
|
|
|
|
|
|
// 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;
|
|
|
|
|
2024-06-07 05:09:47 +02:00
|
|
|
class FacialRecognitionConfig {
|
|
|
|
/// Returns a new [FacialRecognitionConfig] instance.
|
|
|
|
FacialRecognitionConfig({
|
2023-08-29 15:58:00 +02:00
|
|
|
required this.enabled,
|
|
|
|
required this.maxDistance,
|
2023-09-18 06:05:35 +02:00
|
|
|
required this.minFaces,
|
2023-08-29 15:58:00 +02:00
|
|
|
required this.minScore,
|
|
|
|
required this.modelName,
|
|
|
|
});
|
|
|
|
|
|
|
|
bool enabled;
|
|
|
|
|
2024-09-24 04:03:59 +02:00
|
|
|
/// Minimum value: 0.1
|
2024-04-23 00:13:44 +02:00
|
|
|
/// Maximum value: 2
|
2024-01-18 07:08:48 +02:00
|
|
|
double maxDistance;
|
2023-08-29 15:58:00 +02:00
|
|
|
|
2024-04-23 00:13:44 +02:00
|
|
|
/// Minimum value: 1
|
2023-09-18 06:05:35 +02:00
|
|
|
int minFaces;
|
|
|
|
|
2024-09-24 04:03:59 +02:00
|
|
|
/// Minimum value: 0.1
|
2024-04-23 00:13:44 +02:00
|
|
|
/// Maximum value: 1
|
2024-01-18 07:08:48 +02:00
|
|
|
double minScore;
|
2023-08-29 15:58:00 +02:00
|
|
|
|
|
|
|
String modelName;
|
|
|
|
|
|
|
|
@override
|
2024-06-07 05:09:47 +02:00
|
|
|
bool operator ==(Object other) => identical(this, other) || other is FacialRecognitionConfig &&
|
2024-01-26 18:40:28 +02:00
|
|
|
other.enabled == enabled &&
|
|
|
|
other.maxDistance == maxDistance &&
|
|
|
|
other.minFaces == minFaces &&
|
|
|
|
other.minScore == minScore &&
|
2024-06-07 05:09:47 +02:00
|
|
|
other.modelName == modelName;
|
2023-08-29 15:58:00 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
int get hashCode =>
|
|
|
|
// ignore: unnecessary_parenthesis
|
|
|
|
(enabled.hashCode) +
|
|
|
|
(maxDistance.hashCode) +
|
2023-09-18 06:05:35 +02:00
|
|
|
(minFaces.hashCode) +
|
2023-08-29 15:58:00 +02:00
|
|
|
(minScore.hashCode) +
|
2024-06-07 05:09:47 +02:00
|
|
|
(modelName.hashCode);
|
2023-08-29 15:58:00 +02:00
|
|
|
|
|
|
|
@override
|
2024-06-07 05:09:47 +02:00
|
|
|
String toString() => 'FacialRecognitionConfig[enabled=$enabled, maxDistance=$maxDistance, minFaces=$minFaces, minScore=$minScore, modelName=$modelName]';
|
2023-08-29 15:58:00 +02:00
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
final json = <String, dynamic>{};
|
|
|
|
json[r'enabled'] = this.enabled;
|
|
|
|
json[r'maxDistance'] = this.maxDistance;
|
2023-09-18 06:05:35 +02:00
|
|
|
json[r'minFaces'] = this.minFaces;
|
2023-08-29 15:58:00 +02:00
|
|
|
json[r'minScore'] = this.minScore;
|
|
|
|
json[r'modelName'] = this.modelName;
|
|
|
|
return json;
|
|
|
|
}
|
|
|
|
|
2024-06-07 05:09:47 +02:00
|
|
|
/// Returns a new [FacialRecognitionConfig] instance and imports its values from
|
2023-08-29 15:58:00 +02:00
|
|
|
/// [value] if it's a [Map], null otherwise.
|
|
|
|
// ignore: prefer_constructors_over_static_methods
|
2024-06-07 05:09:47 +02:00
|
|
|
static FacialRecognitionConfig? fromJson(dynamic value) {
|
2024-09-23 21:41:41 +02:00
|
|
|
upgradeDto(value, "FacialRecognitionConfig");
|
2023-08-29 15:58:00 +02:00
|
|
|
if (value is Map) {
|
|
|
|
final json = value.cast<String, dynamic>();
|
|
|
|
|
2024-06-07 05:09:47 +02:00
|
|
|
return FacialRecognitionConfig(
|
2023-08-29 15:58:00 +02:00
|
|
|
enabled: mapValueOfType<bool>(json, r'enabled')!,
|
2024-06-12 18:36:24 +02:00
|
|
|
maxDistance: (mapValueOfType<num>(json, r'maxDistance')!).toDouble(),
|
2023-09-18 06:05:35 +02:00
|
|
|
minFaces: mapValueOfType<int>(json, r'minFaces')!,
|
2024-06-12 18:36:24 +02:00
|
|
|
minScore: (mapValueOfType<num>(json, r'minScore')!).toDouble(),
|
2023-08-29 15:58:00 +02:00
|
|
|
modelName: mapValueOfType<String>(json, r'modelName')!,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2024-06-07 05:09:47 +02:00
|
|
|
static List<FacialRecognitionConfig> listFromJson(dynamic json, {bool growable = false,}) {
|
|
|
|
final result = <FacialRecognitionConfig>[];
|
2023-08-29 15:58:00 +02:00
|
|
|
if (json is List && json.isNotEmpty) {
|
|
|
|
for (final row in json) {
|
2024-06-07 05:09:47 +02:00
|
|
|
final value = FacialRecognitionConfig.fromJson(row);
|
2023-08-29 15:58:00 +02:00
|
|
|
if (value != null) {
|
|
|
|
result.add(value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return result.toList(growable: growable);
|
|
|
|
}
|
|
|
|
|
2024-06-07 05:09:47 +02:00
|
|
|
static Map<String, FacialRecognitionConfig> mapFromJson(dynamic json) {
|
|
|
|
final map = <String, FacialRecognitionConfig>{};
|
2023-08-29 15:58:00 +02:00
|
|
|
if (json is Map && json.isNotEmpty) {
|
|
|
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
|
|
for (final entry in json.entries) {
|
2024-06-07 05:09:47 +02:00
|
|
|
final value = FacialRecognitionConfig.fromJson(entry.value);
|
2023-08-29 15:58:00 +02:00
|
|
|
if (value != null) {
|
|
|
|
map[entry.key] = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
|
2024-06-07 05:09:47 +02:00
|
|
|
// maps a json object with a list of FacialRecognitionConfig-objects as value to a dart map
|
|
|
|
static Map<String, List<FacialRecognitionConfig>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
|
|
|
final map = <String, List<FacialRecognitionConfig>>{};
|
2023-08-29 15:58:00 +02:00
|
|
|
if (json is Map && json.isNotEmpty) {
|
|
|
|
// ignore: parameter_assignments
|
|
|
|
json = json.cast<String, dynamic>();
|
|
|
|
for (final entry in json.entries) {
|
2024-06-07 05:09:47 +02:00
|
|
|
map[entry.key] = FacialRecognitionConfig.listFromJson(entry.value, growable: growable,);
|
2023-08-29 15:58:00 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// The list of required keys that must be present in a JSON.
|
|
|
|
static const requiredKeys = <String>{
|
|
|
|
'enabled',
|
|
|
|
'maxDistance',
|
2023-09-18 06:05:35 +02:00
|
|
|
'minFaces',
|
2023-08-29 15:58:00 +02:00
|
|
|
'minScore',
|
|
|
|
'modelName',
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|