ModelEvent constructor

ModelEvent({
  1. ModelEventKind? kind,
  2. String? modelId,
  3. String? taskId,
  4. double? progress,
  5. Int64? bytesDownloaded,
  6. Int64? totalBytes,
  7. String? downloadState,
  8. String? localPath,
  9. String? error,
  10. int? modelCount,
  11. String? customModelName,
  12. String? customModelUrl,
  13. String? modelName,
  14. Int64? modelSizeBytes,
  15. Int64? durationMs,
  16. InferenceFramework? framework,
  17. String? assignmentId,
  18. SDKComponent? assignedComponent,
  19. String? sourcePath,
  20. ModelRegistryRefreshResult? refreshResult,
  21. ModelListResult? listResult,
  22. ModelGetResult? getResult,
  23. ModelImportResult? importResult,
  24. ModelDiscoveryResult? discoveryResult,
  25. ModelCompatibilityResult? compatibilityResult,
  26. CurrentModelResult? currentModelResult,
  27. DownloadPlanResult? planResult,
  28. DownloadStartResult? startResult,
  29. DownloadProgress? downloadProgress,
  30. DownloadCancelResult? cancelResult,
})

Implementation

factory ModelEvent({
  ModelEventKind? kind,
  $core.String? modelId,
  $core.String? taskId,
  $core.double? progress,
  $fixnum.Int64? bytesDownloaded,
  $fixnum.Int64? totalBytes,
  $core.String? downloadState,
  $core.String? localPath,
  $core.String? error,
  $core.int? modelCount,
  $core.String? customModelName,
  $core.String? customModelUrl,
  $core.String? modelName,
  $fixnum.Int64? modelSizeBytes,
  $fixnum.Int64? durationMs,
  $0.InferenceFramework? framework,
  $core.String? assignmentId,
  SDKComponent? assignedComponent,
  $core.String? sourcePath,
  $0.ModelRegistryRefreshResult? refreshResult,
  $0.ModelListResult? listResult,
  $0.ModelGetResult? getResult,
  $0.ModelImportResult? importResult,
  $0.ModelDiscoveryResult? discoveryResult,
  $0.ModelCompatibilityResult? compatibilityResult,
  $0.CurrentModelResult? currentModelResult,
  $2.DownloadPlanResult? planResult,
  $2.DownloadStartResult? startResult,
  $2.DownloadProgress? downloadProgress,
  $2.DownloadCancelResult? cancelResult,
}) {
  final result = create();
  if (kind != null) result.kind = kind;
  if (modelId != null) result.modelId = modelId;
  if (taskId != null) result.taskId = taskId;
  if (progress != null) result.progress = progress;
  if (bytesDownloaded != null) result.bytesDownloaded = bytesDownloaded;
  if (totalBytes != null) result.totalBytes = totalBytes;
  if (downloadState != null) result.downloadState = downloadState;
  if (localPath != null) result.localPath = localPath;
  if (error != null) result.error = error;
  if (modelCount != null) result.modelCount = modelCount;
  if (customModelName != null) result.customModelName = customModelName;
  if (customModelUrl != null) result.customModelUrl = customModelUrl;
  if (modelName != null) result.modelName = modelName;
  if (modelSizeBytes != null) result.modelSizeBytes = modelSizeBytes;
  if (durationMs != null) result.durationMs = durationMs;
  if (framework != null) result.framework = framework;
  if (assignmentId != null) result.assignmentId = assignmentId;
  if (assignedComponent != null) result.assignedComponent = assignedComponent;
  if (sourcePath != null) result.sourcePath = sourcePath;
  if (refreshResult != null) result.refreshResult = refreshResult;
  if (listResult != null) result.listResult = listResult;
  if (getResult != null) result.getResult = getResult;
  if (importResult != null) result.importResult = importResult;
  if (discoveryResult != null) result.discoveryResult = discoveryResult;
  if (compatibilityResult != null)
    result.compatibilityResult = compatibilityResult;
  if (currentModelResult != null)
    result.currentModelResult = currentModelResult;
  if (planResult != null) result.planResult = planResult;
  if (startResult != null) result.startResult = startResult;
  if (downloadProgress != null) result.downloadProgress = downloadProgress;
  if (cancelResult != null) result.cancelResult = cancelResult;
  return result;
}