1 | <?php |
||
22 | class InitialAccessTokenCreatedEvent extends Event |
||
23 | { |
||
24 | /** |
||
25 | * @var InitialAccessTokenId |
||
26 | */ |
||
27 | private $initialAccessTokenId; |
||
28 | |||
29 | /** |
||
30 | * @var \DateTimeImmutable|null |
||
31 | */ |
||
32 | private $expiresAt; |
||
33 | |||
34 | /** |
||
35 | * @var UserAccountId |
||
36 | */ |
||
37 | private $userAccountId; |
||
38 | |||
39 | /** |
||
40 | * InitialAccessTokenCreatedEvent constructor. |
||
41 | * |
||
42 | * @param InitialAccessTokenId $initialAccessTokenId |
||
43 | * @param UserAccountId $userAccountId |
||
44 | * @param null|\DateTimeImmutable $expiresAt |
||
45 | */ |
||
46 | protected function __construct(InitialAccessTokenId $initialAccessTokenId, UserAccountId $userAccountId, ? \DateTimeImmutable $expiresAt) |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public static function getSchema(): string |
||
60 | |||
61 | /** |
||
62 | * @param InitialAccessTokenId $initialAccessTokenId |
||
63 | * @param UserAccountId $userAccountId |
||
64 | * @param null|\DateTimeImmutable $expiresAt |
||
65 | * |
||
66 | * @return InitialAccessTokenCreatedEvent |
||
67 | */ |
||
68 | public static function create(InitialAccessTokenId $initialAccessTokenId, UserAccountId $userAccountId, ? \DateTimeImmutable $expiresAt): self |
||
72 | |||
73 | /** |
||
74 | * @return InitialAccessTokenId |
||
75 | */ |
||
76 | public function getInitialAccessTokenId(): InitialAccessTokenId |
||
80 | |||
81 | /** |
||
82 | * @return UserAccountId |
||
83 | */ |
||
84 | public function getUserAccountId(): UserAccountId |
||
88 | |||
89 | /** |
||
90 | * @return \DateTimeImmutable|null |
||
91 | */ |
||
92 | public function getExpiresAt(): ?\DateTimeImmutable |
||
96 | |||
97 | /** |
||
98 | * {@inheritdoc} |
||
99 | */ |
||
100 | public function getDomainId(): Id |
||
104 | |||
105 | /** |
||
106 | * {@inheritdoc} |
||
107 | */ |
||
108 | public function getPayload() |
||
115 | |||
116 | /** |
||
117 | * {@inheritdoc} |
||
118 | */ |
||
119 | public static function createFromJson(\stdClass $json): DomainObject |
||
131 | } |
||
132 |