action property
ElicitationAction
get
action
The action taken by the user in response to an elicitation request.
- ElicitationAction.accept: The user accepted the request and provided the requested information.
- ElicitationAction.decline: The user explicitly declined the action.
- ElicitationAction.cancel: The user dismissed without making an explicit choice.
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);
}