UndeployModelRequest.fromJson constructor
UndeployModelRequest.fromJson(
- Object? j
Implementation
factory UndeployModelRequest.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return UndeployModelRequest(
endpoint: switch (json['endpoint']) {
null => '',
Object $1 => decodeString($1),
},
deployedModelId: switch (json['deployedModelId']) {
null => '',
Object $1 => decodeString($1),
},
trafficSplit: switch (json['trafficSplit']) {
null => {},
Map<String, Object?> $1 => {
for (final e in $1.entries) decodeString(e.key): decodeInt(e.value),
},
_ => throw const FormatException('"trafficSplit" is not an object'),
},
);
}