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
if (!InvocationType::exists($this->InvocationType)) {
127
+
thrownewInvalidArgument(sprintf('Invalid parameter "InvocationType" for "%s". The value "%s" is not a valid "InvocationType".', __CLASS__, $this->InvocationType));
@@ -197,23 +206,4 @@ public function setQualifier(?string $value): self
197
206
198
207
return$this;
199
208
}
200
-
201
-
publicfunctionvalidate(): void
202
-
{
203
-
if (null === $this->FunctionName) {
204
-
thrownewInvalidArgument(sprintf('Missing parameter "FunctionName" when validating the "%s". The value cannot be null.', __CLASS__));
205
-
}
206
-
207
-
if (null !== $this->InvocationType) {
208
-
if (!InvocationType::exists($this->InvocationType)) {
209
-
thrownewInvalidArgument(sprintf('Invalid parameter "InvocationType" when validating the "%s". The value "%s" is not a valid "InvocationType".', __CLASS__, $this->InvocationType));
210
-
}
211
-
}
212
-
213
-
if (null !== $this->LogType) {
214
-
if (!LogType::exists($this->LogType)) {
215
-
thrownewInvalidArgument(sprintf('Invalid parameter "LogType" when validating the "%s". The value "%s" is not a valid "LogType".', __CLASS__, $this->LogType));
Copy file name to clipboardExpand all lines: src/Input/ListLayerVersionsRequest.php
+7-14Lines changed: 7 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -94,6 +94,9 @@ public function request(): Request
94
94
// Prepare query
95
95
$query = [];
96
96
if (null !== $this->CompatibleRuntime) {
97
+
if (!Runtime::exists($this->CompatibleRuntime)) {
98
+
thrownewInvalidArgument(sprintf('Invalid parameter "CompatibleRuntime" for "%s". The value "%s" is not a valid "Runtime".', __CLASS__, $this->CompatibleRuntime));
@@ -145,17 +151,4 @@ public function setMaxItems(?int $value): self
145
151
146
152
return$this;
147
153
}
148
-
149
-
publicfunctionvalidate(): void
150
-
{
151
-
if (null !== $this->CompatibleRuntime) {
152
-
if (!Runtime::exists($this->CompatibleRuntime)) {
153
-
thrownewInvalidArgument(sprintf('Invalid parameter "CompatibleRuntime" when validating the "%s". The value "%s" is not a valid "Runtime".', __CLASS__, $this->CompatibleRuntime));
154
-
}
155
-
}
156
-
157
-
if (null === $this->LayerName) {
158
-
thrownewInvalidArgument(sprintf('Missing parameter "LayerName" when validating the "%s". The value cannot be null.', __CLASS__));
@@ -164,24 +167,6 @@ public function setLicenseInfo(?string $value): self
164
167
return$this;
165
168
}
166
169
167
-
publicfunctionvalidate(): void
168
-
{
169
-
if (null === $this->LayerName) {
170
-
thrownewInvalidArgument(sprintf('Missing parameter "LayerName" when validating the "%s". The value cannot be null.', __CLASS__));
171
-
}
172
-
173
-
if (null === $this->Content) {
174
-
thrownewInvalidArgument(sprintf('Missing parameter "Content" when validating the "%s". The value cannot be null.', __CLASS__));
175
-
}
176
-
$this->Content->validate();
177
-
178
-
foreach ($this->CompatibleRuntimesas$item) {
179
-
if (!Runtime::exists($item)) {
180
-
thrownewInvalidArgument(sprintf('Invalid parameter "CompatibleRuntimes" when validating the "%s". The value "%s" is not a valid "Runtime".', __CLASS__, $item));
181
-
}
182
-
}
183
-
}
184
-
185
170
/**
186
171
* @internal
187
172
*/
@@ -192,14 +177,18 @@ private function requestBody(): array
192
177
if (null !== $v = $this->Description) {
193
178
$payload['Description'] = $v;
194
179
}
195
-
if (null!== $v = $this->Content) {
196
-
$payload['Content'] = $v->requestBody();
180
+
if (null=== $v = $this->Content) {
181
+
thrownewInvalidArgument(sprintf('Missing parameter "Content" for "%s". The value cannot be null.', __CLASS__));
Copy file name to clipboardExpand all lines: src/ValueObject/LayerVersionsListItem.php
-10Lines changed: 0 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,6 @@
2
2
3
3
namespaceAsyncAws\Lambda\ValueObject;
4
4
5
-
useAsyncAws\Core\Exception\InvalidArgument;
6
5
useAsyncAws\Lambda\Enum\Runtime;
7
6
8
7
class LayerVersionsListItem
@@ -94,13 +93,4 @@ public function getVersion(): ?string
94
93
{
95
94
return$this->Version;
96
95
}
97
-
98
-
publicfunctionvalidate(): void
99
-
{
100
-
foreach ($this->CompatibleRuntimesas$item) {
101
-
if (!Runtime::exists($item)) {
102
-
thrownewInvalidArgument(sprintf('Invalid parameter "CompatibleRuntimes" when validating the "%s". The value "%s" is not a valid "Runtime".', __CLASS__, $item));
Copy file name to clipboardExpand all lines: tests/Unit/Input/ListLayerVersionsRequestTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ public function testInvalidEnum(): void
33
33
'CompatibleRuntime' => 'boom',
34
34
]);
35
35
$this->expectException(InvalidArgument::class);
36
-
$this->expectExceptionMessage('Invalid parameter "CompatibleRuntime" when validating the "AsyncAws\Lambda\Input\ListLayerVersionsRequest". The value "boom" is not a valid "Runtime".');
37
-
$input->validate();
36
+
$this->expectExceptionMessage('Invalid parameter "CompatibleRuntime" for "AsyncAws\Lambda\Input\ListLayerVersionsRequest". The value "boom" is not a valid "Runtime".');
0 commit comments