@@ 174-183 (lines=10) @@ | ||
171 | * |
|
172 | * @return static |
|
173 | */ |
|
174 | public function withMemoryOf($memory) |
|
175 | { |
|
176 | if (!$this->memoryAvailable($memory)) { |
|
177 | throw new InvalidArgumentException('Given memory value is not supported by '.$this->provider().' provider.'); |
|
178 | } |
|
179 | ||
180 | $this->payload['size'] = $memory; |
|
181 | ||
182 | return $this; |
|
183 | } |
|
184 | ||
185 | /** |
|
186 | * Set server region. |
|
@@ 192-201 (lines=10) @@ | ||
189 | * |
|
190 | * @return static |
|
191 | */ |
|
192 | public function at(string $region) |
|
193 | { |
|
194 | if (!$this->regionAvailable($region)) { |
|
195 | throw new InvalidArgumentException('Given region is not supported by '.$this->provider().' provider.'); |
|
196 | } |
|
197 | ||
198 | $this->payload['region'] = $region; |
|
199 | ||
200 | return $this; |
|
201 | } |
|
202 | ||
203 | /** |
|
204 | * Set PHP version. |