Nextcloud PHP API (master)

Task
in package
implements JsonSerializable

FinalYes

This is a text processing task

Tags
since
27.1.0
psalm-template-covariant

T of ITaskType

Table of Contents

Interfaces

JsonSerializable

Constants

STATUS_FAILED  = 4
STATUS_RUNNING  = 2
STATUS_SCHEDULED  = 1
STATUS_SUCCESSFUL  = 3
STATUS_UNKNOWN  = 0
TYPES  = [\OCP\TextProcessing\FreePromptTaskType::class, \OCP\TextProcessing\SummaryTaskType::class, \OCP\TextProcessing\HeadlineTaskType::class, \OCP\TextProcessing\TopicsTaskType::class]

Properties

$appId  : string
$id  : int|null
$identifier  : string
$input  : string
$output  : string|null
$status  : int
$type  : string
$userId  : string|null
$completionExpectedAt  : DateTime|null

Methods

__construct()  : mixed
canUseProvider()  : bool
getAppId()  : string
getCompletionExpectedAt()  : DateTime|null
getId()  : int|null
getIdentifier()  : string
getInput()  : string
getOutput()  : string|null
getStatus()  : int
getType()  : string
getUserId()  : string|null
jsonSerialize()  : array<string|int, mixed>
setCompletionExpectedAt()  : void
setId()  : void
setOutput()  : void
setStatus()  : void
visitProvider()  : string

Constants

STATUS_FAILED

public mixed STATUS_FAILED = 4
Tags
since
27.1.0

STATUS_RUNNING

public mixed STATUS_RUNNING = 2
Tags
since
27.1.0

STATUS_SCHEDULED

public mixed STATUS_SCHEDULED = 1
Tags
since
27.1.0

STATUS_SUCCESSFUL

public mixed STATUS_SUCCESSFUL = 3
Tags
since
27.1.0

STATUS_UNKNOWN

public mixed STATUS_UNKNOWN = 0
Tags
since
27.1.0

TYPES

public mixed TYPES = [\OCP\TextProcessing\FreePromptTaskType::class, \OCP\TextProcessing\SummaryTaskType::class, \OCP\TextProcessing\HeadlineTaskType::class, \OCP\TextProcessing\TopicsTaskType::class]
Tags
since
27.1.0

Properties

$appId

protected string $appId

$id

protected int|null $id = null

$identifier

protected string $identifier = ''

$input

protected string $input

$output

protected string|null $output = null

$status

protected int $status = self::STATUS_UNKNOWN
Tags
psalm-var

self::STATUS_*

$type

protected string $type

$userId

protected string|null $userId

$completionExpectedAt

private DateTime|null $completionExpectedAt = null

Methods

__construct()

public final __construct(string $type, string $input, string $appId, string|null $userId[, string $identifier = '' ]) : mixed
Parameters
$type : string
$input : string
$appId : string
$userId : string|null
$identifier : string = ''

An arbitrary identifier for this task. max length: 255 chars

Tags
psalm-param

class-string<T> $type

since
27.1.0

canUseProvider()

public canUseProvider(IProvider $provider) : bool
Parameters
$provider : IProvider
Tags
psalm-param

IProvider<T> $provider

since
27.1.0
Return values
bool

getAppId()

public final getAppId() : string
Tags
since
27.1.0
Return values
string

getCompletionExpectedAt()

public final getCompletionExpectedAt() : DateTime|null
Tags
since
28.0.0
Return values
DateTime|null

getId()

public final getId() : int|null
Tags
since
27.1.0
Return values
int|null

getIdentifier()

public final getIdentifier() : string
Tags
since
27.1.0
Return values
string

getInput()

public final getInput() : string
Tags
since
27.1.0
Return values
string

getOutput()

public final getOutput() : string|null
Tags
since
27.1.0
Return values
string|null

getStatus()

public final getStatus() : int
Tags
psalm-return

self::STATUS_*

since
27.1.0
Return values
int

getType()

public final getType() : string
Tags
psalm-return

class-string<T>

since
27.1.0
Return values
string

getUserId()

public final getUserId() : string|null
Tags
since
27.1.0
Return values
string|null

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Tags
psalm-return

array{id: ?int, type: class-string<T>, status: 0|1|2|3|4, userId: ?string, appId: string, input: string, output: ?string, identifier: string, completionExpectedAt: ?int}

since
27.1.0
Return values
array<string|int, mixed>

setCompletionExpectedAt()

public final setCompletionExpectedAt(null|DateTime $completionExpectedAt) : void
Parameters
$completionExpectedAt : null|DateTime
Tags
since
28.0.0

setId()

public final setId(int|null $id) : void
Parameters
$id : int|null
Tags
since
27.1.0

setOutput()

public final setOutput(string|null $output) : void
Parameters
$output : string|null
Tags
since
27.1.0

setStatus()

public final setStatus(int $status) : void
Parameters
$status : int
Tags
psalm-param

self::STATUS_* $status

since
27.1.0

visitProvider()

public visitProvider(IProvider $provider) : string
Parameters
$provider : IProvider
Tags
psalm-param

IProvider<T> $provider

since
27.1.0
Return values
string

        
On this page

Search results