Skip to content

Commit

Permalink
fix: regenerate models
Browse files Browse the repository at this point in the history
  • Loading branch information
Equartey committed Apr 22, 2024
1 parent 78d170f commit 9392c13
Show file tree
Hide file tree
Showing 51 changed files with 351 additions and 302 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ class BelongsToChildExplicit extends amplify_core.Model {
buffer.write("id=" + "$id" + ", ");
buffer.write("name=" + "$_name" + ", ");
buffer.write("belongsToParent=" +
(_belongsToParent != null ? _belongsToParent.toString() : "null") +
(_belongsToParent != null ? _belongsToParent!.toString() : "null") +
", ");
buffer.write("createdAt=" +
(_createdAt != null ? _createdAt.format() : "null") +
(_createdAt != null ? _createdAt!.format() : "null") +
", ");
buffer.write(
"updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null"));
"updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null"));
buffer.write("}");

return buffer.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@ class BelongsToChildImplicit extends amplify_core.Model {
buffer.write("id=" + "$id" + ", ");
buffer.write("name=" + "$_name" + ", ");
buffer.write("belongsToParent=" +
(_belongsToParent != null ? _belongsToParent.toString() : "null") +
(_belongsToParent != null ? _belongsToParent!.toString() : "null") +
", ");
buffer.write("createdAt=" +
(_createdAt != null ? _createdAt.format() : "null") +
(_createdAt != null ? _createdAt!.format() : "null") +
", ");
buffer.write(
"updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null"));
"updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null"));
buffer.write("}");

return buffer.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ class BelongsToParent extends amplify_core.Model {
buffer.write("id=" + "$id" + ", ");
buffer.write("name=" + "$_name" + ", ");
buffer.write("createdAt=" +
(_createdAt != null ? _createdAt.format() : "null") +
(_createdAt != null ? _createdAt!.format() : "null") +
", ");
buffer.write("updatedAt=" +
(_updatedAt != null ? _updatedAt.format() : "null") +
(_updatedAt != null ? _updatedAt!.format() : "null") +
", ");
buffer.write("belongsToParentImplicitChildId=" +
"$_belongsToParentImplicitChildId" +
Expand Down
14 changes: 8 additions & 6 deletions packages/amplify_datastore/example/lib/models/Blog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ class Blog extends amplify_core.Model {
buffer.write("id=" + "$id" + ", ");
buffer.write("name=" + "$_name" + ", ");
buffer.write("createdAt=" +
(_createdAt != null ? _createdAt.format() : "null") +
(_createdAt != null ? _createdAt!.format() : "null") +
", ");
buffer.write(
"updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null"));
"updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null"));
buffer.write("}");

return buffer.toString();
Expand All @@ -132,18 +132,20 @@ class Blog extends amplify_core.Model {
Blog.fromJson(Map<String, dynamic> json)
: id = json['id'],
_name = json['name'],
_posts = json['posts'] != null
? json['posts'] is Map
_posts = json['posts'] is Map
? (json['posts']['items'] is List
? (json['posts']['items'] as List)
.where((e) => e != null)
.map((e) => Post.fromJson(new Map<String, dynamic>.from(e)))
.toList()
: (json['posts'] as List)
: null)
: (json['posts'] is List
? (json['posts'] as List)
.where((e) => e?['serializedData'] != null)
.map((e) => Post.fromJson(
new Map<String, dynamic>.from(e?['serializedData'])))
.toList()
: null,
: null),
_createdAt = json['createdAt'] != null
? amplify_core.TemporalDateTime.fromString(json['createdAt'])
: null,
Expand Down
6 changes: 3 additions & 3 deletions packages/amplify_datastore/example/lib/models/Comment.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ class Comment extends amplify_core.Model {

buffer.write("Comment {");
buffer.write("id=" + "$id" + ", ");
buffer.write("post=" + (_post != null ? _post.toString() : "null") + ", ");
buffer.write("post=" + (_post != null ? _post!.toString() : "null") + ", ");
buffer.write("content=" + "$_content" + ", ");
buffer.write("createdAt=" +
(_createdAt != null ? _createdAt.format() : "null") +
(_createdAt != null ? _createdAt!.format() : "null") +
", ");
buffer.write(
"updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null"));
"updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null"));
buffer.write("}");

