ImportFeatureValuesRequest.fromJson constructor

ImportFeatureValuesRequest.fromJson(
  1. Object? j
)

Implementation

factory ImportFeatureValuesRequest.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return ImportFeatureValuesRequest(
    avroSource: switch (json['avroSource']) {
      null => null,
      Object $1 => AvroSource.fromJson($1),
    },
    bigquerySource: switch (json['bigquerySource']) {
      null => null,
      Object $1 => BigQuerySource.fromJson($1),
    },
    csvSource: switch (json['csvSource']) {
      null => null,
      Object $1 => CsvSource.fromJson($1),
    },
    featureTimeField: switch (json['featureTimeField']) {
      null => null,
      Object $1 => decodeString($1),
    },
    featureTime: switch (json['featureTime']) {
      null => null,
      Object $1 => protobuf.Timestamp.fromJson($1),
    },
    entityType: switch (json['entityType']) {
      null => '',
      Object $1 => decodeString($1),
    },
    entityIdField: switch (json['entityIdField']) {
      null => '',
      Object $1 => decodeString($1),
    },
    featureSpecs: switch (json['featureSpecs']) {
      null => [],
      List<Object?> $1 => [
        for (final i in $1)
          ImportFeatureValuesRequest_FeatureSpec.fromJson(i),
      ],
      _ => throw const FormatException('"featureSpecs" is not a list'),
    },
    disableOnlineServing: switch (json['disableOnlineServing']) {
      null => false,
      Object $1 => decodeBool($1),
    },
    workerCount: switch (json['workerCount']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    disableIngestionAnalysis: switch (json['disableIngestionAnalysis']) {
      null => false,
      Object $1 => decodeBool($1),
    },
  );
}