@@ -28,7 +28,7 @@ class MeshConfigEntry extends AbstractModel implements ConfigEntry
2828 use ConfigEntryTrait;
2929
3030 public string $ Partition ;
31- public TransparentProxyConfig $ TransparentProxy ;
31+ public TransparentProxyMeshConfig $ TransparentProxy ;
3232 public bool $ AllowEnablingPermissiveMutualTLS ;
3333 public null |MeshTLSConfig $ TLS ;
3434 public null |MeshHTTPConfig $ HTTP ;
@@ -38,7 +38,7 @@ public function __construct(
3838 null |array $ data = null , // Deprecated, will be removed.
3939 string $ Partition = '' ,
4040 string $ Namespace = '' ,
41- null |TransparentProxyConfig $ TransparentProxy = null ,
41+ null |TransparentProxyMeshConfig $ TransparentProxy = null ,
4242 bool $ AllowEnablingPermissiveMutualTLS = false ,
4343 null |MeshTLSConfig $ TLS = null ,
4444 null |MeshHTTPConfig $ HTTP = null ,
@@ -73,14 +73,110 @@ public function getName(): string
7373 return Consul::MeshConfigMesh;
7474 }
7575
76- public function getTransparentProxy (): TransparentProxyConfig
76+ public function getTransparentProxy (): TransparentProxyMeshConfig
7777 {
7878 return $ this ->TransparentProxy ;
7979 }
8080
81- public function setTransparentProxy (TransparentProxyConfig $ TransparentProxy ): self
81+ public function setTransparentProxy (TransparentProxyMeshConfig $ TransparentProxy ): self
8282 {
8383 $ this ->TransparentProxy = $ TransparentProxy ;
8484 return $ this ;
8585 }
86+
87+ public function isAllowEnablingPermissiveMutualTLS (): bool
88+ {
89+ return $ this ->AllowEnablingPermissiveMutualTLS ;
90+ }
91+
92+ public function setAllowEnablingPermissiveMutualTLS (bool $ AllowEnablingPermissiveMutualTLS ): self
93+ {
94+ $ this ->AllowEnablingPermissiveMutualTLS = $ AllowEnablingPermissiveMutualTLS ;
95+ return $ this ;
96+ }
97+
98+ public function getTLS (): null |MeshTLSConfig
99+ {
100+ return $ this ->TLS ;
101+ }
102+
103+ public function setTLS (null |MeshTLSConfig $ TLS ): self
104+ {
105+ $ this ->TLS = $ TLS ;
106+ return $ this ;
107+ }
108+
109+ public function getHTTP (): null |MeshHTTPConfig
110+ {
111+ return $ this ->HTTP ;
112+ }
113+
114+ public function setHTTP (null |MeshHTTPConfig $ HTTP ): self
115+ {
116+ $ this ->HTTP = $ HTTP ;
117+ return $ this ;
118+ }
119+
120+ public function getPeering (): null |PeeringMeshConfig
121+ {
122+ return $ this ->Peering ;
123+ }
124+
125+ public function setPeering (null |PeeringMeshConfig $ Peering ): self
126+ {
127+ $ this ->Peering = $ Peering ;
128+ return $ this ;
129+ }
130+
131+ public static function jsonUnserialize (\stdClass $ decoded , null |self $ n = null ): self
132+ {
133+ $ n = $ n ?? new self ();
134+ foreach ($ decoded as $ k => $ v ) {
135+ if ('TransparentProxy ' === $ k || 'transparent_proxy ' === $ k ) {
136+ $ n ->TransparentProxy = null === $ v ? new TransparentProxyMeshConfig () : TransparentProxyMeshConfig::jsonUnserialize ($ v );
137+ } elseif ('TLS ' === $ k ) {
138+ $ n ->TLS = null === $ v ? null : MeshTLSConfig::jsonUnserialize ($ v );
139+ } elseif ('HTTP ' === $ k ) {
140+ $ n ->HTTP = null === $ v ? null : MeshHTTPConfig::jsonUnserialize ($ v );
141+ } elseif ('Peering ' === $ k ) {
142+ $ n ->Peering = null === $ v ? null : PeeringMeshConfig::jsonUnserialize ($ v );
143+ } elseif ('allow_enabling_permissive_mutual_tls ' === $ k ) {
144+ $ n ->AllowEnablingPermissiveMutualTLS = $ v ;
145+ } else {
146+ $ n ->{$ k } = $ v ;
147+ }
148+ }
149+ return $ n ;
150+ }
151+
152+ public function jsonSerialize (): \stdClass
153+ {
154+ $ out = new \stdClass ();
155+ foreach ($ this ->_getDynamicFields () as $ k => $ v ) {
156+ $ out ->{$ k } = $ v ;
157+ }
158+ $ out ->Kind = Consul::MeshConfigMesh;
159+ if ('' !== $ this ->Partition ) {
160+ $ out ->Partition = $ this ->Partition ;
161+ }
162+ $ out ->TransparentProxy = $ this ->TransparentProxy ;
163+ if ($ this ->AllowEnablingPermissiveMutualTLS ) {
164+ $ out ->allow_enabling_permissive_mutual_tls = true ;
165+ }
166+ if (null !== $ this ->TLS ) {
167+ $ out ->TLS = $ this ->TLS ;
168+ }
169+ if (null !== $ this ->HTTP ) {
170+ $ out ->HTTP = $ this ->HTTP ;
171+ }
172+ if (null !== $ this ->Peering ) {
173+ $ out ->Peering = $ this ->Peering ;
174+ }
175+ if (null !== $ this ->Meta ) {
176+ $ out ->Meta = $ this ->Meta ;
177+ }
178+ $ out ->CreateIndex = $ this ->CreateIndex ;
179+ $ out ->ModifyIndex = $ this ->ModifyIndex ;
180+ return $ out ;
181+ }
86182}
0 commit comments