2828class ACLAuthMethod extends AbstractModel
2929{
3030 protected const FIELDS = [
31- self ::FIELD_DISPLAY_NAME => [
32- Hydration::FIELD_TYPE => Hydration::STRING ,
33- Hydration::FIELD_NULLABLE => true ,
34- ],
35- self ::FIELD_DESCRIPTION => [
36- Hydration::FIELD_TYPE => Hydration::STRING ,
37- Hydration::FIELD_NULLABLE => true ,
38- ],
31+ self ::FIELD_DISPLAY_NAME => Hydration::OMITEMPTY_STRING_FIELD ,
32+ self ::FIELD_DESCRIPTION => Hydration::OMITEMPTY_STRING_FIELD ,
3933 self ::FIELD_MAX_TOKEN_TTL => [
40- Hydration::FIELD_CALLBACK => Hydration::CALLABLE_HYDRATE_DURATION ,
41- ],
42- self ::FIELD_TOKEN_LOCALITY => [
43- Hydration::FIELD_TYPE => Hydration::STRING ,
44- Hydration::FIELD_NULLABLE => true ,
34+ Hydration::FIELD_CALLBACK => Hydration::HYDRATE_DURATION ,
35+ Hydration::FIELD_OMITEMPTY => true ,
4536 ],
37+ self ::FIELD_TOKEN_LOCALITY => Hydration::OMITEMPTY_STRING_FIELD ,
4638 self ::FIELD_NAMESPACE_RULES => [
4739 Hydration::FIELD_TYPE => Hydration::ARRAY ,
4840 Hydration::FIELD_CLASS => ACLAuthMethodNamespaceRule::class,
4941 Hydration::FIELD_ARRAY_TYPE => Hydration::class,
42+ Hydration::FIELD_OMITEMPTY => true ,
5043 ],
51- self ::FIELD_NAMESPACE => [
52- Hydration::FIELD_TYPE => Hydration::STRING ,
53- Hydration::FIELD_NULLABLE => true ,
54- ],
44+ self ::FIELD_NAMESPACE => Hydration::OMITEMPTY_STRING_FIELD ,
5545 ];
56- private const FIELD_DISPLAY_NAME = 'DisplayName ' ;
57- private const FIELD_DESCRIPTION = 'Description ' ;
58- private const FIELD_MAX_TOKEN_TTL = 'MaxTokenTTL ' ;
59- private const FIELD_TOKEN_LOCALITY = 'TokenLocality ' ;
60- private const FIELD_NAMESPACE_RULES = 'NamespaceRules ' ;
61- private const FIELD_NAMESPACE = 'Namespace ' ;
46+
47+ private const FIELD_DISPLAY_NAME = 'DisplayName ' ;
48+ private const FIELD_DESCRIPTION = 'Description ' ;
49+ private const FIELD_MAX_TOKEN_TTL = 'MaxTokenTTL ' ;
50+ private const FIELD_TOKEN_LOCALITY = 'TokenLocality ' ;
51+ private const FIELD_NAMESPACE_RULES = 'NamespaceRules ' ;
52+ private const FIELD_NAMESPACE = 'Namespace ' ;
6253
6354 /** @var string */
6455 public string $ Name = '' ;
6556 /** @var string */
6657 public string $ Type = '' ;
67- /** @var string|null */
68- public ? string $ DisplayName = null ;
69- /** @var string|null */
70- public ? string $ Description = null ;
58+ /** @var string */
59+ public string $ DisplayName = '' ;
60+ /** @var string */
61+ public string $ Description = '' ;
7162 /** @var \DCarbone\Go\Time\Duration */
7263 public Time \Duration $ MaxTokenTTL ;
73- /** @var string|null */
74- public ? string $ TokenLocality = null ;
64+ /** @var string */
65+ public string $ TokenLocality = '' ;
7566 /** @var array */
7667 public array $ config = [];
7768 /** @var int */
@@ -80,8 +71,8 @@ class ACLAuthMethod extends AbstractModel
8071 public int $ ModifyIndex = 0 ;
8172 /** @var \DCarbone\PHPConsulAPI\ACL\ACLAuthMethodNamespaceRule[] */
8273 public array $ NamespaceRules = [];
83- /** @var string|null */
84- public ? string $ Namespace = null ;
74+ /** @var string */
75+ public string $ Namespace = '' ;
8576
8677 /**
8778 * ACLAuthMethod constructor.
@@ -132,36 +123,36 @@ public function setType(string $Type): self
132123 }
133124
134125 /**
135- * @return string|null
126+ * @return string
136127 */
137- public function getDisplayName (): ? string
128+ public function getDisplayName (): string
138129 {
139130 return $ this ->DisplayName ;
140131 }
141132
142133 /**
143- * @param string|null $DisplayName
134+ * @param string $DisplayName
144135 * @return \DCarbone\PHPConsulAPI\ACL\ACLAuthMethod
145136 */
146- public function setDisplayName (? string $ DisplayName ): self
137+ public function setDisplayName (string $ DisplayName ): self
147138 {
148139 $ this ->DisplayName = $ DisplayName ;
149140 return $ this ;
150141 }
151142
152143 /**
153- * @return string|null
144+ * @return string
154145 */
155- public function getDescription (): ? string
146+ public function getDescription (): string
156147 {
157148 return $ this ->Description ;
158149 }
159150
160151 /**
161- * @param string|null $Description
152+ * @param string $Description
162153 * @return \DCarbone\PHPConsulAPI\ACL\ACLAuthMethod
163154 */
164- public function setDescription (? string $ Description ): self
155+ public function setDescription (string $ Description ): self
165156 {
166157 $ this ->Description = $ Description ;
167158 return $ this ;
@@ -186,18 +177,18 @@ public function setMaxTokenTTL(Time\Duration $MaxTokenTTL): self
186177 }
187178
188179 /**
189- * @return string|null
180+ * @return string
190181 */
191- public function getTokenLocality (): ? string
182+ public function getTokenLocality (): string
192183 {
193184 return $ this ->TokenLocality ;
194185 }
195186
196187 /**
197- * @param string|null $TokenLocality
188+ * @param string $TokenLocality
198189 * @return \DCarbone\PHPConsulAPI\ACL\ACLAuthMethod
199190 */
200- public function setTokenLocality (? string $ TokenLocality ): self
191+ public function setTokenLocality (string $ TokenLocality ): self
201192 {
202193 $ this ->TokenLocality = $ TokenLocality ;
203194 return $ this ;
@@ -276,18 +267,18 @@ public function setNamespaceRules(array $NamespaceRules): self
276267 }
277268
278269 /**
279- * @return string|null
270+ * @return string
280271 */
281- public function getNamespace (): ? string
272+ public function getNamespace (): string
282273 {
283274 return $ this ->Namespace ;
284275 }
285276
286277 /**
287- * @param string|null $Namespace
278+ * @param string $Namespace
288279 * @return \DCarbone\PHPConsulAPI\ACL\ACLAuthMethod
289280 */
290- public function setNamespace (? string $ Namespace ): self
281+ public function setNamespace (string $ Namespace ): self
291282 {
292283 $ this ->Namespace = $ Namespace ;
293284 return $ this ;
0 commit comments