-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
348 additions
and
1,251 deletions.
There are no files selected for viewing
292 changes: 66 additions & 226 deletions
292
...ebase_data_connect/firebase_data_connect/example/lib/generated/add_director_to_movie.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,292 +1,132 @@ | ||
part of movies; | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
class AddDirectorToMovie { | ||
String name = "addDirectorToMovie"; | ||
AddDirectorToMovie({required this.dataConnect}); | ||
|
||
Deserializer<AddDirectorToMovieResponse> dataDeserializer = (String json) => AddDirectorToMovieResponse.fromJson(jsonDecode(json) as Map<String, dynamic>); | ||
Serializer<AddDirectorToMovieVariables> varsSerializer = (AddDirectorToMovieVariables vars) => jsonEncode(vars.toJson()); | ||
MutationRef<AddDirectorToMovieResponse, AddDirectorToMovieVariables> ref( | ||
{AddDirectorToMovieVariablesPersonId? personId,String? movieId,}) { | ||
AddDirectorToMovieVariables vars=AddDirectorToMovieVariables(personId: personId,movieId: movieId,); | ||
|
||
return dataConnect.mutation(this.name, dataDeserializer, varsSerializer, vars); | ||
Deserializer<AddDirectorToMovieResponse> dataDeserializer = (String json) => | ||
AddDirectorToMovieResponse.fromJson( | ||
jsonDecode(json) as Map<String, dynamic>); | ||
Serializer<AddDirectorToMovieVariables> varsSerializer = | ||
(AddDirectorToMovieVariables vars) => jsonEncode(vars.toJson()); | ||
MutationRef<AddDirectorToMovieResponse, AddDirectorToMovieVariables> ref({ | ||
AddDirectorToMovieVariablesPersonId? personId, | ||
String? movieId, | ||
}) { | ||
AddDirectorToMovieVariables vars = AddDirectorToMovieVariables( | ||
personId: personId, | ||
movieId: movieId, | ||
); | ||
|
||
return dataConnect.mutation( | ||
this.name, dataDeserializer, varsSerializer, vars); | ||
} | ||
|
||
FirebaseDataConnect dataConnect; | ||
} | ||
|
||
|
||
|
||
|
||
|
||
class AddDirectorToMovieDirectedByInsert { | ||
|
||
|
||
|
||
|
||
late String directedbyId; | ||
|
||
|
||
|
||
|
||
|
||
late String movieId; | ||
|
||
|
||
|
||
AddDirectorToMovieDirectedByInsert.fromJson(Map<String, dynamic> json): | ||
directedbyId = | ||
json['directedbyId'], | ||
|
||
|
||
movieId = | ||
json['movieId'] | ||
|
||
{ | ||
|
||
|
||
|
||
|
||
|
||
} | ||
late String directedbyId; | ||
|
||
late String movieId; | ||
|
||
AddDirectorToMovieDirectedByInsert.fromJson(Map<String, dynamic> json) | ||
: directedbyId = json['directedbyId'], | ||
movieId = json['movieId'] {} | ||
|
||
// TODO(mtewani): Fix up to create a map on the fly | ||
Map<String, dynamic> toJson() { | ||
Map<String, dynamic> json = {}; | ||
|
||
|
||
json['directedbyId'] = | ||
|
||
directedbyId | ||
|
||
; | ||
|
||
|
||
|
||
json['movieId'] = | ||
|
||
movieId | ||
|
||
; | ||
|
||
|
||
|
||
json['directedbyId'] = directedbyId; | ||
|
||
json['movieId'] = movieId; | ||
|
||
return json; | ||
} | ||
|
||
AddDirectorToMovieDirectedByInsert({ | ||
|
||
required this.directedbyId, | ||
|
||
required this.movieId, | ||
|
||
}) { // TODO(mtewani): Only show this if there are optional fields. | ||
|
||
|
||
|
||
|
||
|
||
}) { | ||
// TODO(mtewani): Only show this if there are optional fields. | ||
} | ||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
class AddDirectorToMovieResponse { | ||
|
||
|
||
|
||
|
||
late AddDirectorToMovieDirectedByInsert directedBy_insert; | ||
|
||
|
||
|
||
AddDirectorToMovieResponse.fromJson(Map<String, dynamic> json): | ||
directedBy_insert = | ||
AddDirectorToMovieDirectedByInsert.fromJson(json['directedBy_insert']) | ||
|
||
|
||
{ | ||
|
||
|
||
|
||
} | ||
late AddDirectorToMovieDirectedByInsert directedBy_insert; | ||
|
||
AddDirectorToMovieResponse.fromJson(Map<String, dynamic> json) | ||
: directedBy_insert = AddDirectorToMovieDirectedByInsert.fromJson( | ||
json['directedBy_insert']) {} | ||
|
||
// TODO(mtewani): Fix up to create a map on the fly | ||
Map<String, dynamic> toJson() { | ||
Map<String, dynamic> json = {}; | ||
|
||
|
||
json['directedBy_insert'] = | ||
|
||
directedBy_insert.toJson() | ||
|
||
; | ||
|
||
|
||
|
||
json['directedBy_insert'] = directedBy_insert.toJson(); | ||
|
||
return json; | ||
} | ||
|
||
AddDirectorToMovieResponse({ | ||
|
||
required this.directedBy_insert, | ||
|
||
}) { // TODO(mtewani): Only show this if there are optional fields. | ||
|
||
|
||
|
||
}) { | ||
// TODO(mtewani): Only show this if there are optional fields. | ||
} | ||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
class AddDirectorToMovieVariablesPersonId { | ||
|
||
|
||
|
||
|
||
late String id; | ||
|
||
|
||
|
||
AddDirectorToMovieVariablesPersonId.fromJson(Map<String, dynamic> json): | ||
id = | ||
json['id'] | ||
|
||
{ | ||
|
||
|
||
|
||
} | ||
late String id; | ||
|
||
AddDirectorToMovieVariablesPersonId.fromJson(Map<String, dynamic> json) | ||
: id = json['id'] {} | ||
|
||
// TODO(mtewani): Fix up to create a map on the fly | ||
Map<String, dynamic> toJson() { | ||
Map<String, dynamic> json = {}; | ||
|
||
|
||
json['id'] = | ||
|
||
id | ||
|
||
; | ||
|
||
|
||
|
||
json['id'] = id; | ||
|
||
return json; | ||
} | ||
|
||
AddDirectorToMovieVariablesPersonId({ | ||
|
||
required this.id, | ||
|
||
}) { // TODO(mtewani): Only show this if there are optional fields. | ||
|
||
|
||
|
||
}) { | ||
// TODO(mtewani): Only show this if there are optional fields. | ||
} | ||
|
||
} | ||
|
||
class AddDirectorToMovieVariables { | ||
late AddDirectorToMovieVariablesPersonId? personId; | ||
|
||
late String? movieId; | ||
|
||
AddDirectorToMovieVariables.fromJson(Map<String, dynamic> json) | ||
: personId = | ||
AddDirectorToMovieVariablesPersonId.fromJson(json['personId']), | ||
movieId = json['movieId'] {} | ||
|
||
|
||
|
||
// TODO(mtewani): Fix up to create a map on the fly | ||
Map<String, dynamic> toJson() { | ||
Map<String, dynamic> json = {}; | ||
|
||
class AddDirectorToMovieVariables { | ||
|
||
|
||
|
||
|
||
late AddDirectorToMovieVariablesPersonId? personId; | ||
|
||
|
||
|
||
|
||
|
||
late String? movieId; | ||
|
||
|
||
|
||
AddDirectorToMovieVariables.fromJson(Map<String, dynamic> json): | ||
personId = | ||
AddDirectorToMovieVariablesPersonId.fromJson(json['personId']) | ||
, | ||
|
||
|
||
movieId = | ||
json['movieId'] | ||
|
||
{ | ||
|
||
|
||
|
||
|
||
|
||
if (personId != null) { | ||
json['personId'] = personId!.toJson(); | ||
} | ||
|
||
if (movieId != null) { | ||
json['movieId'] = movieId; | ||
} | ||
|
||
// TODO(mtewani): Fix up to create a map on the fly | ||
Map<String, dynamic> toJson() { | ||
Map<String, dynamic> json = {}; | ||
|
||
|
||
if (personId != null) { | ||
json['personId'] = | ||
|
||
personId!.toJson() | ||
|
||
; | ||
} | ||
|
||
|
||
|
||
if (movieId != null) { | ||
json['movieId'] = | ||
|
||
movieId | ||
|
||
; | ||
} | ||
|
||
|
||
return json; | ||
} | ||
|
||
AddDirectorToMovieVariables({ | ||
|
||
this.personId, | ||
|
||
this.movieId, | ||
|
||
}) { // TODO(mtewani): Only show this if there are optional fields. | ||
|
||
|
||
|
||
|
||
|
||
this.personId, | ||
this.movieId, | ||
}) { | ||
// TODO(mtewani): Only show this if there are optional fields. | ||
} | ||
|
||
} | ||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.