PredictRequestResponseLoggingConfig.fromJson constructor

PredictRequestResponseLoggingConfig.fromJson(
  1. Object? j
)

Implementation

factory PredictRequestResponseLoggingConfig.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return PredictRequestResponseLoggingConfig(
    enabled: switch (json['enabled']) {
      null => false,
      Object $1 => decodeBool($1),
    },
    samplingRate: switch (json['samplingRate']) {
      null => 0,
      Object $1 => decodeDouble($1),
    },
    bigqueryDestination: switch (json['bigqueryDestination']) {
      null => null,
      Object $1 => BigQueryDestination.fromJson($1),
    },
    requestResponseLoggingSchemaVersion:
        switch (json['requestResponseLoggingSchemaVersion']) {
          null => '',
          Object $1 => decodeString($1),
        },
    enableOtelLogging: switch (json['enableOtelLogging']) {
      null => false,
      Object $1 => decodeBool($1),
    },
  );
}