return buffer.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ class CpkHasManyChildBidirectionalExplicit extends amplify_core.Model {
buffer.write("id=" + "$id" + ", ");
buffer.write("name=" + "$_name" + ", ");
buffer.write("hasManyParent=" +
(_hasManyParent != null ? _hasManyParent.toString() : "null") +
(_hasManyParent != null ? _hasManyParent!.toString() : "null") +
", ");
buffer.write("createdAt=" +
(_createdAt != null ? _createdAt.format() : "null") +
(_createdAt != null ? _createdAt!.format() : "null") +
", ");
buffer.write(
"updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null"));
"updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null"));
buffer.write("}");

return buffer.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ class CpkHasManyChildBidirectionalImplicit extends amplify_core.Model {
buffer.write("id=" + "$id" + ", ");
buffer.write("name=" + "$_name" + ", ");
buffer.write("hasManyParent=" +
(_hasManyParent != null ? _hasManyParent.toString() : "null") +
(_hasManyParent != null ? _hasManyParent!.toString() : "null") +
", ");
buffer.write("createdAt=" +
(_createdAt != null ? _createdAt.format() : "null") +
(_createdAt != null ? _createdAt!.format() : "null") +
", ");
buffer.write(
"updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null"));
"updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null"));
buffer.write("}");

return buffer.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ class CpkHasManyParentBidirectionalExplicit extends amplify_core.Model {
buffer.write("id=" + "$id" + ", ");
buffer.write("name=" + "$_name" + ", ");
buffer.write("createdAt=" +
(_createdAt != null ? _createdAt.format() : "null") +
(_createdAt != null ? _createdAt!.format() : "null") +
", ");
buffer.write(
"updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null"));
"updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null"));
buffer.write("}");

return buffer.toString();
Expand Down Expand Up @@ -165,21 +165,22 @@ class CpkHasManyParentBidirectionalExplicit extends amplify_core.Model {
CpkHasManyParentBidirectionalExplicit.fromJson(Map<String, dynamic> json)
: id = json['id'],
_name = json['name'],
_bidirectionalExplicitChildren = json[
'bidirectionalExplicitChildren'] !=
null
? json['bidirectionalExplicitChildren'] is Map
_bidirectionalExplicitChildren = json['bidirectionalExplicitChildren']
is Map
? (json['bidirectionalExplicitChildren']['items'] is List
? (json['bidirectionalExplicitChildren']['items'] as List)
.where((e) => e != null)
.map((e) => CpkHasManyChildBidirectionalExplicit.fromJson(
new Map<String, dynamic>.from(e)))
.toList()
: (json['bidirectionalExplicitChildren'] as List)
: null)
: (json['bidirectionalExplicitChildren'] is List
? (json['bidirectionalExplicitChildren'] as List)
.where((e) => e?['serializedData'] != null)
.map((e) => CpkHasManyChildBidirectionalExplicit.fromJson(
new Map<String, dynamic>.from(e?['serializedData'])))
.toList()
: null,
: null),
_createdAt = json['createdAt'] != null
? amplify_core.TemporalDateTime.fromString(json['createdAt'])
: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ class CpkHasManyParentBidirectionalImplicit extends amplify_core.Model {
buffer.write("id=" + "$id" + ", ");
buffer.write("name=" + "$_name" + ", ");
buffer.write("createdAt=" +
(_createdAt != null ? _createdAt.format() : "null") +
(_createdAt != null ? _createdAt!.format() : "null") +
", ");
buffer.write(
"updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null"));
"updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null"));
buffer.write("}");

