The api2-json file provides hints on enum. (ie. the Runtime Type in in Lambda)
class ListLayerVersionsRequest
{
/**
* A runtime identifier. For example, `go1.x`.
*
* @var string|null
*/
private $CompatibleRuntime;
public function validate(): void
{
foreach ($this->CompatibleRuntime as $value) {
if (!isset(Runtime::AVAILABLE_RUNTIMES[$value])) {
throw new InvalidArgument(sprintf('The CompatibleRuntime "%s" in "%s" is not a Valide "Runtime". Available values are "%"', $value, __CLASS__, array_keys(Runtime::AVAILABLE_RUNTIMES)));
}
}
}
}
// Class is named "Runtime" because of the name of the shape
class Runtime
{
public const NODEJS = 'nodejs';
public const NODEJS_4_3 = 'nodejs4.3';
public const NODEJS_6_10 = 'nodejs6.10';
public const NODEJS_4_3_EDGE = 'nodejs4.3-edge';
// ..
// = "AVAILABLE_" + className.upper()
public const AVAILABLE_RUNTIME = [
self::NODEJS = true,
self::NODEJS_4_3 = true,
self::NODEJS_6_10 = true,
self::NODEJS_4_3_EDGE = true,
// ..
];
}