Skip to content

Commit 95e564c

Browse files
author
serverpod_cloud
committed
feat: 4604be7f2a563b55cd41fc05d297f8e72cfdd198
1 parent 09e367a commit 95e564c

12 files changed

Lines changed: 688 additions & 374 deletions

File tree

ground_control_client/lib/src/protocol/client.dart

Lines changed: 131 additions & 100 deletions
Large diffs are not rendered by default.
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
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+
import '../../../../features/project/models/project.dart' as _i2;
15+
import '../../../../features/project/models/project_info/timestamp.dart' as _i3;
16+
17+
/// Augments a project object with ancillary information.
18+
///
19+
/// Ancillary information fields are included according to use case,
20+
/// in which case they are non-null.
21+
/// In other words, null ancillary fields correspond to `undefined`.
22+
abstract class ProjectInfo implements _i1.SerializableModel {
23+
ProjectInfo._({
24+
required this.project,
25+
this.latestDeployAttemptTime,
26+
});
27+
28+
factory ProjectInfo({
29+
required _i2.Project project,
30+
_i3.Timestamp? latestDeployAttemptTime,
31+
}) = _ProjectInfoImpl;
32+
33+
factory ProjectInfo.fromJson(Map<String, dynamic> jsonSerialization) {
34+
return ProjectInfo(
35+
project: _i2.Project.fromJson(
36+
(jsonSerialization['project'] as Map<String, dynamic>)),
37+
latestDeployAttemptTime: jsonSerialization['latestDeployAttemptTime'] ==
38+
null
39+
? null
40+
: _i3.Timestamp.fromJson((jsonSerialization['latestDeployAttemptTime']
41+
as Map<String, dynamic>)),
42+
);
43+
}
44+
45+
_i2.Project project;
46+
47+
/// The timestamp of the latest deploy attempt, or null if never deployed.
48+
/// (When deploy status is overhauled, this will likely be replaced by a
49+
/// `DeployAttempt` object.)
50+
_i3.Timestamp? latestDeployAttemptTime;
51+
52+
/// Returns a shallow copy of this [ProjectInfo]
53+
/// with some or all fields replaced by the given arguments.
54+
@_i1.useResult
55+
ProjectInfo copyWith({
56+
_i2.Project? project,
57+
_i3.Timestamp? latestDeployAttemptTime,
58+
});
59+
@override
60+
Map<String, dynamic> toJson() {
61+
return {
62+
'project': project.toJson(),
63+
if (latestDeployAttemptTime != null)
64+
'latestDeployAttemptTime': latestDeployAttemptTime?.toJson(),
65+
};
66+
}
67+
68+
@override
69+
String toString() {
70+
return _i1.SerializationManager.encode(this);
71+
}
72+
}
73+
74+
class _Undefined {}
75+
76+
class _ProjectInfoImpl extends ProjectInfo {
77+
_ProjectInfoImpl({
78+
required _i2.Project project,
79+
_i3.Timestamp? latestDeployAttemptTime,
80+
}) : super._(
81+
project: project,
82+
latestDeployAttemptTime: latestDeployAttemptTime,
83+
);
84+
85+
/// Returns a shallow copy of this [ProjectInfo]
86+
/// with some or all fields replaced by the given arguments.
87+
@_i1.useResult
88+
@override
89+
ProjectInfo copyWith({
90+
_i2.Project? project,
91+
Object? latestDeployAttemptTime = _Undefined,
92+
}) {
93+
return ProjectInfo(
94+
project: project ?? this.project.copyWith(),
95+
latestDeployAttemptTime: latestDeployAttemptTime is _i3.Timestamp?
96+
? latestDeployAttemptTime
97+
: this.latestDeployAttemptTime?.copyWith(),
98+
);
99+
}
100+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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 Timestamp implements _i1.SerializableModel {
16+
Timestamp._({this.timestamp});
17+
18+
factory Timestamp({DateTime? timestamp}) = _TimestampImpl;
19+
20+
factory Timestamp.fromJson(Map<String, dynamic> jsonSerialization) {
21+
return Timestamp(
22+
timestamp: jsonSerialization['timestamp'] == null
23+
? null
24+
: _i1.DateTimeJsonExtension.fromJson(
25+
jsonSerialization['timestamp']));
26+
}
27+
28+
DateTime? timestamp;
29+
30+
/// Returns a shallow copy of this [Timestamp]
31+
/// with some or all fields replaced by the given arguments.
32+
@_i1.useResult
33+
Timestamp copyWith({DateTime? timestamp});
34+
@override
35+
Map<String, dynamic> toJson() {
36+
return {if (timestamp != null) 'timestamp': timestamp?.toJson()};
37+
}
38+
39+
@override
40+
String toString() {
41+
return _i1.SerializationManager.encode(this);
42+
}
43+
}
44+
45+
class _Undefined {}
46+
47+
class _TimestampImpl extends Timestamp {
48+
_TimestampImpl({DateTime? timestamp}) : super._(timestamp: timestamp);
49+
50+
/// Returns a shallow copy of this [Timestamp]
51+
/// with some or all fields replaced by the given arguments.
52+
@_i1.useResult
53+
@override
54+
Timestamp copyWith({Object? timestamp = _Undefined}) {
55+
return Timestamp(
56+
timestamp: timestamp is DateTime? ? timestamp : this.timestamp);
57+
}
58+
}

0 commit comments

Comments
 (0)