92 lines
2.6 KiB
Dart
92 lines
2.6 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 PushNotificationDTO {
|
|
PushNotificationDTO({
|
|
this.id,
|
|
this.instanceId,
|
|
this.title,
|
|
this.body,
|
|
this.topic,
|
|
this.status,
|
|
this.scheduledAt,
|
|
this.sentAt,
|
|
this.dateCreation,
|
|
});
|
|
|
|
String? id;
|
|
String? instanceId;
|
|
String? title;
|
|
String? body;
|
|
String? topic;
|
|
String? status;
|
|
DateTime? scheduledAt;
|
|
DateTime? sentAt;
|
|
DateTime? dateCreation;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is PushNotificationDTO && other.id == id;
|
|
|
|
@override
|
|
int get hashCode => (id == null ? 0 : id!.hashCode);
|
|
|
|
@override
|
|
String toString() => 'PushNotificationDTO[id=$id, title=$title, status=$status]';
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final json = <String, dynamic>{};
|
|
json[r'id'] = id;
|
|
json[r'instanceId'] = instanceId;
|
|
json[r'title'] = title;
|
|
json[r'body'] = body;
|
|
json[r'topic'] = topic;
|
|
json[r'status'] = status;
|
|
if (scheduledAt != null) json[r'scheduledAt'] = scheduledAt!.toUtc().toIso8601String();
|
|
if (sentAt != null) json[r'sentAt'] = sentAt!.toUtc().toIso8601String();
|
|
if (dateCreation != null) json[r'dateCreation'] = dateCreation!.toUtc().toIso8601String();
|
|
return json;
|
|
}
|
|
|
|
static PushNotificationDTO? fromJson(dynamic value) {
|
|
if (value is Map) {
|
|
final json = value.cast<String, dynamic>();
|
|
return PushNotificationDTO(
|
|
id: mapValueOfType<String>(json, r'id'),
|
|
instanceId: mapValueOfType<String>(json, r'instanceId'),
|
|
title: mapValueOfType<String>(json, r'title'),
|
|
body: mapValueOfType<String>(json, r'body'),
|
|
topic: mapValueOfType<String>(json, r'topic'),
|
|
status: mapValueOfType<String>(json, r'status'),
|
|
scheduledAt: mapDateTime(json, r'scheduledAt', r''),
|
|
sentAt: mapDateTime(json, r'sentAt', r''),
|
|
dateCreation: mapDateTime(json, r'dateCreation', r''),
|
|
);
|
|
}
|
|
return null;
|
|
}
|
|
|
|
static List<PushNotificationDTO> listFromJson(dynamic json, {bool growable = false}) {
|
|
final result = <PushNotificationDTO>[];
|
|
if (json is List && json.isNotEmpty) {
|
|
for (final row in json) {
|
|
final value = PushNotificationDTO.fromJson(row);
|
|
if (value != null) result.add(value);
|
|
}
|
|
}
|
|
return result.toList(growable: growable);
|
|
}
|
|
|
|
static const requiredKeys = <String>{};
|
|
}
|