You have some errors, so consider reading the solidity docs. Also, remix is a convenient tool for coding and debugging and coding exercises. I modified your code, as follows:
pragma solidity ^0.5.0;
contract SimpleEnum {
enum SomeData {DEFAULT,ONE,TWO}
SomeData someData;
constructor() public {
someData = SomeData.DEFAULT;
}
function setValues(uint _value) public {
require(uint(SomeData.TWO) >= _value);
someData = SomeData(_value);
}
function getValue() public view returns (uint){
return uint(someData);
}
}
Hope it helps~
update
About Enums, described below:
enums are one way to create a user-defined type in Solidity. They are explicitly convertible to and from all integer types but implicit conversion is not allowed. The explicit conversions check the value ranges at runtime and a failure causes an exception. Enums needs at least one member.
Enum values are numbered in the order they're defined, starting at 0. If you want to get value of an enum, do uint(enum_variable)
.