|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +namespace Brightcove\Item\InPageExperience; |
| 6 | + |
| 7 | +use Brightcove\Item\ObjectBase; |
| 8 | + |
| 9 | +/** |
| 10 | + * In-Page Experience entity. |
| 11 | + */ |
| 12 | +final class InPageExperience extends ObjectBase implements InPageExperienceInterface |
| 13 | +{ |
| 14 | + /** |
| 15 | + * Video Cloud Account ID. |
| 16 | + * |
| 17 | + * @var int |
| 18 | + */ |
| 19 | + protected $accountId; |
| 20 | + |
| 21 | + /** |
| 22 | + * Create date in ISO-8601 format. |
| 23 | + * |
| 24 | + * @var string |
| 25 | + */ |
| 26 | + protected $createdAt; |
| 27 | + |
| 28 | + /** |
| 29 | + * Description |
| 30 | + * |
| 31 | + * @var string |
| 32 | + */ |
| 33 | + protected $description; |
| 34 | + |
| 35 | + /** |
| 36 | + * Entity ID. |
| 37 | + * |
| 38 | + * @var string |
| 39 | + */ |
| 40 | + protected $id; |
| 41 | + |
| 42 | + /** |
| 43 | + * Name of the entity. |
| 44 | + * |
| 45 | + * @var string |
| 46 | + */ |
| 47 | + protected $name; |
| 48 | + |
| 49 | + /** |
| 50 | + * The current published status. |
| 51 | + * |
| 52 | + * Enum: |
| 53 | + * - unpublished |
| 54 | + * - success |
| 55 | + * - publishing |
| 56 | + * - unpublishing |
| 57 | + * - inactive |
| 58 | + * - failed |
| 59 | + * |
| 60 | + * @var string |
| 61 | + */ |
| 62 | + protected $publishedStatus; |
| 63 | + |
| 64 | + /** |
| 65 | + * Update date in ISO-8601 format. |
| 66 | + * |
| 67 | + * @var string |
| 68 | + */ |
| 69 | + protected $updatedAt; |
| 70 | + |
| 71 | + /** |
| 72 | + * {@inheritdoc} |
| 73 | + */ |
| 74 | + public function applyJSON(array $json): void |
| 75 | + { |
| 76 | + parent::applyJSON($json); |
| 77 | + |
| 78 | + $this->applyProperty($json, 'accountId'); |
| 79 | + $this->applyProperty($json, 'createdAt'); |
| 80 | + $this->applyProperty($json, 'description'); |
| 81 | + $this->applyProperty($json, 'id'); |
| 82 | + $this->applyProperty($json, 'name'); |
| 83 | + $this->applyProperty($json, 'publishedStatus'); |
| 84 | + $this->applyProperty($json, 'updatedAt'); |
| 85 | + } |
| 86 | + |
| 87 | + /** |
| 88 | + * {@inheritdoc} |
| 89 | + */ |
| 90 | + public function getAccountId(): int |
| 91 | + { |
| 92 | + return $this->accountId; |
| 93 | + } |
| 94 | + |
| 95 | + /** |
| 96 | + * {@inheritdoc} |
| 97 | + */ |
| 98 | + public function getCreatedAt(): string |
| 99 | + { |
| 100 | + return $this->createdAt; |
| 101 | + } |
| 102 | + |
| 103 | + /** |
| 104 | + * {@inheritdoc} |
| 105 | + */ |
| 106 | + public function getDescription(): string |
| 107 | + { |
| 108 | + return $this->description; |
| 109 | + } |
| 110 | + |
| 111 | + /** |
| 112 | + * {@inheritdoc} |
| 113 | + */ |
| 114 | + public function getId(): string |
| 115 | + { |
| 116 | + return $this->id; |
| 117 | + } |
| 118 | + |
| 119 | + /** |
| 120 | + * {@inheritdoc} |
| 121 | + */ |
| 122 | + public function getName(): string |
| 123 | + { |
| 124 | + return $this->name; |
| 125 | + } |
| 126 | + |
| 127 | + /** |
| 128 | + * {@inheritdoc} |
| 129 | + */ |
| 130 | + public function getPublishedStatus(): string |
| 131 | + { |
| 132 | + return $this->publishedStatus; |
| 133 | + } |
| 134 | + |
| 135 | + /** |
| 136 | + * {@inheritdoc} |
| 137 | + */ |
| 138 | + public function getUpdatedAt(): string |
| 139 | + { |
| 140 | + return $this->updatedAt; |
| 141 | + } |
| 142 | + |
| 143 | + /** |
| 144 | + * {@inheritdoc} |
| 145 | + */ |
| 146 | + public function setAccountId(int $account_id): void |
| 147 | + { |
| 148 | + $this->accountId = $account_id; |
| 149 | + $this->fieldChanged('accountId'); |
| 150 | + } |
| 151 | + |
| 152 | + /** |
| 153 | + * {@inheritdoc} |
| 154 | + */ |
| 155 | + public function setCreatedAt(string $createdAt): void |
| 156 | + { |
| 157 | + $this->createdAt = $createdAt; |
| 158 | + $this->fieldChanged('createdAt'); |
| 159 | + } |
| 160 | + |
| 161 | + /** |
| 162 | + * {@inheritdoc} |
| 163 | + */ |
| 164 | + public function setDescription(string $description): void |
| 165 | + { |
| 166 | + $this->description = $description; |
| 167 | + $this->fieldChanged('description'); |
| 168 | + } |
| 169 | + |
| 170 | + /** |
| 171 | + * {@inheritdoc} |
| 172 | + */ |
| 173 | + public function setId(string $id): void |
| 174 | + { |
| 175 | + $this->id = $id; |
| 176 | + $this->fieldChanged('id'); |
| 177 | + } |
| 178 | + |
| 179 | + /** |
| 180 | + * {@inheritdoc} |
| 181 | + */ |
| 182 | + public function setName(string $name): void |
| 183 | + { |
| 184 | + $this->name = $name; |
| 185 | + $this->fieldChanged('name'); |
| 186 | + } |
| 187 | + |
| 188 | + /** |
| 189 | + * {@inheritdoc} |
| 190 | + */ |
| 191 | + public function setPublishedStatus(string $publishedStatus): void |
| 192 | + { |
| 193 | + $this->publishedStatus = $publishedStatus; |
| 194 | + $this->fieldChanged('publishedStatus'); |
| 195 | + } |
| 196 | + |
| 197 | + /** |
| 198 | + * {@inheritdoc} |
| 199 | + */ |
| 200 | + public function setUpdatedAt(string $updatedAt): void |
| 201 | + { |
| 202 | + $this->updatedAt = $updatedAt; |
| 203 | + $this->fieldChanged('updatedAt'); |
| 204 | + } |
| 205 | +} |
0 commit comments