Skip to content

Commit 3511ef1

Browse files
author
serverpod_cloud
committed
feat: 6be75d90e842709d24bf1fa0d7746814d34dfbd1
1 parent a6cc5a9 commit 3511ef1

15 files changed

Lines changed: 2051 additions & 695 deletions

File tree

ground_control_client/lib/src/protocol/client.dart

Lines changed: 106 additions & 76 deletions
Large diffs are not rendered by default.
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
/* AUTOMATICALLY GENERATED CODE DO NOT MODIFY */
2+
/* To generate run: "serverpod generate" */
3+
4+
// ignore_for_file: implementation_imports
5+
// ignore_for_file: library_private_types_in_public_api
6+
// ignore_for_file: non_constant_identifier_names
7+
// ignore_for_file: public_member_api_docs
8+
// ignore_for_file: type_literal_in_constant_pattern
9+
// ignore_for_file: use_super_parameters
10+
// ignore_for_file: invalid_use_of_internal_member
11+
12+
// ignore_for_file: no_leading_underscores_for_library_prefixes
13+
import 'package:serverpod_client/serverpod_client.dart' as _i1;
14+
15+
abstract class AuthTokenInfo implements _i1.SerializableModel {
16+
AuthTokenInfo._({
17+
required this.tokenId,
18+
required this.issuer,
19+
required this.method,
20+
required this.createdAt,
21+
this.expiresAt,
22+
this.expireAfterUnusedFor,
23+
this.lastUsedAt,
24+
});
25+
26+
factory AuthTokenInfo({
27+
required String tokenId,
28+
required String issuer,
29+
required String method,
30+
required DateTime createdAt,
31+
DateTime? expiresAt,
32+
Duration? expireAfterUnusedFor,
33+
DateTime? lastUsedAt,
34+
}) = _AuthTokenInfoImpl;
35+
36+
factory AuthTokenInfo.fromJson(Map<String, dynamic> jsonSerialization) {
37+
return AuthTokenInfo(
38+
tokenId: jsonSerialization['tokenId'] as String,
39+
issuer: jsonSerialization['issuer'] as String,
40+
method: jsonSerialization['method'] as String,
41+
createdAt: _i1.DateTimeJsonExtension.fromJson(
42+
jsonSerialization['createdAt'],
43+
),
44+
expiresAt: jsonSerialization['expiresAt'] == null
45+
? null
46+
: _i1.DateTimeJsonExtension.fromJson(jsonSerialization['expiresAt']),
47+
expireAfterUnusedFor: jsonSerialization['expireAfterUnusedFor'] == null
48+
? null
49+
: _i1.DurationJsonExtension.fromJson(
50+
jsonSerialization['expireAfterUnusedFor'],
51+
),
52+
lastUsedAt: jsonSerialization['lastUsedAt'] == null
53+
? null
54+
: _i1.DateTimeJsonExtension.fromJson(jsonSerialization['lastUsedAt']),
55+
);
56+
}
57+
58+
String tokenId;
59+
60+
String issuer;
61+
62+
String method;
63+
64+
DateTime createdAt;
65+
66+
DateTime? expiresAt;
67+
68+
Duration? expireAfterUnusedFor;
69+
70+
DateTime? lastUsedAt;
71+
72+
/// Returns a shallow copy of this [AuthTokenInfo]
73+
/// with some or all fields replaced by the given arguments.
74+
@_i1.useResult
75+
AuthTokenInfo copyWith({
76+
String? tokenId,
77+
String? issuer,
78+
String? method,
79+
DateTime? createdAt,
80+
DateTime? expiresAt,
81+
Duration? expireAfterUnusedFor,
82+
DateTime? lastUsedAt,
83+
});
84+
@override
85+
Map<String, dynamic> toJson() {
86+
return {
87+
'__className__': 'AuthTokenInfo',
88+
'tokenId': tokenId,
89+
'issuer': issuer,
90+
'method': method,
91+
'createdAt': createdAt.toJson(),
92+
if (expiresAt != null) 'expiresAt': expiresAt?.toJson(),
93+
if (expireAfterUnusedFor != null)
94+
'expireAfterUnusedFor': expireAfterUnusedFor?.toJson(),
95+
if (lastUsedAt != null) 'lastUsedAt': lastUsedAt?.toJson(),
96+
};
97+
}
98+
99+
@override
100+
String toString() {
101+
return _i1.SerializationManager.encode(this);
102+
}
103+
}
104+
105+
class _Undefined {}
106+
107+
class _AuthTokenInfoImpl extends AuthTokenInfo {
108+
_AuthTokenInfoImpl({
109+
required String tokenId,
110+
required String issuer,
111+
required String method,
112+
required DateTime createdAt,
113+
DateTime? expiresAt,
114+
Duration? expireAfterUnusedFor,
115+
DateTime? lastUsedAt,
116+
}) : super._(
117+
tokenId: tokenId,
118+
issuer: issuer,
119+
method: method,
120+
createdAt: createdAt,
121+
expiresAt: expiresAt,
122+
expireAfterUnusedFor: expireAfterUnusedFor,
123+
lastUsedAt: lastUsedAt,
124+
);
125+
126+
/// Returns a shallow copy of this [AuthTokenInfo]
127+
/// with some or all fields replaced by the given arguments.
128+
@_i1.useResult
129+
@override
130+
AuthTokenInfo copyWith({
131+
String? tokenId,
132+
String? issuer,
133+
String? method,
134+
DateTime? createdAt,
135+
Object? expiresAt = _Undefined,
136+
Object? expireAfterUnusedFor = _Undefined,
137+
Object? lastUsedAt = _Undefined,
138+
}) {
139+
return AuthTokenInfo(
140+
tokenId: tokenId ?? this.tokenId,
141+
issuer: issuer ?? this.issuer,
142+
method: method ?? this.method,
143+
createdAt: createdAt ?? this.createdAt,
144+
expiresAt: expiresAt is DateTime? ? expiresAt : this.expiresAt,
145+
expireAfterUnusedFor: expireAfterUnusedFor is Duration?
146+
? expireAfterUnusedFor
147+
: this.expireAfterUnusedFor,
148+
lastUsedAt: lastUsedAt is DateTime? ? lastUsedAt : this.lastUsedAt,
149+
);
150+
}
151+
}

0 commit comments

Comments
 (0)