You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -188,9 +202,19 @@ public function setQualifier(?string $value): self
188
202
189
203
publicfunctionvalidate(): void
190
204
{
191
-
foreach (['FunctionName'] as$name) {
192
-
if (null === $this->$name) {
193
-
thrownewInvalidArgument(sprintf('Missing parameter "%s" when validating the "%s". The value cannot be null.', $name, __CLASS__));
205
+
if (null === $this->FunctionName) {
206
+
thrownewInvalidArgument(sprintf('Missing parameter "FunctionName" when validating the "%s". The value cannot be null.', __CLASS__));
207
+
}
208
+
209
+
if (null !== $this->InvocationType) {
210
+
if (!isset(InvocationType::AVAILABLE_INVOCATIONTYPE[$this->InvocationType])) {
211
+
thrownewInvalidArgument(sprintf('Invalid parameter "InvocationType" when validating the "%s". The value "%s" is not a valid "InvocationType". Available values are %s.', __CLASS__, $this->InvocationType, implode(', ', array_keys(InvocationType::AVAILABLE_INVOCATIONTYPE))));
212
+
}
213
+
}
214
+
215
+
if (null !== $this->LogType) {
216
+
if (!isset(LogType::AVAILABLE_LOGTYPE[$this->LogType])) {
217
+
thrownewInvalidArgument(sprintf('Invalid parameter "LogType" when validating the "%s". The value "%s" is not a valid "LogType". Available values are %s.', __CLASS__, $this->LogType, implode(', ', array_keys(LogType::AVAILABLE_LOGTYPE))));
@@ -143,10 +150,14 @@ public function setMaxItems(?int $value): self
143
150
144
151
publicfunctionvalidate(): void
145
152
{
146
-
foreach (['LayerName'] as$name) {
147
-
if (null === $this->$name) {
148
-
thrownewInvalidArgument(sprintf('Missing parameter "%s" when validating the "%s". The value cannot be null.', $name, __CLASS__));
153
+
if (null !== $this->CompatibleRuntime) {
154
+
if (!isset(Runtime::AVAILABLE_RUNTIME[$this->CompatibleRuntime])) {
155
+
thrownewInvalidArgument(sprintf('Invalid parameter "CompatibleRuntime" when validating the "%s". The value "%s" is not a valid "Runtime". Available values are %s.', __CLASS__, $this->CompatibleRuntime, implode(', ', array_keys(Runtime::AVAILABLE_RUNTIME))));
149
156
}
150
157
}
158
+
159
+
if (null === $this->LayerName) {
160
+
thrownewInvalidArgument(sprintf('Missing parameter "LayerName" when validating the "%s". The value cannot be null.', __CLASS__));
@@ -196,13 +203,19 @@ public function setLicenseInfo(?string $value): self
196
203
197
204
publicfunctionvalidate(): void
198
205
{
199
-
foreach (['LayerName', 'Content'] as$name) {
200
-
if (null === $this->$name) {
201
-
thrownewInvalidArgument(sprintf('Missing parameter "%s" when validating the "%s". The value cannot be null.', $name, __CLASS__));
202
-
}
206
+
if (null === $this->LayerName) {
207
+
thrownewInvalidArgument(sprintf('Missing parameter "LayerName" when validating the "%s". The value cannot be null.', __CLASS__));
203
208
}
204
-
if ($this->Content) {
205
-
$this->Content->validate();
209
+
210
+
if (null === $this->Content) {
211
+
thrownewInvalidArgument(sprintf('Missing parameter "Content" when validating the "%s". The value cannot be null.', __CLASS__));
212
+
}
213
+
$this->Content->validate();
214
+
215
+
foreach ($this->CompatibleRuntimesas$item) {
216
+
if (!isset(Runtime::AVAILABLE_RUNTIME[$item])) {
217
+
thrownewInvalidArgument(sprintf('Invalid parameter "CompatibleRuntimes" when validating the "%s". The value "%s" is not a valid "Runtime". Available values are %s.', __CLASS__, $item, implode(', ', array_keys(Runtime::AVAILABLE_RUNTIME))));
$this->expectExceptionMessage('Invalid parameter "CompatibleRuntime" when validating the "AsyncAws\Lambda\Input\ListLayerVersionsRequest". The value "boom" is not a valid "Runtime". Available values are dotnetcore1.0, dotnetcore2.0, dotnetcore2.1, go1.x, java11, java8, nodejs, nodejs10.x, nodejs12.x, nodejs4.3, nodejs4.3-edge, nodejs6.10, nodejs8.10, provided, python2.7, python3.6, python3.7, python3.8, ruby2.5.');
0 commit comments