SavedQuery.fromJson constructor

SavedQuery.fromJson(
  1. Object? j
)

Implementation

factory SavedQuery.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return SavedQuery(
    name: switch (json['name']) {
      null => '',
      Object $1 => decodeString($1),
    },
    displayName: switch (json['displayName']) {
      null => '',
      Object $1 => decodeString($1),
    },
    metadata: switch (json['metadata']) {
      null => null,
      Object $1 => protobuf.Value.fromJson($1),
    },
    createTime: switch (json['createTime']) {
      null => null,
      Object $1 => protobuf.Timestamp.fromJson($1),
    },
    updateTime: switch (json['updateTime']) {
      null => null,
      Object $1 => protobuf.Timestamp.fromJson($1),
    },
    annotationFilter: switch (json['annotationFilter']) {
      null => '',
      Object $1 => decodeString($1),
    },
    problemType: switch (json['problemType']) {
      null => '',
      Object $1 => decodeString($1),
    },
    annotationSpecCount: switch (json['annotationSpecCount']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    etag: switch (json['etag']) {
      null => '',
      Object $1 => decodeString($1),
    },
    supportAutomlTraining: switch (json['supportAutomlTraining']) {
      null => false,
      Object $1 => decodeBool($1),
    },
  );
}