validate method

dynamic validate()

Implementation

validate() {
  // check for required fields
  // check that fields of type enum have valid values
  if (isSetDirection() && !OrderDirection.VALID_VALUES.contains(direction)) {
    throw new TProtocolError(TProtocolErrorType.UNKNOWN,
        "The field 'direction' has been assigned the invalid value $direction");
  }
}