DeployedModel.fromJson constructor
DeployedModel.fromJson(
- Object? j
Implementation
factory DeployedModel.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return DeployedModel(
dedicatedResources: switch (json['dedicatedResources']) {
null => null,
Object $1 => DedicatedResources.fromJson($1),
},
automaticResources: switch (json['automaticResources']) {
null => null,
Object $1 => AutomaticResources.fromJson($1),
},
sharedResources: switch (json['sharedResources']) {
null => null,
Object $1 => decodeString($1),
},
id: switch (json['id']) {
null => '',
Object $1 => decodeString($1),
},
model: switch (json['model']) {
null => '',
Object $1 => decodeString($1),
},
modelVersionId: switch (json['modelVersionId']) {
null => '',
Object $1 => decodeString($1),
},
displayName: switch (json['displayName']) {
null => '',
Object $1 => decodeString($1),
},
createTime: switch (json['createTime']) {
null => null,
Object $1 => protobuf.Timestamp.fromJson($1),
},
explanationSpec: switch (json['explanationSpec']) {
null => null,
Object $1 => ExplanationSpec.fromJson($1),
},
disableExplanations: switch (json['disableExplanations']) {
null => false,
Object $1 => decodeBool($1),
},
serviceAccount: switch (json['serviceAccount']) {
null => '',
Object $1 => decodeString($1),
},
enableContainerLogging: switch (json['enableContainerLogging']) {
null => false,
Object $1 => decodeBool($1),
},
disableContainerLogging: switch (json['disableContainerLogging']) {
null => false,
Object $1 => decodeBool($1),
},
enableAccessLogging: switch (json['enableAccessLogging']) {
null => false,
Object $1 => decodeBool($1),
},
privateEndpoints: switch (json['privateEndpoints']) {
null => null,
Object $1 => PrivateEndpoints.fromJson($1),
},
fasterDeploymentConfig: switch (json['fasterDeploymentConfig']) {
null => null,
Object $1 => FasterDeploymentConfig.fromJson($1),
},
rolloutOptions: switch (json['rolloutOptions']) {
null => null,
Object $1 => RolloutOptions.fromJson($1),
},
status: switch (json['status']) {
null => null,
Object $1 => DeployedModel_Status.fromJson($1),
},
systemLabels: switch (json['systemLabels']) {
null => {},
Map<String, Object?> $1 => {
for (final e in $1.entries)
decodeString(e.key): decodeString(e.value),
},
_ => throw const FormatException('"systemLabels" is not an object'),
},
checkpointId: switch (json['checkpointId']) {
null => '',
Object $1 => decodeString($1),
},
speculativeDecodingSpec: switch (json['speculativeDecodingSpec']) {
null => null,
Object $1 => SpeculativeDecodingSpec.fromJson($1),
},
);
}