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
|
|
|
|
2022-06-22 22:44:08 +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);
|
|
|
|
}
|