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