ReasoningEngineSpec.fromJson constructor
ReasoningEngineSpec.fromJson(
- Object? j
Implementation
factory ReasoningEngineSpec.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return ReasoningEngineSpec(
sourceCodeSpec: switch (json['sourceCodeSpec']) {
null => null,
Object $1 => ReasoningEngineSpec_SourceCodeSpec.fromJson($1),
},
serviceAccount: switch (json['serviceAccount']) {
null => null,
Object $1 => decodeString($1),
},
packageSpec: switch (json['packageSpec']) {
null => null,
Object $1 => ReasoningEngineSpec_PackageSpec.fromJson($1),
},
deploymentSpec: switch (json['deploymentSpec']) {
null => null,
Object $1 => ReasoningEngineSpec_DeploymentSpec.fromJson($1),
},
classMethods: switch (json['classMethods']) {
null => [],
List<Object?> $1 => [for (final i in $1) protobuf.Struct.fromJson(i)],
_ => throw const FormatException('"classMethods" is not a list'),
},
agentFramework: switch (json['agentFramework']) {
null => '',
Object $1 => decodeString($1),
},
);
}