Skip to main content
Glama
DeviceOrientation.kt997 B
package maestro enum class DeviceOrientation { PORTRAIT, LANDSCAPE_LEFT, LANDSCAPE_RIGHT, UPSIDE_DOWN; // Return the camelCase representation of the enum name, for example "landscapeLeft" val camelCaseName: String get() = name.split("_") .mapIndexed { index, part -> if (index == 0) part.lowercase() else part.lowercase().capitalize() } .joinToString("") companion object { // Support lookup of enum value by name, ignoring underscores and case. This allow inputs like // "LANDSCAPE_LEFT" or "landscapeLeft" to both be matched to the LANDSCAPE_LEFT enum value. fun getByName(name: String): DeviceOrientation? { return values().find { comparableName(it.name) == comparableName(name) } } private fun comparableName(name: String): String { return name.lowercase().replace("_", "") } } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mobile-dev-inc/Maestro'

If you have feedback or need assistance with the MCP directory API, please join our Discord server