return buffer.toString();
Expand Down Expand Up @@ -165,21 +165,22 @@ class CpkHasManyParentBidirectionalImplicit extends amplify_core.Model {
CpkHasManyParentBidirectionalImplicit.fromJson(Map<String, dynamic> json)
: id = json['id'],
_name = json['name'],
_bidirectionalImplicitChildren = json[
'bidirectionalImplicitChildren'] !=
null
? json['bidirectionalImplicitChildren'] is Map
_bidirectionalImplicitChildren = json['bidirectionalImplicitChildren']
is Map
? (json['bidirectionalImplicitChildren']['items'] is List
? (json['bidirectionalImplicitChildren']['items'] as List)
.where((e) => e != null)
.map((e) => CpkHasManyChildBidirectionalImplicit.fromJson(
new Map<String, dynamic>.from(e)))
.toList()
: (json['bidirectionalImplicitChildren'] as List)
: null)
: (json['bidirectionalImplicitChildren'] is List
? (json['bidirectionalImplicitChildren'] as List)
.where((e) => e?['serializedData'] != null)
.map((e) => CpkHasManyChildBidirectionalImplicit.fromJson(
new Map<String, dynamic>.from(e?['serializedData'])))
.toList()
: null,
: null),
_createdAt = json['createdAt'] != null
? amplify_core.TemporalDateTime.fromString(json['createdAt'])
: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ class CpkHasManyUnidirectionalChildExplicit extends amplify_core.Model {
buffer.write("hasManyParentID=" + "$_hasManyParentID" + ", ");
buffer.write("hasManyParentName=" + "$_hasManyParentName" + ", ");
buffer.write("createdAt=" +
(_createdAt != null ? _createdAt.format() : "null") +
(_createdAt != null ? _createdAt!.format() : "null") +
", ");
buffer.write(
"updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null"));
"updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null"));
buffer.write("}");

return buffer.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ class CpkHasManyUnidirectionalChildImplicit extends amplify_core.Model {
buffer.write("id=" + "$id" + ", ");
buffer.write("name=" + "$_name" + ", ");
buffer.write("createdAt=" +
(_createdAt != null ? _createdAt.format() : "null") +
(_createdAt != null ? _createdAt!.format() : "null") +
", ");
buffer.write("updatedAt=" +
(_updatedAt != null ? _updatedAt.format() : "null") +
(_updatedAt != null ? _updatedAt!.format() : "null") +
", ");
buffer.write("cpkHasManyUnidirectionalParentImplicitChildrenId=" +
"$_cpkHasManyUnidirectionalParentImplicitChildrenId" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ class CpkHasManyUnidirectionalParent extends amplify_core.Model {
buffer.write("id=" + "$id" + ", ");
buffer.write("name=" + "$_name" + ", ");
buffer.write("createdAt=" +
(_createdAt != null ? _createdAt.format() : "null") +
(_createdAt != null ? _createdAt!.format() : "null") +
", ");
buffer.write(
"updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null"));
"updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null"));
buffer.write("}");

