QueryDeployedModelsResponse.fromJson constructor
QueryDeployedModelsResponse.fromJson(
- Object? j
Implementation
factory QueryDeployedModelsResponse.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return QueryDeployedModelsResponse(
deployedModels: switch (json['deployedModels']) {
null => [],
List<Object?> $1 => [for (final i in $1) DeployedModel.fromJson(i)],
_ => throw const FormatException('"deployedModels" is not a list'),
},
nextPageToken: switch (json['nextPageToken']) {
null => '',
Object $1 => decodeString($1),
},
deployedModelRefs: switch (json['deployedModelRefs']) {
null => [],
List<Object?> $1 => [for (final i in $1) DeployedModelRef.fromJson(i)],
_ => throw const FormatException('"deployedModelRefs" is not a list'),
},
totalDeployedModelCount: switch (json['totalDeployedModelCount']) {
null => 0,
Object $1 => decodeInt($1),
},
totalEndpointCount: switch (json['totalEndpointCount']) {
null => 0,
Object $1 => decodeInt($1),
},
);
}