-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.g.dart
More file actions
79 lines (72 loc) · 3.02 KB
/
api.g.dart
File metadata and controls
79 lines (72 loc) · 3.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'api.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
_ApiResponse<T, Q> _$ApiResponseFromJson<T, Q>(
Map<String, dynamic> json,
T Function(Object? json) fromJsonT,
Q Function(Object? json) fromJsonQ,
) => _ApiResponse<T, Q>(
status: $enumDecode(_$ApiStatusEnumMap, json['status']),
errors: _$nullableGenericFromJson(json['errors'], fromJsonQ),
result: _$nullableGenericFromJson(json['result'], fromJsonT),
);
Map<String, dynamic> _$ApiResponseToJson<T, Q>(
_ApiResponse<T, Q> instance,
Object? Function(T value) toJsonT,
Object? Function(Q value) toJsonQ,
) => <String, dynamic>{
'status': instance.status.toJson(),
'errors': _$nullableGenericToJson(instance.errors, toJsonQ),
'result': _$nullableGenericToJson(instance.result, toJsonT),
};
const _$ApiStatusEnumMap = {
ApiStatus.unknown: 'UNKNOWN',
ApiStatus.ok: 'OK',
ApiStatus.notfound: 'NOTFOUND',
ApiStatus.userNotFound: 'USER_NOT_FOUND',
ApiStatus.wrongPassword: 'WRONG_PASSWORD',
ApiStatus.accountBlocked: 'ACCOUNT_BLOCKED',
ApiStatus.internalError: 'INTERNALERROR',
ApiStatus.unprocessable: 'UNPROCESSABLE',
ApiStatus.unauthorized: 'UNAUTHORIZED',
ApiStatus.accessDenied: 'ACCESSDENIED',
ApiStatus.movedPermanently: 'MOVEDPERMANENTLY',
ApiStatus.badRequest: 'BADREQUEST',
ApiStatus.iAmATeapot: 'IAMATEAPOT',
ApiStatus.paymentRequired: 'PAYMENTREQUIRED',
ApiStatus.serviceUnavailable: 'SERVICEUNAVAILABLE',
ApiStatus.limitReached: 'LIMITREACHED',
ApiStatus.fileNotFound: 'FILE_NOT_FOUND',
ApiStatus.checkumError: 'CHECKUM_ERROR',
ApiStatus.downloadDone: 'DOWNLOAD_DONE',
ApiStatus.uploadDone: 'UPLOAD_DONE',
ApiStatus.tokenExpired: 'TOKEN_EXPIRED',
ApiStatus.wialonOauthSignNotFound: 'WIALON_OAUTH_SIGN_NOT_FOUND',
ApiStatus.wialonOauthRedirectNotFound: 'WIALON_OAUTH_REDIRECT_NOT_FOUND',
ApiStatus.wialonOauthTokenNotFound: 'WIALON_OAUTH_TOKEN_NOT_FOUND',
ApiStatus.wialonOauthSvcError: 'WIALON_OAUTH_SVC_ERROR',
ApiStatus.externalAccountNotFound: 'EXTERNAL_ACCOUNT_NOT_FOUND',
ApiStatus.externalSyncFailed: 'EXTERNAL_SYNC_FAILED',
ApiStatus.mqttBrokerError: 'MQTT_BROKER_ERROR',
ApiStatus.flespiUnavailable: 'FLESPI_UNAVAILABLE',
ApiStatus.inmutablEentity: 'INMUTABLE_ENTITY',
ApiStatus.mfaRequired: 'MFA_REQUIRED',
ApiStatus.mfaAlreadyEnabled: 'MFA_ALREADY_ENABLED',
ApiStatus.mfaNotEnabled: 'MFA_NOT_ENABLED',
ApiStatus.mfaInvalid: 'MFA_INVALID',
ApiStatus.mfaMustBeEnabled: 'MFA_MUST_BE_ENABLED',
ApiStatus.cannotEdit: 'CANNOT_EDIT',
ApiStatus.cannotDelete: 'CANNOT_DELETE',
ApiStatus.gptDisabled: 'GPT_DISABLED',
ApiStatus.passwordUsedBefore: 'PASSWORD_USED_BEFORE',
};
T? _$nullableGenericFromJson<T>(
Object? input,
T Function(Object? json) fromJson,
) => input == null ? null : fromJson(input);
Object? _$nullableGenericToJson<T>(
T? input,
Object? Function(T value) toJson,
) => input == null ? null : toJson(input);