// @generated by openehr-codegen from BMM (`EL_FUNCTION_AGENT`) — DO NOT EDIT.
// SPDX-FileCopyrightText: Cadasto B.V.
// SPDX-FileCopyrightText: openEHR Foundation
// SPDX-License-Identifier: Apache-2.0
//! The openEHR `EL_FUNCTION_AGENT` spec class, generated from the vendored BMM
//! meta-model.
use crate::v1_1::bmm3::core::feature::bmm_function::BmmFunction;
use crate::v1_1::bmm3::expression::el_tuple::ElTuple;
use crate::v1_1::bmm3::expression::el_value_generator::ElValueGenerator;
/// An agent whose signature is of a function, i.e. has a result type.
#[doc(alias = "EL_FUNCTION_AGENT")]
#[derive(Debug, Clone, PartialEq)]
pub struct ElFunctionAgent {
// inherited: EL_AGENT
/// The `is_writable` attribute of openEHR `EL_AGENT` (the vendored BMM carries no documentation for it).
pub is_writable: bool,
/// Name of the routine being called.
pub name: String,
// inherited: EL_FEATURE_REF
/// Scoping expression, which must be a `EL_VALUE_GENERATOR`.
pub scoper: Option<Box<ElValueGenerator>>,
// inherited: EL_AGENT
/// Closed arguments of a routine call as a tuple of objects.
pub closed_args: Option<ElTuple>,
/// Optional list of names of open arguments of the call.
///
/// If not provided, and the `_name_` refers to a routine with more arguments than supplied in `_closed_args_`, the missing arguments are inferred from the `_definition_`.
pub open_args: Option<Vec<String>>,
/// Reference to definition of a routine for which this is a direct call instance, if one exists.
pub definition: Option<BmmFunction>,
}