@@ -123,6 +123,29 @@ private function populateResultArchitecturesList(array $json): array
123
123
return $ items ;
124
124
}
125
125
126
+ private function populateResultDeadLetterConfig (array $ json ): DeadLetterConfig
127
+ {
128
+ return new DeadLetterConfig ([
129
+ 'TargetArn ' => isset ($ json ['TargetArn ' ]) ? (string ) $ json ['TargetArn ' ] : null ,
130
+ ]);
131
+ }
132
+
133
+ private function populateResultEnvironmentError (array $ json ): EnvironmentError
134
+ {
135
+ return new EnvironmentError ([
136
+ 'ErrorCode ' => isset ($ json ['ErrorCode ' ]) ? (string ) $ json ['ErrorCode ' ] : null ,
137
+ 'Message ' => isset ($ json ['Message ' ]) ? (string ) $ json ['Message ' ] : null ,
138
+ ]);
139
+ }
140
+
141
+ private function populateResultEnvironmentResponse (array $ json ): EnvironmentResponse
142
+ {
143
+ return new EnvironmentResponse ([
144
+ 'Variables ' => !isset ($ json ['Variables ' ]) ? null : $ this ->populateResultEnvironmentVariables ($ json ['Variables ' ]),
145
+ 'Error ' => empty ($ json ['Error ' ]) ? null : $ this ->populateResultEnvironmentError ($ json ['Error ' ]),
146
+ ]);
147
+ }
148
+
126
149
/**
127
150
* @return array<string, string>
128
151
*/
@@ -136,108 +159,129 @@ private function populateResultEnvironmentVariables(array $json): array
136
159
return $ items ;
137
160
}
138
161
162
+ private function populateResultEphemeralStorage (array $ json ): EphemeralStorage
163
+ {
164
+ return new EphemeralStorage ([
165
+ 'Size ' => (int ) $ json ['Size ' ],
166
+ ]);
167
+ }
168
+
169
+ private function populateResultFileSystemConfig (array $ json ): FileSystemConfig
170
+ {
171
+ return new FileSystemConfig ([
172
+ 'Arn ' => (string ) $ json ['Arn ' ],
173
+ 'LocalMountPath ' => (string ) $ json ['LocalMountPath ' ],
174
+ ]);
175
+ }
176
+
139
177
/**
140
178
* @return FileSystemConfig[]
141
179
*/
142
180
private function populateResultFileSystemConfigList (array $ json ): array
143
181
{
144
182
$ items = [];
145
183
foreach ($ json as $ item ) {
146
- $ items [] = new FileSystemConfig ([
147
- 'Arn ' => (string ) $ item ['Arn ' ],
148
- 'LocalMountPath ' => (string ) $ item ['LocalMountPath ' ],
149
- ]);
184
+ $ items [] = $ this ->populateResultFileSystemConfig ($ item );
150
185
}
151
186
152
187
return $ items ;
153
188
}
154
189
190
+ private function populateResultFunctionConfiguration (array $ json ): FunctionConfiguration
191
+ {
192
+ return new FunctionConfiguration ([
193
+ 'FunctionName ' => isset ($ json ['FunctionName ' ]) ? (string ) $ json ['FunctionName ' ] : null ,
194
+ 'FunctionArn ' => isset ($ json ['FunctionArn ' ]) ? (string ) $ json ['FunctionArn ' ] : null ,
195
+ 'Runtime ' => isset ($ json ['Runtime ' ]) ? (string ) $ json ['Runtime ' ] : null ,
196
+ 'Role ' => isset ($ json ['Role ' ]) ? (string ) $ json ['Role ' ] : null ,
197
+ 'Handler ' => isset ($ json ['Handler ' ]) ? (string ) $ json ['Handler ' ] : null ,
198
+ 'CodeSize ' => isset ($ json ['CodeSize ' ]) ? (string ) $ json ['CodeSize ' ] : null ,
199
+ 'Description ' => isset ($ json ['Description ' ]) ? (string ) $ json ['Description ' ] : null ,
200
+ 'Timeout ' => isset ($ json ['Timeout ' ]) ? (int ) $ json ['Timeout ' ] : null ,
201
+ 'MemorySize ' => isset ($ json ['MemorySize ' ]) ? (int ) $ json ['MemorySize ' ] : null ,
202
+ 'LastModified ' => isset ($ json ['LastModified ' ]) ? (string ) $ json ['LastModified ' ] : null ,
203
+ 'CodeSha256 ' => isset ($ json ['CodeSha256 ' ]) ? (string ) $ json ['CodeSha256 ' ] : null ,
204
+ 'Version ' => isset ($ json ['Version ' ]) ? (string ) $ json ['Version ' ] : null ,
205
+ 'VpcConfig ' => empty ($ json ['VpcConfig ' ]) ? null : $ this ->populateResultVpcConfigResponse ($ json ['VpcConfig ' ]),
206
+ 'DeadLetterConfig ' => empty ($ json ['DeadLetterConfig ' ]) ? null : $ this ->populateResultDeadLetterConfig ($ json ['DeadLetterConfig ' ]),
207
+ 'Environment ' => empty ($ json ['Environment ' ]) ? null : $ this ->populateResultEnvironmentResponse ($ json ['Environment ' ]),
208
+ 'KMSKeyArn ' => isset ($ json ['KMSKeyArn ' ]) ? (string ) $ json ['KMSKeyArn ' ] : null ,
209
+ 'TracingConfig ' => empty ($ json ['TracingConfig ' ]) ? null : $ this ->populateResultTracingConfigResponse ($ json ['TracingConfig ' ]),
210
+ 'MasterArn ' => isset ($ json ['MasterArn ' ]) ? (string ) $ json ['MasterArn ' ] : null ,
211
+ 'RevisionId ' => isset ($ json ['RevisionId ' ]) ? (string ) $ json ['RevisionId ' ] : null ,
212
+ 'Layers ' => !isset ($ json ['Layers ' ]) ? null : $ this ->populateResultLayersReferenceList ($ json ['Layers ' ]),
213
+ 'State ' => isset ($ json ['State ' ]) ? (string ) $ json ['State ' ] : null ,
214
+ 'StateReason ' => isset ($ json ['StateReason ' ]) ? (string ) $ json ['StateReason ' ] : null ,
215
+ 'StateReasonCode ' => isset ($ json ['StateReasonCode ' ]) ? (string ) $ json ['StateReasonCode ' ] : null ,
216
+ 'LastUpdateStatus ' => isset ($ json ['LastUpdateStatus ' ]) ? (string ) $ json ['LastUpdateStatus ' ] : null ,
217
+ 'LastUpdateStatusReason ' => isset ($ json ['LastUpdateStatusReason ' ]) ? (string ) $ json ['LastUpdateStatusReason ' ] : null ,
218
+ 'LastUpdateStatusReasonCode ' => isset ($ json ['LastUpdateStatusReasonCode ' ]) ? (string ) $ json ['LastUpdateStatusReasonCode ' ] : null ,
219
+ 'FileSystemConfigs ' => !isset ($ json ['FileSystemConfigs ' ]) ? null : $ this ->populateResultFileSystemConfigList ($ json ['FileSystemConfigs ' ]),
220
+ 'PackageType ' => isset ($ json ['PackageType ' ]) ? (string ) $ json ['PackageType ' ] : null ,
221
+ 'ImageConfigResponse ' => empty ($ json ['ImageConfigResponse ' ]) ? null : $ this ->populateResultImageConfigResponse ($ json ['ImageConfigResponse ' ]),
222
+ 'SigningProfileVersionArn ' => isset ($ json ['SigningProfileVersionArn ' ]) ? (string ) $ json ['SigningProfileVersionArn ' ] : null ,
223
+ 'SigningJobArn ' => isset ($ json ['SigningJobArn ' ]) ? (string ) $ json ['SigningJobArn ' ] : null ,
224
+ 'Architectures ' => !isset ($ json ['Architectures ' ]) ? null : $ this ->populateResultArchitecturesList ($ json ['Architectures ' ]),
225
+ 'EphemeralStorage ' => empty ($ json ['EphemeralStorage ' ]) ? null : $ this ->populateResultEphemeralStorage ($ json ['EphemeralStorage ' ]),
226
+ ]);
227
+ }
228
+
155
229
/**
156
230
* @return FunctionConfiguration[]
157
231
*/
158
232
private function populateResultFunctionList (array $ json ): array
159
233
{
160
234
$ items = [];
161
235
foreach ($ json as $ item ) {
162
- $ items [] = new FunctionConfiguration ([
163
- 'FunctionName ' => isset ($ item ['FunctionName ' ]) ? (string ) $ item ['FunctionName ' ] : null ,
164
- 'FunctionArn ' => isset ($ item ['FunctionArn ' ]) ? (string ) $ item ['FunctionArn ' ] : null ,
165
- 'Runtime ' => isset ($ item ['Runtime ' ]) ? (string ) $ item ['Runtime ' ] : null ,
166
- 'Role ' => isset ($ item ['Role ' ]) ? (string ) $ item ['Role ' ] : null ,
167
- 'Handler ' => isset ($ item ['Handler ' ]) ? (string ) $ item ['Handler ' ] : null ,
168
- 'CodeSize ' => isset ($ item ['CodeSize ' ]) ? (string ) $ item ['CodeSize ' ] : null ,
169
- 'Description ' => isset ($ item ['Description ' ]) ? (string ) $ item ['Description ' ] : null ,
170
- 'Timeout ' => isset ($ item ['Timeout ' ]) ? (int ) $ item ['Timeout ' ] : null ,
171
- 'MemorySize ' => isset ($ item ['MemorySize ' ]) ? (int ) $ item ['MemorySize ' ] : null ,
172
- 'LastModified ' => isset ($ item ['LastModified ' ]) ? (string ) $ item ['LastModified ' ] : null ,
173
- 'CodeSha256 ' => isset ($ item ['CodeSha256 ' ]) ? (string ) $ item ['CodeSha256 ' ] : null ,
174
- 'Version ' => isset ($ item ['Version ' ]) ? (string ) $ item ['Version ' ] : null ,
175
- 'VpcConfig ' => empty ($ item ['VpcConfig ' ]) ? null : new VpcConfigResponse ([
176
- 'SubnetIds ' => !isset ($ item ['VpcConfig ' ]['SubnetIds ' ]) ? null : $ this ->populateResultSubnetIds ($ item ['VpcConfig ' ]['SubnetIds ' ]),
177
- 'SecurityGroupIds ' => !isset ($ item ['VpcConfig ' ]['SecurityGroupIds ' ]) ? null : $ this ->populateResultSecurityGroupIds ($ item ['VpcConfig ' ]['SecurityGroupIds ' ]),
178
- 'VpcId ' => isset ($ item ['VpcConfig ' ]['VpcId ' ]) ? (string ) $ item ['VpcConfig ' ]['VpcId ' ] : null ,
179
- ]),
180
- 'DeadLetterConfig ' => empty ($ item ['DeadLetterConfig ' ]) ? null : new DeadLetterConfig ([
181
- 'TargetArn ' => isset ($ item ['DeadLetterConfig ' ]['TargetArn ' ]) ? (string ) $ item ['DeadLetterConfig ' ]['TargetArn ' ] : null ,
182
- ]),
183
- 'Environment ' => empty ($ item ['Environment ' ]) ? null : new EnvironmentResponse ([
184
- 'Variables ' => !isset ($ item ['Environment ' ]['Variables ' ]) ? null : $ this ->populateResultEnvironmentVariables ($ item ['Environment ' ]['Variables ' ]),
185
- 'Error ' => empty ($ item ['Environment ' ]['Error ' ]) ? null : new EnvironmentError ([
186
- 'ErrorCode ' => isset ($ item ['Environment ' ]['Error ' ]['ErrorCode ' ]) ? (string ) $ item ['Environment ' ]['Error ' ]['ErrorCode ' ] : null ,
187
- 'Message ' => isset ($ item ['Environment ' ]['Error ' ]['Message ' ]) ? (string ) $ item ['Environment ' ]['Error ' ]['Message ' ] : null ,
188
- ]),
189
- ]),
190
- 'KMSKeyArn ' => isset ($ item ['KMSKeyArn ' ]) ? (string ) $ item ['KMSKeyArn ' ] : null ,
191
- 'TracingConfig ' => empty ($ item ['TracingConfig ' ]) ? null : new TracingConfigResponse ([
192
- 'Mode ' => isset ($ item ['TracingConfig ' ]['Mode ' ]) ? (string ) $ item ['TracingConfig ' ]['Mode ' ] : null ,
193
- ]),
194
- 'MasterArn ' => isset ($ item ['MasterArn ' ]) ? (string ) $ item ['MasterArn ' ] : null ,
195
- 'RevisionId ' => isset ($ item ['RevisionId ' ]) ? (string ) $ item ['RevisionId ' ] : null ,
196
- 'Layers ' => !isset ($ item ['Layers ' ]) ? null : $ this ->populateResultLayersReferenceList ($ item ['Layers ' ]),
197
- 'State ' => isset ($ item ['State ' ]) ? (string ) $ item ['State ' ] : null ,
198
- 'StateReason ' => isset ($ item ['StateReason ' ]) ? (string ) $ item ['StateReason ' ] : null ,
199
- 'StateReasonCode ' => isset ($ item ['StateReasonCode ' ]) ? (string ) $ item ['StateReasonCode ' ] : null ,
200
- 'LastUpdateStatus ' => isset ($ item ['LastUpdateStatus ' ]) ? (string ) $ item ['LastUpdateStatus ' ] : null ,
201
- 'LastUpdateStatusReason ' => isset ($ item ['LastUpdateStatusReason ' ]) ? (string ) $ item ['LastUpdateStatusReason ' ] : null ,
202
- 'LastUpdateStatusReasonCode ' => isset ($ item ['LastUpdateStatusReasonCode ' ]) ? (string ) $ item ['LastUpdateStatusReasonCode ' ] : null ,
203
- 'FileSystemConfigs ' => !isset ($ item ['FileSystemConfigs ' ]) ? null : $ this ->populateResultFileSystemConfigList ($ item ['FileSystemConfigs ' ]),
204
- 'PackageType ' => isset ($ item ['PackageType ' ]) ? (string ) $ item ['PackageType ' ] : null ,
205
- 'ImageConfigResponse ' => empty ($ item ['ImageConfigResponse ' ]) ? null : new ImageConfigResponse ([
206
- 'ImageConfig ' => empty ($ item ['ImageConfigResponse ' ]['ImageConfig ' ]) ? null : new ImageConfig ([
207
- 'EntryPoint ' => !isset ($ item ['ImageConfigResponse ' ]['ImageConfig ' ]['EntryPoint ' ]) ? null : $ this ->populateResultStringList ($ item ['ImageConfigResponse ' ]['ImageConfig ' ]['EntryPoint ' ]),
208
- 'Command ' => !isset ($ item ['ImageConfigResponse ' ]['ImageConfig ' ]['Command ' ]) ? null : $ this ->populateResultStringList ($ item ['ImageConfigResponse ' ]['ImageConfig ' ]['Command ' ]),
209
- 'WorkingDirectory ' => isset ($ item ['ImageConfigResponse ' ]['ImageConfig ' ]['WorkingDirectory ' ]) ? (string ) $ item ['ImageConfigResponse ' ]['ImageConfig ' ]['WorkingDirectory ' ] : null ,
210
- ]),
211
- 'Error ' => empty ($ item ['ImageConfigResponse ' ]['Error ' ]) ? null : new ImageConfigError ([
212
- 'ErrorCode ' => isset ($ item ['ImageConfigResponse ' ]['Error ' ]['ErrorCode ' ]) ? (string ) $ item ['ImageConfigResponse ' ]['Error ' ]['ErrorCode ' ] : null ,
213
- 'Message ' => isset ($ item ['ImageConfigResponse ' ]['Error ' ]['Message ' ]) ? (string ) $ item ['ImageConfigResponse ' ]['Error ' ]['Message ' ] : null ,
214
- ]),
215
- ]),
216
- 'SigningProfileVersionArn ' => isset ($ item ['SigningProfileVersionArn ' ]) ? (string ) $ item ['SigningProfileVersionArn ' ] : null ,
217
- 'SigningJobArn ' => isset ($ item ['SigningJobArn ' ]) ? (string ) $ item ['SigningJobArn ' ] : null ,
218
- 'Architectures ' => !isset ($ item ['Architectures ' ]) ? null : $ this ->populateResultArchitecturesList ($ item ['Architectures ' ]),
219
- 'EphemeralStorage ' => empty ($ item ['EphemeralStorage ' ]) ? null : new EphemeralStorage ([
220
- 'Size ' => (int ) $ item ['EphemeralStorage ' ]['Size ' ],
221
- ]),
222
- ]);
236
+ $ items [] = $ this ->populateResultFunctionConfiguration ($ item );
223
237
}
224
238
225
239
return $ items ;
226
240
}
227
241
242
+ private function populateResultImageConfig (array $ json ): ImageConfig
243
+ {
244
+ return new ImageConfig ([
245
+ 'EntryPoint ' => !isset ($ json ['EntryPoint ' ]) ? null : $ this ->populateResultStringList ($ json ['EntryPoint ' ]),
246
+ 'Command ' => !isset ($ json ['Command ' ]) ? null : $ this ->populateResultStringList ($ json ['Command ' ]),
247
+ 'WorkingDirectory ' => isset ($ json ['WorkingDirectory ' ]) ? (string ) $ json ['WorkingDirectory ' ] : null ,
248
+ ]);
249
+ }
250
+
251
+ private function populateResultImageConfigError (array $ json ): ImageConfigError
252
+ {
253
+ return new ImageConfigError ([
254
+ 'ErrorCode ' => isset ($ json ['ErrorCode ' ]) ? (string ) $ json ['ErrorCode ' ] : null ,
255
+ 'Message ' => isset ($ json ['Message ' ]) ? (string ) $ json ['Message ' ] : null ,
256
+ ]);
257
+ }
258
+
259
+ private function populateResultImageConfigResponse (array $ json ): ImageConfigResponse
260
+ {
261
+ return new ImageConfigResponse ([
262
+ 'ImageConfig ' => empty ($ json ['ImageConfig ' ]) ? null : $ this ->populateResultImageConfig ($ json ['ImageConfig ' ]),
263
+ 'Error ' => empty ($ json ['Error ' ]) ? null : $ this ->populateResultImageConfigError ($ json ['Error ' ]),
264
+ ]);
265
+ }
266
+
267
+ private function populateResultLayer (array $ json ): Layer
268
+ {
269
+ return new Layer ([
270
+ 'Arn ' => isset ($ json ['Arn ' ]) ? (string ) $ json ['Arn ' ] : null ,
271
+ 'CodeSize ' => isset ($ json ['CodeSize ' ]) ? (string ) $ json ['CodeSize ' ] : null ,
272
+ 'SigningProfileVersionArn ' => isset ($ json ['SigningProfileVersionArn ' ]) ? (string ) $ json ['SigningProfileVersionArn ' ] : null ,
273
+ 'SigningJobArn ' => isset ($ json ['SigningJobArn ' ]) ? (string ) $ json ['SigningJobArn ' ] : null ,
274
+ ]);
275
+ }
276
+
228
277
/**
229
278
* @return Layer[]
230
279
*/
231
280
private function populateResultLayersReferenceList (array $ json ): array
232
281
{
233
282
$ items = [];
234
283
foreach ($ json as $ item ) {
235
- $ items [] = new Layer ([
236
- 'Arn ' => isset ($ item ['Arn ' ]) ? (string ) $ item ['Arn ' ] : null ,
237
- 'CodeSize ' => isset ($ item ['CodeSize ' ]) ? (string ) $ item ['CodeSize ' ] : null ,
238
- 'SigningProfileVersionArn ' => isset ($ item ['SigningProfileVersionArn ' ]) ? (string ) $ item ['SigningProfileVersionArn ' ] : null ,
239
- 'SigningJobArn ' => isset ($ item ['SigningJobArn ' ]) ? (string ) $ item ['SigningJobArn ' ] : null ,
240
- ]);
284
+ $ items [] = $ this ->populateResultLayer ($ item );
241
285
}
242
286
243
287
return $ items ;
@@ -290,4 +334,20 @@ private function populateResultSubnetIds(array $json): array
290
334
291
335
return $ items ;
292
336
}
337
+
338
+ private function populateResultTracingConfigResponse (array $ json ): TracingConfigResponse
339
+ {
340
+ return new TracingConfigResponse ([
341
+ 'Mode ' => isset ($ json ['Mode ' ]) ? (string ) $ json ['Mode ' ] : null ,
342
+ ]);
343
+ }
344
+
345
+ private function populateResultVpcConfigResponse (array $ json ): VpcConfigResponse
346
+ {
347
+ return new VpcConfigResponse ([
348
+ 'SubnetIds ' => !isset ($ json ['SubnetIds ' ]) ? null : $ this ->populateResultSubnetIds ($ json ['SubnetIds ' ]),
349
+ 'SecurityGroupIds ' => !isset ($ json ['SecurityGroupIds ' ]) ? null : $ this ->populateResultSecurityGroupIds ($ json ['SecurityGroupIds ' ]),
350
+ 'VpcId ' => isset ($ json ['VpcId ' ]) ? (string ) $ json ['VpcId ' ] : null ,
351
+ ]);
352
+ }
293
353
}
0 commit comments