2021-04-05 20:06:54 +00:00
|
|
|
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
|
|
|
|
part 'apikey.g.dart';
|
|
|
|
|
|
|
|
@JsonSerializable()
|
|
|
|
class ApiKey {
|
|
|
|
@JsonKey(required: true)
|
|
|
|
final String key;
|
|
|
|
|
|
|
|
@JsonKey(required: true)
|
|
|
|
final String created;
|
|
|
|
|
|
|
|
@JsonKey(required: true, name: 'access_level')
|
|
|
|
final String accessLevel;
|
|
|
|
|
2021-11-29 23:44:22 +00:00
|
|
|
final String? comment;
|
2021-04-05 20:06:54 +00:00
|
|
|
|
2023-01-16 00:44:34 +00:00
|
|
|
ApiKey(
|
|
|
|
{required this.key,
|
|
|
|
required this.created,
|
|
|
|
required this.accessLevel,
|
|
|
|
this.comment});
|
2021-04-05 20:06:54 +00:00
|
|
|
|
|
|
|
// JSON Init
|
|
|
|
factory ApiKey.fromJson(Map<String, dynamic> json) => _$ApiKeyFromJson(json);
|
|
|
|
|
|
|
|
// JSON Export
|
|
|
|
Map<String, dynamic> toJson() => _$ApiKeyToJson(this);
|
|
|
|
}
|