NotebookRuntime.fromJson constructor

NotebookRuntime.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory NotebookRuntime.fromJson(Map<String, dynamic> json) {
  return NotebookRuntime(
    name: json['name'] ?? '',
    runtimeUser: json['runtimeUser'] ?? '',
    notebookRuntimeTemplateRef: decode(
      json['notebookRuntimeTemplateRef'],
      NotebookRuntimeTemplateRef.fromJson,
    ),
    proxyUri: json['proxyUri'] ?? '',
    createTime: decodeCustom(json['createTime'], protobuf.Timestamp.fromJson),
    updateTime: decodeCustom(json['updateTime'], protobuf.Timestamp.fromJson),
    healthState:
        decodeEnum(
          json['healthState'],
          NotebookRuntime_HealthState.fromJson,
        ) ??
        NotebookRuntime_HealthState.$default,
    displayName: json['displayName'] ?? '',
    description: json['description'] ?? '',
    serviceAccount: json['serviceAccount'] ?? '',
    runtimeState:
        decodeEnum(
          json['runtimeState'],
          NotebookRuntime_RuntimeState.fromJson,
        ) ??
        NotebookRuntime_RuntimeState.$default,
    isUpgradable: json['isUpgradable'] ?? false,
    labels: decodeMap(json['labels']) ?? {},
    expirationTime: decodeCustom(
      json['expirationTime'],
      protobuf.Timestamp.fromJson,
    ),
    version: json['version'] ?? '',
    notebookRuntimeType:
        decodeEnum(
          json['notebookRuntimeType'],
          NotebookRuntimeType.fromJson,
        ) ??
        NotebookRuntimeType.$default,
    machineSpec: decode(json['machineSpec'], MachineSpec.fromJson),
    dataPersistentDiskSpec: decode(
      json['dataPersistentDiskSpec'],
      PersistentDiskSpec.fromJson,
    ),
    networkSpec: decode(json['networkSpec'], NetworkSpec.fromJson),
    idleShutdownConfig: decode(
      json['idleShutdownConfig'],
      NotebookIdleShutdownConfig.fromJson,
    ),
    eucConfig: decode(json['eucConfig'], NotebookEucConfig.fromJson),
    shieldedVmConfig: decode(
      json['shieldedVmConfig'],
      ShieldedVmConfig.fromJson,
    ),
    networkTags: decodeList(json['networkTags']) ?? [],
    softwareConfig: decode(
      json['softwareConfig'],
      NotebookSoftwareConfig.fromJson,
    ),
    encryptionSpec: decode(json['encryptionSpec'], EncryptionSpec.fromJson),
    satisfiesPzs: json['satisfiesPzs'] ?? false,
    satisfiesPzi: json['satisfiesPzi'] ?? false,
  );
}