@@ -37,33 +37,15 @@ class ACLTokenExpanded extends ACLToken
3737 public string $ ResolvedByAgent ;
3838
3939 /**
40- * @param iterable $ExpandedPolicies
41- * @param iterable $ExpandedRoles
42- * @param iterable $NamespaceDefaultPolicyIDs
43- * @param iterable $NamespaceDefaultRoleIDs
44- * @param string $AgentACLDefaultPolicy
45- * @param string $AgentACLDownPolicy
46- * @param string $ResolvedByAgent
47- * @param int $CreateIndex
48- * @param int $ModifyIndex
49- * @param string $AccessorID
50- * @param string $SecretID
51- * @param string $Description
52- * @param iterable $Policies
53- * @param iterable $Roles
54- * @param iterable $ServiceIdentities
55- * @param iterable $NodeIdentities
56- * @param iterable $TemplatePolicies
57- * @param bool $Local
58- * @param string $AuthMethod
59- * @param \DateInterval|float|int|string|\DCarbone\Go\Time\Duration|null $ExpirationTTL
60- * @param \DCarbone\Go\Time\Time|null $ExpirationTime
61- * @param \DCarbone\Go\Time\Time|null $CreateTime
62- * @param string $Hash
63- * @param string $Namespace
64- * @param string $Rules
65- * @param string $Partition
66- * @param string $AuthMethodNamespace
40+ * @param array<\DCarbone\PHPConsulAPI\ACL\ACLPolicy> $ExpandedPolicies
41+ * @param array<\DCarbone\PHPConsulAPI\ACL\ACLRole> $ExpandedRoles
42+ * @param array<string> $NamespaceDefaultPolicyIDs
43+ * @param array<string> $NamespaceDefaultRoleIDs
44+ * @param array<\DCarbone\PHPConsulAPI\ACL\ACLTokenPolicyLink> $Policies
45+ * @param array<\DCarbone\PHPConsulAPI\ACL\ACLTokenRoleLink> $Roles
46+ * @param array<\DCarbone\PHPConsulAPI\ACL\ACLServiceIdentity> $ServiceIdentities
47+ * @param array<\DCarbone\PHPConsulAPI\ACL\ACLNodeIdentity> $NodeIdentities
48+ * @param array<\DCarbone\PHPConsulAPI\ACL\ACLTemplatedPolicy> $TemplatePolicies
6749 */
6850 public function __construct (
6951 iterable $ ExpandedPolicies = [],
@@ -140,7 +122,7 @@ public function setExpandedPolicies(ACLPolicy ...$ExpandedPolicies): self
140122 }
141123
142124 /**
143- * @return \DCarbone\PHPConsulAPI\ACL\ACLRole[]
125+ * @return array< \DCarbone\PHPConsulAPI\ACL\ACLRole>
144126 */
145127 public function getExpandedRoles (): array
146128 {
@@ -220,7 +202,9 @@ public static function jsonUnserialize(\stdClass $decoded, null|ACLToken $into =
220202 foreach ($ decoded as $ k => $ v ) {
221203 if ($ n ->_jsonUnserializeField ($ k , $ v , $ n )) {
222204 continue ;
223- } elseif ('ExpandedPolicies ' === $ k ) {
205+ }
206+
207+ if ('ExpandedPolicies ' === $ k ) {
224208 foreach ($ v as $ vv ) {
225209 $ n ->ExpandedPolicies [] = ACLPolicy::jsonUnserialize ($ vv );
226210 }
@@ -241,6 +225,16 @@ public static function jsonUnserialize(\stdClass $decoded, null|ACLToken $into =
241225
242226 public function jsonSerialize (): \stdClass
243227 {
244- return parent ::jsonSerialize (); // TODO: Change the autogenerated stub
228+ $ out = parent ::jsonSerialize ();
229+
230+ $ out ->ExpandedPolicies = $ this ->ExpandedPolicies ;
231+ $ out ->ExpandedRoles = $ this ->ExpandedRoles ;
232+ $ out ->NamespaceDefaultPolicyIDs = $ this ->NamespaceDefaultPolicyIDs ;
233+ $ out ->NamespaceDefaultRoleIDs = $ this ->NamespaceDefaultRoleIDs ;
234+ $ out ->AgentACLDefaultPolicy = $ this ->AgentACLDefaultPolicy ;
235+ $ out ->AgentACLDownPolicy = $ this ->AgentACLDownPolicy ;
236+ $ out ->ResolvedByAgent = $ this ->ResolvedByAgent ;
237+
238+ return $ out ;
245239 }
246240}
0 commit comments