PatchbayKeepAwakeRequestWire.fromJson constructor

PatchbayKeepAwakeRequestWire.fromJson(
  1. Map<String, Object?> json, {
  2. String path = r'$',
})

Decodes a strict JSON object at path.

Implementation

factory PatchbayKeepAwakeRequestWire.fromJson(
  Map<String, Object?> json, {
  String path = r'$',
}) {
  _wireKeys(json, const <String>{'enabled', 'leaseMs'}, path);
  return PatchbayKeepAwakeRequestWire(
    enabled: _wireBool(json['enabled'], '$path.enabled'),
    leaseMs: json['leaseMs'] == null
        ? null
        : _wireInt(json['leaseMs'], '$path.leaseMs'),
  );
}