Execution.fromJson constructor
Execution.fromJson(
- Object? j
Implementation
factory Execution.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return Execution(
name: switch (json['name']) {
null => '',
Object $1 => decodeString($1),
},
displayName: switch (json['displayName']) {
null => '',
Object $1 => decodeString($1),
},
state: switch (json['state']) {
null => Execution_State.$default,
Object $1 => Execution_State.fromJson($1),
},
etag: switch (json['etag']) {
null => '',
Object $1 => decodeString($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),
},
schemaTitle: switch (json['schemaTitle']) {
null => '',
Object $1 => decodeString($1),
},
schemaVersion: switch (json['schemaVersion']) {
null => '',
Object $1 => decodeString($1),
},
metadata: switch (json['metadata']) {
null => null,
Object $1 => protobuf.Struct.fromJson($1),
},
description: switch (json['description']) {
null => '',
Object $1 => decodeString($1),
},
);
}