1
1
part of 'movies.dart' ;
2
2
3
3
class AddDirectorToMovieVariablesBuilder {
4
- Optional <AddDirectorToMovieVariablesPersonId > _personId = Optional .optional (
5
- AddDirectorToMovieVariablesPersonId .fromJson, defaultSerializer);
4
+ Optional <AddDirectorToMovieVariablesPersonId > _personId = Optional .optional (AddDirectorToMovieVariablesPersonId .fromJson, defaultSerializer);
6
5
Optional <String > _movieId = Optional .optional (nativeFromJson, nativeToJson);
7
6
8
7
final FirebaseDataConnect _dataConnect;
9
- AddDirectorToMovieVariablesBuilder personId (
10
- AddDirectorToMovieVariablesPersonId ? t) {
11
- _personId.value = t;
12
- return this ;
8
+ AddDirectorToMovieVariablesBuilder personId (AddDirectorToMovieVariablesPersonId ? t) {
9
+ _personId.value = t;
10
+ return this ;
13
11
}
14
-
15
12
AddDirectorToMovieVariablesBuilder movieId (String ? t) {
16
- _movieId.value = t;
17
- return this ;
13
+ _movieId.value = t;
14
+ return this ;
18
15
}
19
16
20
- AddDirectorToMovieVariablesBuilder (
21
- this ._dataConnect,
22
- );
23
- Deserializer <AddDirectorToMovieData > dataDeserializer =
24
- (dynamic json) => AddDirectorToMovieData .fromJson (jsonDecode (json));
25
- Serializer <AddDirectorToMovieVariables > varsSerializer =
26
- (AddDirectorToMovieVariables vars) => jsonEncode (vars.toJson ());
27
- Future <OperationResult <AddDirectorToMovieData , AddDirectorToMovieVariables >>
28
- execute () {
17
+ AddDirectorToMovieVariablesBuilder (this ._dataConnect, );
18
+ Deserializer <AddDirectorToMovieData > dataDeserializer = (dynamic json) => AddDirectorToMovieData .fromJson (jsonDecode (json));
19
+ Serializer <AddDirectorToMovieVariables > varsSerializer = (AddDirectorToMovieVariables vars) => jsonEncode (vars.toJson ());
20
+ Future <OperationResult <AddDirectorToMovieData , AddDirectorToMovieVariables >> execute () {
29
21
return ref ().execute ();
30
22
}
31
23
32
24
MutationRef <AddDirectorToMovieData , AddDirectorToMovieVariables > ref () {
33
- AddDirectorToMovieVariables vars = AddDirectorToMovieVariables (
34
- personId: _personId,
35
- movieId: _movieId,
36
- );
37
- return _dataConnect.mutation (
38
- "addDirectorToMovie" , dataDeserializer, varsSerializer, vars);
25
+ AddDirectorToMovieVariables vars= AddDirectorToMovieVariables (personId: _personId,movieId: _movieId,);
26
+ return _dataConnect.mutation ("addDirectorToMovie" , dataDeserializer, varsSerializer, vars);
39
27
}
40
28
}
41
29
42
30
class AddDirectorToMovieDirectedByInsert {
43
31
String directedbyId;
44
32
String movieId;
45
- AddDirectorToMovieDirectedByInsert .fromJson (dynamic json)
46
- : directedbyId = nativeFromJson <String >(json['directedbyId' ]),
47
- movieId = nativeFromJson <String >(json['movieId' ]);
33
+ AddDirectorToMovieDirectedByInsert .fromJson (dynamic json):
34
+ directedbyId = nativeFromJson <String >(json['directedbyId' ]),movieId = nativeFromJson <String >(json['movieId' ]);
48
35
49
36
Map <String , dynamic > toJson () {
50
37
Map <String , dynamic > json = {};
@@ -61,9 +48,8 @@ class AddDirectorToMovieDirectedByInsert {
61
48
62
49
class AddDirectorToMovieData {
63
50
AddDirectorToMovieDirectedByInsert directedBy_insert;
64
- AddDirectorToMovieData .fromJson (dynamic json)
65
- : directedBy_insert = AddDirectorToMovieDirectedByInsert .fromJson (
66
- json['directedBy_insert' ]);
51
+ AddDirectorToMovieData .fromJson (dynamic json):
52
+ directedBy_insert = AddDirectorToMovieDirectedByInsert .fromJson (json['directedBy_insert' ]);
67
53
68
54
Map <String , dynamic > toJson () {
69
55
Map <String , dynamic > json = {};
@@ -78,8 +64,8 @@ class AddDirectorToMovieData {
78
64
79
65
class AddDirectorToMovieVariablesPersonId {
80
66
String id;
81
- AddDirectorToMovieVariablesPersonId .fromJson (dynamic json)
82
- : id = nativeFromJson <String >(json['id' ]);
67
+ AddDirectorToMovieVariablesPersonId .fromJson (dynamic json):
68
+ id = nativeFromJson <String >(json['id' ]);
83
69
84
70
Map <String , dynamic > toJson () {
85
71
Map <String , dynamic > json = {};
@@ -93,29 +79,25 @@ class AddDirectorToMovieVariablesPersonId {
93
79
}
94
80
95
81
class AddDirectorToMovieVariables {
96
- late Optional <AddDirectorToMovieVariablesPersonId > personId;
97
- late Optional <String > movieId;
98
- @Deprecated (
99
- 'fromJson is deprecated for Variable classes as they are no longer required for deserialization.' )
82
+ late Optional <AddDirectorToMovieVariablesPersonId >personId;
83
+ late Optional <String >movieId;
84
+ @Deprecated ('fromJson is deprecated for Variable classes as they are no longer required for deserialization.' )
100
85
AddDirectorToMovieVariables .fromJson (Map <String , dynamic > json) {
101
- personId = Optional .optional (
102
- AddDirectorToMovieVariablesPersonId .fromJson, defaultSerializer);
103
- personId.value = json['personId' ] == null
104
- ? null
105
- : AddDirectorToMovieVariablesPersonId .fromJson (json['personId' ]);
106
-
86
+
87
+ personId = Optional .optional (AddDirectorToMovieVariablesPersonId .fromJson, defaultSerializer);
88
+ personId.value = json['personId' ] == null ? null : AddDirectorToMovieVariablesPersonId .fromJson (json['personId' ]);
89
+
107
90
movieId = Optional .optional (nativeFromJson, nativeToJson);
108
- movieId.value = json['movieId' ] == null
109
- ? null
110
- : nativeFromJson <String >(json['movieId' ]);
91
+ movieId.value = json['movieId' ] == null ? null : nativeFromJson <String >(json['movieId' ]);
92
+
111
93
}
112
94
113
95
Map <String , dynamic > toJson () {
114
96
Map <String , dynamic > json = {};
115
- if (personId.state == OptionalState .set ) {
97
+ if (personId.state == OptionalState .set ) {
116
98
json['personId' ] = personId.toJson ();
117
99
}
118
- if (movieId.state == OptionalState .set ) {
100
+ if (movieId.state == OptionalState .set ) {
119
101
json['movieId' ] = movieId.toJson ();
120
102
}
121
103
return json;
@@ -126,3 +108,4 @@ class AddDirectorToMovieVariables {
126
108
required this .movieId,
127
109
});
128
110
}
111
+
0 commit comments