RagFileMetadataConfig.fromJson constructor

RagFileMetadataConfig.fromJson(
  1. Object? j
)

Implementation

factory RagFileMetadataConfig.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return RagFileMetadataConfig(
    gcsMetadataSchemaSource: switch (json['gcsMetadataSchemaSource']) {
      null => null,
      Object $1 => GcsSource.fromJson($1),
    },
    googleDriveMetadataSchemaSource:
        switch (json['googleDriveMetadataSchemaSource']) {
          null => null,
          Object $1 => GoogleDriveSource.fromJson($1),
        },
    inlineMetadataSchemaSource: switch (json['inlineMetadataSchemaSource']) {
      null => null,
      Object $1 => decodeString($1),
    },
    gcsMetadataSource: switch (json['gcsMetadataSource']) {
      null => null,
      Object $1 => GcsSource.fromJson($1),
    },
    googleDriveMetadataSource: switch (json['googleDriveMetadataSource']) {
      null => null,
      Object $1 => GoogleDriveSource.fromJson($1),
    },
    inlineMetadataSource: switch (json['inlineMetadataSource']) {
      null => null,
      Object $1 => decodeString($1),
    },
  );
}