ModelDeploymentMonitoringJob.fromJson constructor
ModelDeploymentMonitoringJob.fromJson(
- Object? j
Implementation
factory ModelDeploymentMonitoringJob.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return ModelDeploymentMonitoringJob(
name: switch (json['name']) {
null => '',
Object $1 => decodeString($1),
},
displayName: switch (json['displayName']) {
null => '',
Object $1 => decodeString($1),
},
endpoint: switch (json['endpoint']) {
null => '',
Object $1 => decodeString($1),
},
state: switch (json['state']) {
null => JobState.$default,
Object $1 => JobState.fromJson($1),
},
scheduleState: switch (json['scheduleState']) {
null => ModelDeploymentMonitoringJob_MonitoringScheduleState.$default,
Object $1 =>
ModelDeploymentMonitoringJob_MonitoringScheduleState.fromJson($1),
},
latestMonitoringPipelineMetadata:
switch (json['latestMonitoringPipelineMetadata']) {
null => null,
Object $1 =>
ModelDeploymentMonitoringJob_LatestMonitoringPipelineMetadata.fromJson(
$1,
),
},
modelDeploymentMonitoringObjectiveConfigs:
switch (json['modelDeploymentMonitoringObjectiveConfigs']) {
null => [],
List<Object?> $1 => [
for (final i in $1)
ModelDeploymentMonitoringObjectiveConfig.fromJson(i),
],
_ => throw const FormatException(
'"modelDeploymentMonitoringObjectiveConfigs" is not a list',
),
},
modelDeploymentMonitoringScheduleConfig:
switch (json['modelDeploymentMonitoringScheduleConfig']) {
null => null,
Object $1 => ModelDeploymentMonitoringScheduleConfig.fromJson($1),
},
loggingSamplingStrategy: switch (json['loggingSamplingStrategy']) {
null => null,
Object $1 => SamplingStrategy.fromJson($1),
},
modelMonitoringAlertConfig: switch (json['modelMonitoringAlertConfig']) {
null => null,
Object $1 => ModelMonitoringAlertConfig.fromJson($1),
},
predictInstanceSchemaUri: switch (json['predictInstanceSchemaUri']) {
null => '',
Object $1 => decodeString($1),
},
samplePredictInstance: switch (json['samplePredictInstance']) {
null => null,
Object $1 => protobuf.Value.fromJson($1),
},
analysisInstanceSchemaUri: switch (json['analysisInstanceSchemaUri']) {
null => '',
Object $1 => decodeString($1),
},
bigqueryTables: switch (json['bigqueryTables']) {
null => [],
List<Object?> $1 => [
for (final i in $1)
ModelDeploymentMonitoringBigQueryTable.fromJson(i),
],
_ => throw const FormatException('"bigqueryTables" is not a list'),
},
logTtl: switch (json['logTtl']) {
null => null,
Object $1 => protobuf.Duration.fromJson($1),
},
labels: switch (json['labels']) {
null => {},
Map<String, Object?> $1 => {
for (final e in $1.entries)
decodeString(e.key): decodeString(e.value),
},
_ => throw const FormatException('"labels" is not an object'),
},
createTime: switch (json['createTime']) {
null => null,
Object $1 => protobuf.Timestamp.fromJson($1),
},
updateTime: switch (json['updateTime']) {
null => null,
Object $1 => protobuf.Timestamp.fromJson($1),
},
nextScheduleTime: switch (json['nextScheduleTime']) {
null => null,
Object $1 => protobuf.Timestamp.fromJson($1),
},
statsAnomaliesBaseDirectory:
switch (json['statsAnomaliesBaseDirectory']) {
null => null,
Object $1 => GcsDestination.fromJson($1),
},
encryptionSpec: switch (json['encryptionSpec']) {
null => null,
Object $1 => EncryptionSpec.fromJson($1),
},
enableMonitoringPipelineLogs:
switch (json['enableMonitoringPipelineLogs']) {
null => false,
Object $1 => decodeBool($1),
},
error: switch (json['error']) {
null => null,
Object $1 => Status.fromJson($1),
},
satisfiesPzs: switch (json['satisfiesPzs']) {
null => false,
Object $1 => decodeBool($1),
},
satisfiesPzi: switch (json['satisfiesPzi']) {
null => false,
Object $1 => decodeBool($1),
},
);
}