TensorboardTimeSeries.fromJson constructor

TensorboardTimeSeries.fromJson(
  1. Object? j
)

Implementation

factory TensorboardTimeSeries.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return TensorboardTimeSeries(
    name: switch (json['name']) {
      null => '',
      Object $1 => decodeString($1),
    },
    displayName: switch (json['displayName']) {
      null => '',
      Object $1 => decodeString($1),
    },
    description: switch (json['description']) {
      null => '',
      Object $1 => decodeString($1),
    },
    valueType: switch (json['valueType']) {
      null => TensorboardTimeSeries_ValueType.$default,
      Object $1 => TensorboardTimeSeries_ValueType.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),
    },
    etag: switch (json['etag']) {
      null => '',
      Object $1 => decodeString($1),
    },
    pluginName: switch (json['pluginName']) {
      null => '',
      Object $1 => decodeString($1),
    },
    pluginData: switch (json['pluginData']) {
      null => Uint8List(0),
      Object $1 => decodeBytes($1),
    },
    metadata: switch (json['metadata']) {
      null => null,
      Object $1 => TensorboardTimeSeries_Metadata.fromJson($1),
    },
  );
}