2023-04-11 08:59:57 -04:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2023-04-11 08:59:57 -04:00
|
|
|
*/
|
|
|
|
|
namespace OCP\SpeechToText\Events;
|
|
|
|
|
|
|
|
|
|
use OCP\EventDispatcher\Event;
|
2023-04-17 08:45:18 -04:00
|
|
|
use OCP\Files\File;
|
2023-04-11 08:59:57 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 27.0.0
|
2024-07-26 05:20:46 -04:00
|
|
|
* @deprecated 30.0.0
|
2023-04-11 08:59:57 -04:00
|
|
|
*/
|
2023-04-13 06:12:07 -04:00
|
|
|
abstract class AbstractTranscriptionEvent extends Event {
|
2023-04-11 08:59:57 -04:00
|
|
|
/**
|
|
|
|
|
* @since 27.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(
|
2023-04-17 08:45:18 -04:00
|
|
|
private int $fileIdId,
|
|
|
|
|
private ?File $file,
|
2023-04-19 06:39:39 -04:00
|
|
|
private ?string $userId,
|
2023-04-19 06:35:13 -04:00
|
|
|
private string $appId,
|
2023-04-11 08:59:57 -04:00
|
|
|
) {
|
|
|
|
|
parent::__construct();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 27.0.0
|
|
|
|
|
*/
|
2023-04-13 06:12:07 -04:00
|
|
|
public function getFileId(): int {
|
|
|
|
|
return $this->fileIdId;
|
2023-04-11 08:59:57 -04:00
|
|
|
}
|
2023-04-17 08:45:18 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 27.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function getFile(): ?File {
|
|
|
|
|
return $this->file;
|
|
|
|
|
}
|
2023-04-19 06:35:13 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 27.0.0
|
|
|
|
|
*/
|
2023-04-19 06:39:39 -04:00
|
|
|
public function getUserId(): ?string {
|
2023-04-19 06:35:13 -04:00
|
|
|
return $this->userId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @since 27.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function getAppId(): string {
|
|
|
|
|
return $this->appId;
|
|
|
|
|
}
|
2023-04-11 08:59:57 -04:00
|
|
|
}
|