You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
786 B
Dart
30 lines
786 B
Dart
2 years ago
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
||
|
|
||
|
part 'csrf_token.freezed.dart';
|
||
|
part 'csrf_token.g.dart';
|
||
|
|
||
|
@freezed
|
||
|
class CSRFTokenInfo with _$CSRFTokenInfo {
|
||
|
const factory CSRFTokenInfo({
|
||
|
String? csrftoken,
|
||
|
String? logintoken,
|
||
|
String? createaccounttoken,
|
||
|
String? patroltoken,
|
||
|
String? rollbacktoken,
|
||
|
String? userrightstoken,
|
||
|
String? watchtoken,
|
||
|
}) = _CSRFTokenInfo;
|
||
|
|
||
|
factory CSRFTokenInfo.fromJson(Map<String, dynamic> json) =>
|
||
|
_$CSRFTokenInfoFromJson(json);
|
||
|
}
|
||
|
|
||
|
@freezed
|
||
|
class CSRFTokenResponse with _$CSRFTokenResponse {
|
||
|
const factory CSRFTokenResponse({required CSRFTokenInfo tokens}) =
|
||
|
_CSRFTokenInfoResponse;
|
||
|
|
||
|
factory CSRFTokenResponse.fromJson(Map<String, dynamic> json) =>
|
||
|
_$CSRFTokenResponseFromJson(json);
|
||
|
}
|