Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
648 changes: 647 additions & 1 deletion src/CrowdinApiClient/Api/AiApi.php

Large diffs are not rendered by default.

588 changes: 587 additions & 1 deletion src/CrowdinApiClient/Api/Enterprise/AiApi.php

Large diffs are not rendered by default.

86 changes: 86 additions & 0 deletions src/CrowdinApiClient/Model/AiCustomPlaceholder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?php

declare(strict_types=1);

namespace CrowdinApiClient\Model;

/**
* @deprecated Use AiSnippet instead
*/
class AiCustomPlaceholder extends BaseModel
{
/** @var int */
protected $id;

/** @var string */
protected $description;

/** @var string */
protected $placeholder;

/** @var string */
protected $value;

/** @var string */
protected $createdAt;

/** @var string */
protected $updatedAt;

public function __construct(array $data = [])
{
parent::__construct($data);

$this->id = (int)$this->getDataProperty('id');
$this->description = (string)$this->getDataProperty('description');
$this->placeholder = (string)$this->getDataProperty('placeholder');
$this->value = (string)$this->getDataProperty('value');
$this->createdAt = (string)$this->getDataProperty('createdAt');
$this->updatedAt = (string)$this->getDataProperty('updatedAt');
}

public function getId(): int
{
return $this->id;
}

public function getDescription(): string
{
return $this->description;
}

public function getPlaceholder(): string
{
return $this->placeholder;
}

public function getValue(): string
{
return $this->value;
}

public function getCreatedAt(): string
{
return $this->createdAt;
}

public function getUpdatedAt(): string
{
return $this->updatedAt;
}

public function setDescription(string $description): void
{
$this->description = $description;
}

public function setPlaceholder(string $placeholder): void
{
$this->placeholder = $placeholder;
}

public function setValue(string $value): void
{
$this->value = $value;
}
}
86 changes: 86 additions & 0 deletions src/CrowdinApiClient/Model/AiFineTuningDataset.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?php

declare(strict_types=1);

namespace CrowdinApiClient\Model;

class AiFineTuningDataset extends BaseModel
{
/** @var string */
protected $identifier;

/** @var string */
protected $status;

/** @var int */
protected $progress;

/** @var array */
protected $attributes;

/** @var string */
protected $createdAt;

/** @var string|null */
protected $updatedAt;

/** @var string|null */
protected $startedAt;

/** @var string|null */
protected $finishedAt;

public function __construct(array $data = [])
{
parent::__construct($data);

$this->identifier = (string)$this->getDataProperty('identifier');
$this->status = (string)$this->getDataProperty('status');
$this->progress = (int)$this->getDataProperty('progress');
$this->attributes = (array)$this->getDataProperty('attributes');
$this->createdAt = (string)$this->getDataProperty('createdAt');
$this->updatedAt = $this->getDataProperty('updatedAt');
$this->startedAt = $this->getDataProperty('startedAt');
$this->finishedAt = $this->getDataProperty('finishedAt');
}

public function getIdentifier(): string
{
return $this->identifier;
}

public function getStatus(): string
{
return $this->status;
}

public function getProgress(): int
{
return $this->progress;
}

public function getAttributes(): array
{
return $this->attributes;
}

public function getCreatedAt(): string
{
return $this->createdAt;
}

public function getUpdatedAt(): ?string
{
return $this->updatedAt;
}

public function getStartedAt(): ?string
{
return $this->startedAt;
}

public function getFinishedAt(): ?string
{
return $this->finishedAt;
}
}
59 changes: 59 additions & 0 deletions src/CrowdinApiClient/Model/AiFineTuningEvent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?php

declare(strict_types=1);

namespace CrowdinApiClient\Model;

class AiFineTuningEvent extends BaseModel
{
/** @var string */
protected $id;

/** @var string */
protected $type;

/** @var string */
protected $message;

/** @var array|null */
protected $metrics;

/** @var string */
protected $createdAt;

public function __construct(array $data = [])
{
parent::__construct($data);

$this->id = (string)$this->getDataProperty('id');
$this->type = (string)$this->getDataProperty('type');
$this->message = (string)$this->getDataProperty('message');
$this->metrics = $this->getDataProperty('data');
$this->createdAt = (string)$this->getDataProperty('createdAt');
}
Comment on lines +15 to +33

public function getId(): string
{
return $this->id;
}

public function getType(): string
{
return $this->type;
}

public function getMessage(): string
{
return $this->message;
}
Comment on lines +45 to +48

public function getMetrics(): ?array
{
return $this->metrics;
}

public function getCreatedAt(): string
{
return $this->createdAt;
}
}
86 changes: 86 additions & 0 deletions src/CrowdinApiClient/Model/AiFineTuningJob.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<?php

declare(strict_types=1);

namespace CrowdinApiClient\Model;

class AiFineTuningJob extends BaseModel
{
/** @var string */
protected $identifier;

/** @var string */
protected $status;

/** @var int */
protected $progress;

/** @var array */
protected $attributes;

/** @var string */
protected $createdAt;

/** @var string|null */
protected $updatedAt;

/** @var string|null */
protected $startedAt;

/** @var string|null */
protected $finishedAt;

public function __construct(array $data = [])
{
parent::__construct($data);

$this->identifier = (string)$this->getDataProperty('identifier');
$this->status = (string)$this->getDataProperty('status');
$this->progress = (int)$this->getDataProperty('progress');
$this->attributes = (array)$this->getDataProperty('attributes');
$this->createdAt = (string)$this->getDataProperty('createdAt');
$this->updatedAt = $this->getDataProperty('updatedAt');
$this->startedAt = $this->getDataProperty('startedAt');
$this->finishedAt = $this->getDataProperty('finishedAt');
}

public function getIdentifier(): string
{
return $this->identifier;
}

public function getStatus(): string
{
return $this->status;
}

public function getProgress(): int
{
return $this->progress;
}

public function getAttributes(): array
{
return $this->attributes;
}

public function getCreatedAt(): string
{
return $this->createdAt;
}

public function getUpdatedAt(): ?string
{
return $this->updatedAt;
}

public function getStartedAt(): ?string
{
return $this->startedAt;
}

public function getFinishedAt(): ?string
{
return $this->finishedAt;
}
}
Loading
Loading