-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathAddSavedAnimation.php
More file actions
49 lines (40 loc) · 1.26 KB
/
Copy pathAddSavedAnimation.php
File metadata and controls
49 lines (40 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/**
* This phpFile is auto-generated.
*/
declare(strict_types=1);
namespace AurimasNiekis\TdLibSchema;
/**
* Manually adds a new animation to the list of saved animations. The new animation is added to the beginning of the list. If the animation was already in the list, it is removed first. Only non-secret video animations with MIME type "video/mp4" can be added to the list.
*/
class AddSavedAnimation extends TdFunction
{
public const TYPE_NAME = 'addSavedAnimation';
/**
* The animation file to be added. Only animations known to the server (i.e. successfully sent via a message) can be added to the list.
*
* @var InputFile
*/
protected InputFile $animation;
public function __construct(InputFile $animation)
{
$this->animation = $animation;
}
public static function fromArray(array $array): AddSavedAnimation
{
return new static(
TdSchemaRegistry::fromArray($array['animation']),
);
}
public function typeSerialize(): array
{
return [
'@type' => static::TYPE_NAME,
'animation' => $this->animation->typeSerialize(),
];
}
public function getAnimation(): InputFile
{
return $this->animation;
}
}