# valueOf static method

DesignRole valueOf(

1. String name

)

Returns the DesignRole that matches the given `name`.

    final role = DesignRole.valueOf("support");
    print(role == DesignRole.SUPPORT); // true

Throws an IllegalArgumentException if no matching role exists.

## Implementation

    static DesignRole valueOf(String name) {
      return switch (name.toLowerCase()) {
        'application' => APPLICATION,
        'support' => SUPPORT,
        'infrastructure' => INFRASTRUCTURE,
        _ => throw IllegalArgumentException('No DesignRole with name $name')
      };
    }