SearchModelDeploymentMonitoringStatsAnomaliesRequest.fromJson constructor

SearchModelDeploymentMonitoringStatsAnomaliesRequest.fromJson(
  1. Object? j
)

Implementation

factory SearchModelDeploymentMonitoringStatsAnomaliesRequest.fromJson(
  Object? j,
) {
  final json = j as Map<String, Object?>;
  return SearchModelDeploymentMonitoringStatsAnomaliesRequest(
    modelDeploymentMonitoringJob:
        switch (json['modelDeploymentMonitoringJob']) {
          null => '',
          Object $1 => decodeString($1),
        },
    deployedModelId: switch (json['deployedModelId']) {
      null => '',
      Object $1 => decodeString($1),
    },
    featureDisplayName: switch (json['featureDisplayName']) {
      null => '',
      Object $1 => decodeString($1),
    },
    objectives: switch (json['objectives']) {
      null => [],
      List<Object?> $1 => [
        for (final i in $1)
          SearchModelDeploymentMonitoringStatsAnomaliesRequest_StatsAnomaliesObjective.fromJson(
            i,
          ),
      ],
      _ => throw const FormatException('"objectives" is not a list'),
    },
    pageSize: switch (json['pageSize']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    pageToken: switch (json['pageToken']) {
      null => '',
      Object $1 => decodeString($1),
    },
    startTime: switch (json['startTime']) {
      null => null,
      Object $1 => protobuf.Timestamp.fromJson($1),
    },
    endTime: switch (json['endTime']) {
      null => null,
      Object $1 => protobuf.Timestamp.fromJson($1),
    },
  );
}