system_config_machine_learning_dto.dart 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. //
  2. // AUTO-GENERATED FILE, DO NOT MODIFY!
  3. //
  4. // @dart=2.12
  5. // ignore_for_file: unused_element, unused_import
  6. // ignore_for_file: always_put_required_named_parameters_first
  7. // ignore_for_file: constant_identifier_names
  8. // ignore_for_file: lines_longer_than_80_chars
  9. part of openapi.api;
  10. class SystemConfigMachineLearningDto {
  11. /// Returns a new [SystemConfigMachineLearningDto] instance.
  12. SystemConfigMachineLearningDto({
  13. required this.clipEncodeEnabled,
  14. required this.enabled,
  15. required this.facialRecognitionEnabled,
  16. required this.tagImageEnabled,
  17. required this.url,
  18. });
  19. bool clipEncodeEnabled;
  20. bool enabled;
  21. bool facialRecognitionEnabled;
  22. bool tagImageEnabled;
  23. String url;
  24. @override
  25. bool operator ==(Object other) => identical(this, other) || other is SystemConfigMachineLearningDto &&
  26. other.clipEncodeEnabled == clipEncodeEnabled &&
  27. other.enabled == enabled &&
  28. other.facialRecognitionEnabled == facialRecognitionEnabled &&
  29. other.tagImageEnabled == tagImageEnabled &&
  30. other.url == url;
  31. @override
  32. int get hashCode =>
  33. // ignore: unnecessary_parenthesis
  34. (clipEncodeEnabled.hashCode) +
  35. (enabled.hashCode) +
  36. (facialRecognitionEnabled.hashCode) +
  37. (tagImageEnabled.hashCode) +
  38. (url.hashCode);
  39. @override
  40. String toString() => 'SystemConfigMachineLearningDto[clipEncodeEnabled=$clipEncodeEnabled, enabled=$enabled, facialRecognitionEnabled=$facialRecognitionEnabled, tagImageEnabled=$tagImageEnabled, url=$url]';
  41. Map<String, dynamic> toJson() {
  42. final json = <String, dynamic>{};
  43. json[r'clipEncodeEnabled'] = this.clipEncodeEnabled;
  44. json[r'enabled'] = this.enabled;
  45. json[r'facialRecognitionEnabled'] = this.facialRecognitionEnabled;
  46. json[r'tagImageEnabled'] = this.tagImageEnabled;
  47. json[r'url'] = this.url;
  48. return json;
  49. }
  50. /// Returns a new [SystemConfigMachineLearningDto] instance and imports its values from
  51. /// [value] if it's a [Map], null otherwise.
  52. // ignore: prefer_constructors_over_static_methods
  53. static SystemConfigMachineLearningDto? fromJson(dynamic value) {
  54. if (value is Map) {
  55. final json = value.cast<String, dynamic>();
  56. return SystemConfigMachineLearningDto(
  57. clipEncodeEnabled: mapValueOfType<bool>(json, r'clipEncodeEnabled')!,
  58. enabled: mapValueOfType<bool>(json, r'enabled')!,
  59. facialRecognitionEnabled: mapValueOfType<bool>(json, r'facialRecognitionEnabled')!,
  60. tagImageEnabled: mapValueOfType<bool>(json, r'tagImageEnabled')!,
  61. url: mapValueOfType<String>(json, r'url')!,
  62. );
  63. }
  64. return null;
  65. }
  66. static List<SystemConfigMachineLearningDto> listFromJson(dynamic json, {bool growable = false,}) {
  67. final result = <SystemConfigMachineLearningDto>[];
  68. if (json is List && json.isNotEmpty) {
  69. for (final row in json) {
  70. final value = SystemConfigMachineLearningDto.fromJson(row);
  71. if (value != null) {
  72. result.add(value);
  73. }
  74. }
  75. }
  76. return result.toList(growable: growable);
  77. }
  78. static Map<String, SystemConfigMachineLearningDto> mapFromJson(dynamic json) {
  79. final map = <String, SystemConfigMachineLearningDto>{};
  80. if (json is Map && json.isNotEmpty) {
  81. json = json.cast<String, dynamic>(); // ignore: parameter_assignments
  82. for (final entry in json.entries) {
  83. final value = SystemConfigMachineLearningDto.fromJson(entry.value);
  84. if (value != null) {
  85. map[entry.key] = value;
  86. }
  87. }
  88. }
  89. return map;
  90. }
  91. // maps a json object with a list of SystemConfigMachineLearningDto-objects as value to a dart map
  92. static Map<String, List<SystemConfigMachineLearningDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
  93. final map = <String, List<SystemConfigMachineLearningDto>>{};
  94. if (json is Map && json.isNotEmpty) {
  95. // ignore: parameter_assignments
  96. json = json.cast<String, dynamic>();
  97. for (final entry in json.entries) {
  98. map[entry.key] = SystemConfigMachineLearningDto.listFromJson(entry.value, growable: growable,);
  99. }
  100. }
  101. return map;
  102. }
  103. /// The list of required keys that must be present in a JSON.
  104. static const requiredKeys = <String>{
  105. 'clipEncodeEnabled',
  106. 'enabled',
  107. 'facialRecognitionEnabled',
  108. 'tagImageEnabled',
  109. 'url',
  110. };
  111. }