return buffer.toString();
Expand Down Expand Up @@ -180,32 +180,36 @@ class CpkHasManyUnidirectionalParent extends amplify_core.Model {
CpkHasManyUnidirectionalParent.fromJson(Map<String, dynamic> json)
: id = json['id'],
_name = json['name'],
_implicitChildren = json['implicitChildren'] != null
? json['implicitChildren'] is Map
_implicitChildren = json['implicitChildren'] is Map
? (json['implicitChildren']['items'] is List
? (json['implicitChildren']['items'] as List)
.where((e) => e != null)
.map((e) => CpkHasManyUnidirectionalChildImplicit.fromJson(
new Map<String, dynamic>.from(e)))
.toList()
: (json['implicitChildren'] as List)
: null)
: (json['implicitChildren'] is List
? (json['implicitChildren'] as List)
.where((e) => e?['serializedData'] != null)
.map((e) => CpkHasManyUnidirectionalChildImplicit.fromJson(
new Map<String, dynamic>.from(e?['serializedData'])))
.toList()
: null,
_explicitChildren = json['explicitChildren'] != null
? json['explicitChildren'] is Map
: null),
_explicitChildren = json['explicitChildren'] is Map
? (json['explicitChildren']['items'] is List
? (json['explicitChildren']['items'] as List)
.where((e) => e != null)
.map((e) => CpkHasManyUnidirectionalChildExplicit.fromJson(
new Map<String, dynamic>.from(e)))
.toList()
: (json['explicitChildren'] as List)
: null)
: (json['explicitChildren'] is List
? (json['explicitChildren'] as List)
.where((e) => e?['serializedData'] != null)
.map((e) => CpkHasManyUnidirectionalChildExplicit.fromJson(
new Map<String, dynamic>.from(e?['serializedData'])))
.toList()
: null,
: null),
_createdAt = json['createdAt'] != null
? amplify_core.TemporalDateTime.fromString(json['createdAt'])
: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ class CpkHasOneUnidirectionalChild extends amplify_core.Model {
buffer.write("id=" + "$id" + ", ");
buffer.write("name=" + "$_name" + ", ");
buffer.write("createdAt=" +
(_createdAt != null ? _createdAt.format() : "null") +
(_createdAt != null ? _createdAt!.format() : "null") +
", ");
buffer.write(
"updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null"));
"updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null"));
buffer.write("}");

return buffer.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ class CpkHasOneUnidirectionalParent extends amplify_core.Model {
buffer.write("explicitChildID=" + "$_explicitChildID" + ", ");
buffer.write("explicitChildName=" + "$_explicitChildName" + ", ");
buffer.write("createdAt=" +
(_createdAt != null ? _createdAt.format() : "null") +
(_createdAt != null ? _createdAt!.format() : "null") +
", ");
buffer.write("updatedAt=" +
(_updatedAt != null ? _updatedAt.format() : "null") +
(_updatedAt != null ? _updatedAt!.format() : "null") +
", ");
buffer.write("cpkHasOneUnidirectionalParentImplicitChildId=" +
"$_cpkHasOneUnidirectionalParentImplicitChildId" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ class CpkInventory extends amplify_core.Model {
buffer.write("warehouseId=" + "$_warehouseId" + ", ");
buffer.write("description=" + "$_description" + ", ");
buffer.write("createdAt=" +
(_createdAt != null ? _createdAt.format() : "null") +
(_createdAt != null ? _createdAt!.format() : "null") +
", ");
buffer.write(
"updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null"));
"updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null"));
buffer.write("}");

return buffer.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ class CpkManyToManyPost extends amplify_core.Model {
buffer.write("id=" + "$id" + ", ");
buffer.write("title=" + "$_title" + ", ");
buffer.write("createdAt=" +
(_createdAt != null ? _createdAt.format() : "null") +
(_createdAt != null ? _createdAt!.format() : "null") +
", ");
buffer.write(
"updatedAt=" + (_updatedAt != null ? _updatedAt.format() : "null"));
"updatedAt=" + (_updatedAt != null ? _updatedAt!.format() : "null"));
buffer.write("}");

return buffer.toString();
Expand All @@ -134,19 +134,21 @@ class CpkManyToManyPost extends amplify_core.Model {
CpkManyToManyPost.fromJson(Map<String, dynamic> json)
: id = json['id'],
_title = json['title'],
_tags = json['tags'] != null
? json['tags'] is Map
_tags = json['tags'] is Map
? (json['tags']['items'] is List
? (json['tags']['items'] as List)
.where((e) => e != null)
.map((e) =>
CpkPostTags.fromJson(new Map<String, dynamic>.from(e)))
.toList()
: (json['tags'] as List)
: null)
: (json['tags'] is List
? (json['tags'] as List)
.where((e) => e?['serializedData'] != null)
.map((e) => CpkPostTags.fromJson(
new Map<String, dynamic>.from(e?['serializedData'])))
.toList()
: null,
: null),
_createdAt = json['createdAt'] != null
? amplify_core.TemporalDateTime.fromString(json['createdAt'])
: null,
Expand Down
Loading

0 comments on commit 9392c13

Please sign in to comment.