action property

ElicitationAction get action

The action taken by the user in response to an elicitation request.

Implementation

ElicitationAction get action {
  var action = _value['action'] as String?;
  if (action == null) {
    throw ArgumentError('Missing required action field in $ElicitResult');
  }
  // There was a bug in the initial schema, where the `decline` action was
  // named `reject` instead. Handle using that as an alias for `decline` in
  // case some clients use the old name.
  if (action == 'reject') action = 'decline';

  return ElicitationAction.values.byName(action);
}