Target.fromJson constructor

Target.fromJson(
  1. Object? j
)

Implementation

factory Target.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return Target(
    query: switch (json['query']) {
      null => null,
      Object $1 => Target_QueryTarget.fromJson($1),
    },
    documents: switch (json['documents']) {
      null => null,
      Object $1 => Target_DocumentsTarget.fromJson($1),
    },
    resumeToken: switch (json['resumeToken']) {
      null => null,
      Object $1 => decodeBytes($1),
    },
    readTime: switch (json['readTime']) {
      null => null,
      Object $1 => Timestamp.fromJson($1),
    },
    targetId: switch (json['targetId']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    once: switch (json['once']) {
      null => false,
      Object $1 => decodeBool($1),
    },
    expectedCount: switch (json['expectedCount']) {
      null => null,
      Object $1 => Int32Value.fromJson($1),
    },
  );
}