AbstractTranscriptionEvent.php 898 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCP\SpeechToText\Events;
  8. use OCP\EventDispatcher\Event;
  9. use OCP\Files\File;
  10. /**
  11. * @since 27.0.0
  12. */
  13. abstract class AbstractTranscriptionEvent extends Event {
  14. /**
  15. * @since 27.0.0
  16. */
  17. public function __construct(
  18. private int $fileIdId,
  19. private ?File $file,
  20. private ?string $userId,
  21. private string $appId,
  22. ) {
  23. parent::__construct();
  24. }
  25. /**
  26. * @since 27.0.0
  27. */
  28. public function getFileId(): int {
  29. return $this->fileIdId;
  30. }
  31. /**
  32. * @since 27.0.0
  33. */
  34. public function getFile(): ?File {
  35. return $this->file;
  36. }
  37. /**
  38. * @since 27.0.0
  39. */
  40. public function getUserId(): ?string {
  41. return $this->userId;
  42. }
  43. /**
  44. * @since 27.0.0
  45. */
  46. public function getAppId(): string {
  47. return $this->appId;
  48. }
  49. }