1+ <?php
2+
3+ namespace Appwrite \Enums ;
4+
5+ use JsonSerializable ;
6+
7+ class AttributeStatus implements JsonSerializable
8+ {
9+ private static AttributeStatus $ AVAILABLE ;
10+ private static AttributeStatus $ PROCESSING ;
11+ private static AttributeStatus $ DELETING ;
12+ private static AttributeStatus $ STUCK ;
13+ private static AttributeStatus $ FAILED ;
14+
15+ private string $ value ;
16+
17+ private function __construct (string $ value )
18+ {
19+ $ this ->value = $ value ;
20+ }
21+
22+ public function __toString (): string
23+ {
24+ return $ this ->value ;
25+ }
26+
27+ public function jsonSerialize (): string
28+ {
29+ return $ this ->value ;
30+ }
31+
32+ public static function AVAILABLE (): AttributeStatus
33+ {
34+ if (!isset (self ::$ AVAILABLE )) {
35+ self ::$ AVAILABLE = new AttributeStatus ('available ' );
36+ }
37+ return self ::$ AVAILABLE ;
38+ }
39+ public static function PROCESSING (): AttributeStatus
40+ {
41+ if (!isset (self ::$ PROCESSING )) {
42+ self ::$ PROCESSING = new AttributeStatus ('processing ' );
43+ }
44+ return self ::$ PROCESSING ;
45+ }
46+ public static function DELETING (): AttributeStatus
47+ {
48+ if (!isset (self ::$ DELETING )) {
49+ self ::$ DELETING = new AttributeStatus ('deleting ' );
50+ }
51+ return self ::$ DELETING ;
52+ }
53+ public static function STUCK (): AttributeStatus
54+ {
55+ if (!isset (self ::$ STUCK )) {
56+ self ::$ STUCK = new AttributeStatus ('stuck ' );
57+ }
58+ return self ::$ STUCK ;
59+ }
60+ public static function FAILED (): AttributeStatus
61+ {
62+ if (!isset (self ::$ FAILED )) {
63+ self ::$ FAILED = new AttributeStatus ('failed ' );
64+ }
65+ return self ::$ FAILED ;
66+ }
67+ }
0 commit comments